Mailing List Archive

Re: docs?
[.moving this discussion to the mod_perl docs list so others can contribute.
Also CC'ing Lyle and Jack who has offered help with this project and probably
have already gave up, trying to figure out where they could help. Hopefully
this Gerald's code will provide the missing fuel]

> I have started to work on XSBuilder again. The first thing I have done is to
> create a module called ModPerl::PODTemplate, which contains a set of methods
> which allows to easily change the format of the generated POD. I attach you
> the new version, along with two files I have generated. I didn't have made
> any changes in the format so far. I would like to get your feedback, on how
> the output should look like, them I can implement it imediately (or of
> course you can change mpbuilder/lib/ModPerl/PODTemple.pm on your own and
> play with it)

But I have already provided the feedback, when you first posted it long time
ago. http://mathforum.org/epigone/modperl-docs-dev/fyhahmen

Here are some more comments:

The examples look OK I suppose, I think we have already agreed to have $t->foo
and not $t -> foo.

From the recent work on the docs, I think I prefer to have all the functions
in =head2 to be enclosed in C<> so they look good in the TOC. Granted it makes
it more cumbersome to write L<> links manually, but the end user gets better docs.

same for all variables, they should be C<>, to save us a lot of
manual work.

Should description of the method come before its arguments?

things like <PRE> are HTML, not pod. see Table.pod that you have attached.

Things like PV/IV make little sense to users. Perhaps replace them with
SCALAR? So we may have SCALAR, ARRAY, VOID

@since: 1.99 : should probably be more specific, i.e. 1.99_09

Finally, are you sure that we want to maintain this intermediary format. It's
going to be a big pain. I suggest to drop the idea and go with the plain pod.
We have very little human resources to work on docs, so the less we have to
maintain the better.

> The next thing I will do is looking after the constant issue.

Cool. Great to hear that you are back to work on it.

> P.S. In case you want to try it out and didn't remeber mpbuilder/README
> contains a short setup description

__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: docs? [ In reply to ]
Stas Bekman wrote:

> [.moving this discussion to the mod_perl docs list so others can
> contribute. Also CC'ing Lyle and Jack who has offered help with this
> project and probably have already gave up, trying to figure out where
> they could help. Hopefully this Gerald's code will provide the missing
> fuel]

I'm still here. But I'm a little bit confused. I'd like to work on
Apache::RequestRec, but I'm not sure of the status of that document.
Will there be additional changes from an import, or is that it (and I
should get started).

>
>
>> I have started to work on XSBuilder again. The first thing I have
>> done is to
>> create a module called ModPerl::PODTemplate, which contains a set of
>> methods
>> which allows to easily change the format of the generated POD. I
>> attach you
>> the new version, along with two files I have generated. I didn't have
>> made
>> any changes in the format so far. I would like to get your feedback,
>> on how
>> the output should look like, them I can implement it imediately (or of
>> course you can change mpbuilder/lib/ModPerl/PODTemple.pm on your own and
>> play with it)
>
[snip feedback]

>
> Finally, are you sure that we want to maintain this intermediary
> format. It's going to be a big pain. I suggest to drop the idea and go
> with the plain pod. We have very little human resources to work on
> docs, so the less we have to maintain the better.

Where is the intermediary format defined?

--
Jack


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: docs? [ In reply to ]
Jack Nerad wrote:
> Stas Bekman wrote:
>
>> [.moving this discussion to the mod_perl docs list so others can
>> contribute. Also CC'ing Lyle and Jack who has offered help with this
>> project and probably have already gave up, trying to figure out where
>> they could help. Hopefully this Gerald's code will provide the missing
>> fuel]
>
>
> I'm still here. But I'm a little bit confused. I'd like to work on
> Apache::RequestRec, but I'm not sure of the status of that document.
> Will there be additional changes from an import, or is that it (and I
> should get started).

Most likely, yes, there will be changes. As you have seen big chunks of
information are already available from Apache docs. We just need to adjust
them to the perl API.

At least you can see from the previously attached file what data we get from
the import and whether it's good enough to be useful.

>>> I have started to work on XSBuilder again. The first thing I have
>>> done is to
>>> create a module called ModPerl::PODTemplate, which contains a set of
>>> methods
>>> which allows to easily change the format of the generated POD. I
>>> attach you
>>> the new version, along with two files I have generated. I didn't have
>>> made
>>> any changes in the format so far. I would like to get your feedback,
>>> on how
>>> the output should look like, them I can implement it imediately (or of
>>> course you can change mpbuilder/lib/ModPerl/PODTemple.pm on your own and
>>> play with it)
>>
>>
> [snip feedback]
>
>>
>> Finally, are you sure that we want to maintain this intermediary
>> format. It's going to be a big pain. I suggest to drop the idea and go
>> with the plain pod. We have very little human resources to work on
>> docs, so the less we have to maintain the better.
>
>
> Where is the intermediary format defined?

what you saw attached is the intermediary format, the final pod won't have any
@param-like tags. Gerald wanted it for other docs processing tools.

It's documented in the file src/docs/2.0/api/AUTOGENERATION, which you can see
from your local checkout or online:
http://cvs.apache.org/viewcvs.cgi/modperl-docs/src/docs/2.0/api/AUTOGENERATION

__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: Autogeneration of docs [ In reply to ]
Hi Jack,

>
> I'm still here. But I'm a little bit confused. I'd like to work on
> Apache::RequestRec, but I'm not sure of the status of that document.
> Will there be additional changes from an import, or is that it (and I
> should get started).
>

I don't know how much you have followed the discussion about xsbuilder in
the past. Basicly it's abtracted out of the mod_perl build system to make it
also usable outside of mod_perl. It is able to parse the source comments of
the Apache headers and create pod from it. The last thing I have done and
what I described in the email Stas has quoted, is that the part that
actually generates the pod, is moved in a class of it's own. It's very easy
to change. So if you have some time to work on the docs, it would be great
if you can take xsbuilder (I send you the necessary version if you like to
do this, because it's not yet on cpan) can customize the output, so it
looks like the desired final pod. After this step, we have docs for all
Apache objects and just need to Perlise them. Part of this translation is
already done by xsbuilder, other things should be very easy to add. If this
is done, the next step is to do some hand editing on the this generated pod.

Are you interested in working on this? (because my time is very limited at
the moment)

Gerald


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: Autogeneration of docs [ In reply to ]
Hello Gerald,

Gerald Richter wrote:

>Hi Jack,
>
>
>
>>I'm still here. But I'm a little bit confused. I'd like to work on
>>Apache::RequestRec, but I'm not sure of the status of that document.
>>Will there be additional changes from an import, or is that it (and I
>>should get started).
>>
>>
>>
>I don't know how much you have followed the discussion about xsbuilder in
>the past. Basicly it's abtracted out of the mod_perl build system to make it
>also usable outside of mod_perl. It is able to parse the source comments of
>the Apache headers and create pod from it. The last thing I have done and
>what I described in the email Stas has quoted, is that the part that
>actually generates the pod, is moved in a class of it's own. It's very easy
>to change. So if you have some time to work on the docs, it would be great
>if you can take xsbuilder (I send you the necessary version if you like to
>do this, because it's not yet on cpan) can customize the output, so it
>looks like the desired final pod. After this step, we have docs for all
>Apache objects and just need to Perlise them. Part of this translation is
>already done by xsbuilder, other things should be very easy to add. If this
>is done, the next step is to do some hand editing on the this generated pod.
>
>Are you interested in working on this? (because my time is very limited at
>the moment)
>
>
I'm interested in working on this, but I really don't know the first
thing about your processes and don't want to rock the boat. :) If I get
started on this project, I'm going to need someone to answer some very
stupid questions that I'll come up with as I work.

I saw the Apache::RequestRec pod in the message, but I didn't know if
that was it or if there were going to be more changes. Stas told me to
hold off until the "import" but it was unclear to me when that was going
to happen.

Please send me xsbuilder and tell me what to do with it. (Do I have the
files that it acts on already? Where are they? Is the final desired pod
just plain old perl pod? What texts do I need to read and know before I
ask these questions?)

--
Jack


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: Autogeneration of docs [ In reply to ]
Hi,

>
> Okay. I'm there.

That's a good first step!

>What do I do with them? That is, I've got all this
> great autogenerated stuff sitting in a directory, how do I make changes
> to the autogenerated stuff?
>

The point was to change the formatting in a way that you don't have to edit
them by hand. You can do this by modifying the methods in
ModPerl::PODTemplate (inside of mpbuilder). Take a look at the last mail
Stas send to the docs-dev mailing list, for what he thinks should be
changed. When the formatting is ok, then we should check that the docs are
complete, i.e. xsbuilder builder isn't missing any important piece of code
or doing the wrong thing at some point.

When these steps are complete we have a first set of documentation for the
whole mod_perl 2 stuff. This is a good starting point for doing hand editing
of the docs e.g. adding perl specific stuff, removing stuff that is only of
interenst for C programmeres etc.

When you feel there is any thing that should be done by xsbuilder (e.g.
something that is always wrong) let me know and I try to change xsbuilder in
that way.

Gerald

P.S. I moving the discussion back to the docs-dev mailing list so other can
participate



---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: Autogeneration of docs [ In reply to ]
Stas,

>
> Gerald, can you please post the latest instructions on how to use
xsbuilder
> with mp2, so Jack can try first to use it as is, before changing anything.
I
> know you have posted it before, but please do so again (or point to that
> post). Thanks a lot.
>

I have already send it to him (I just don't wanted to send the attachments
to all the people on the mailing list) and if I didn't misunderstood his
email, he has already sucessfully set it up and got it running.

Gerald


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: Autogeneration of docs [ In reply to ]
Gerald Richter wrote:

>Hi Jack,
>
>sorry for the delay...
>
>Here are the newest version of xsbuilder and mpbuilder. The README inside of
>mpbuilder describes how to set it up. (I attach a copy below). Addtionaly
>you need the sources of Apache 2 and mod_perl 2.
>
>The module called ModPerl::PODTemplate (inside of mpbuilder) contains a set
>of methods
>which allows to easily change the format of the generated POD. That's the
>only thing you should need to change for now.
>
>NOTE that for now no docs for constants are generated, I am still working
>that.
>
>Gerald
>
>Generating pods for mod_perl 2
>
>- Install ExtUtils::XSBuilder (at least 0.24)
>
>- Extract mpbuilder in an empty directory
>
>- Create a config file in mpbuilder/xsbuilder named config.pl which contains
>
>a single line that points to your mod_perl 2 source tree e.g.
>
>$MODPERL="/usr/msrc/cvs/modperl-2.0_bld" ;
>
>- Create symbolic link in the directory where you have extracted mpbuilder
>
>name xs to the xs dirorecty of your mod_perl directory e.g.
>
>ln -s /usr/msrc/cvs/modperl-2.0_bld/xs xs
>
>- Create symbolic link in the directory where you have extracted mpbuilder
>
>name xsbuilder/maps to the xs/maps dirorecty of your mod_perl directory e.g.
>
>ln -s /usr/msrc/cvs/modperl-2.0_bld/xs/maps xsbuilder/maps
>
>- Run xsbuilder/source_scan.pl and xsbuilder/xs_generate.pl
>
I guess I spoke too soon. This is the error that I get after executing

$ perl xsbuilder/xs_generate.pl


Parse xsbuilder/maps/apache_types.map...
Parse xsbuilder/maps/apr_types.map...
Parse xsbuilder/maps/modperl_types.map...
unlink WrapXS/typemap
unlink WrapXS/modperl_xs_typedefs.h
unlink WrapXS/modperl_xs_sv_convert.h
rmdir WrapXS
mkdir WrapXS
writing...WrapXS//typemap
Parse xsbuilder/maps/modperl_functions.map...
DEFINE DEFINE_mpxs_ModPerl__Util_exit arg=int:status=0
Use of uninitialized value in concatenation (.) or string at
/usr/local/lib/perl5/site_perl/5.8.0/ExtUtils/XSBuilder/FunctionMap.pm
line 190, <$fh> line 8.

And then, of course, it dies.

What did I mess up?

--
Jack


>
>- Now you should get the pod files under WrapXS directory
>
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: Autogeneration of docs [ In reply to ]
Gerald Richter wrote:
> Hi,
>
>
>>Okay. I'm there.
>
>
> That's a good first step!
>
>
>>What do I do with them? That is, I've got all this
>>great autogenerated stuff sitting in a directory, how do I make changes
>>to the autogenerated stuff?
>>
>
>
> The point was to change the formatting in a way that you don't have to edit
> them by hand. You can do this by modifying the methods in
> ModPerl::PODTemplate (inside of mpbuilder). Take a look at the last mail
> Stas send to the docs-dev mailing list, for what he thinks should be
> changed. When the formatting is ok, then we should check that the docs are
> complete, i.e. xsbuilder builder isn't missing any important piece of code
> or doing the wrong thing at some point.
>
> When these steps are complete we have a first set of documentation for the
> whole mod_perl 2 stuff. This is a good starting point for doing hand editing
> of the docs e.g. adding perl specific stuff, removing stuff that is only of
> interenst for C programmeres etc.
>
> When you feel there is any thing that should be done by xsbuilder (e.g.
> something that is always wrong) let me know and I try to change xsbuilder in
> that way.
>
> Gerald
>
> P.S. I moving the discussion back to the docs-dev mailing list so other can
> participate

Gerald, can you please post the latest instructions on how to use xsbuilder
with mp2, so Jack can try first to use it as is, before changing anything. I
know you have posted it before, but please do so again (or point to that
post). Thanks a lot.


__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: Autogeneration of docs [ In reply to ]
> Parse xsbuilder/maps/modperl_functions.map...
> DEFINE DEFINE_mpxs_ModPerl__Util_exit arg=int:status=0
> Use of uninitialized value in concatenation (.) or string at
> /usr/local/lib/perl5/site_perl/5.8.0/ExtUtils/XSBuilder/FunctionMap.pm
> line 190, <$fh> line 8.
>

line 190 is a debug print out, just comment it out and see if it works...

Gerald



---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: Autogeneration of docs [ In reply to ]
Gerald Richter wrote:

>>Parse xsbuilder/maps/modperl_functions.map...
>>DEFINE DEFINE_mpxs_ModPerl__Util_exit arg=int:status=0
>>Use of uninitialized value in concatenation (.) or string at
>>/usr/local/lib/perl5/site_perl/5.8.0/ExtUtils/XSBuilder/FunctionMap.pm
>>line 190, <$fh> line 8.
>>
>>
>>
>
>line 190 is a debug print out, just comment it out and see if it works...
>
>Gerald
>
>
It ran. For Apache/RequestRec/RequestRec.pod I get (I clipped whitespace):

=head1 NAME
Apache::RequestRec
=head1 FUNCTIONS
=head2 @func: proxyreq()
$ret = $r -> proxyreq($val)
=over 4
=item @param: Apache::RequestRec $r
=item @param: SV $val
=item @ret: IV
=item @since: 1.99
=back

(That's it.) Did I do something wrong? Is that all I should get? And
then my next question is, I should edit ModPerl/PODTemplate.pm in lib so
that the format is correct?

--
Jack


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: Autogeneration of docs [ In reply to ]
Gerald Richter wrote:

>The point was to change the formatting in a way that you don't have to edit
>them by hand. You can do this by modifying the methods in
>ModPerl::PODTemplate (inside of mpbuilder). Take a look at the last mail
>Stas send to the docs-dev mailing list, for what he thinks should be
>changed. When the formatting is ok, then we should check that the docs are
>complete, i.e. xsbuilder builder isn't missing any important piece of code
>or doing the wrong thing at some point.
>
I have a suggestion/question for xsbuilder/ModPerl::PODTemplate. The
system is quite clever and useful, and it works, apparently. My
suggestion is to make the system use a templating module. I'm familiar
with TemplateToolkit and HTML::Template, but those are probably
overkill. Text::Template might do it. Of course, this adds a
dependency that you might not want to deal with. I offer it as a
suggestion/question only.

--
Jack


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: Autogeneration of docs [ In reply to ]
>
> (That's it.) Did I do something wrong? Is that all I should get?

No, you should get a lot of functions. For me it's about 900 lines of pod.

Can you please send me the full output of the xs_generate.pl and tell me
which versions of mod_perl and Apache you are using?

> And
> then my next question is, I should edit ModPerl/PODTemplate.pm in lib so
> that the format is correct?
>

Yes

Gerald



---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: Autogeneration of docs [ In reply to ]
> I have a suggestion/question for xsbuilder/ModPerl::PODTemplate. The
> system is quite clever and useful, and it works, apparently. My
> suggestion is to make the system use a templating module. I'm familiar
> with TemplateToolkit and HTML::Template, but those are probably
> overkill. Text::Template might do it. Of course, this adds a
> dependency that you might not want to deal with. I offer it as a
> suggestion/question only.
>

I had thought about using a Template module, but I think it's overkill. The
POD ins't so complicated, that it would be necessary to add the dependency
of a Template module (which will have more dependencies). Also it would be
hard to choose one. When I choose one I would use Embperl, because I am the
author of Embperl and xsbuilder is used to generate glue code for Embperl,
but then the mod_perl poeple that like to work on the docs need to install
Embperl. The other way around it would be necessary for the Embperl people
to install anotherTemplate module.

I think we should keep it simple and avoid such dependencies.

Gerald


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: Autogeneration of docs [ In reply to ]
Gerald Richter wrote:
>>I have a suggestion/question for xsbuilder/ModPerl::PODTemplate. The
>>system is quite clever and useful, and it works, apparently. My
>>suggestion is to make the system use a templating module. I'm familiar
>>with TemplateToolkit and HTML::Template, but those are probably
>>overkill. Text::Template might do it. Of course, this adds a
>>dependency that you might not want to deal with. I offer it as a
>>suggestion/question only.
>>
>
>
> I had thought about using a Template module, but I think it's overkill. The
> POD ins't so complicated, that it would be necessary to add the dependency
> of a Template module (which will have more dependencies). Also it would be
> hard to choose one. When I choose one I would use Embperl, because I am the
> author of Embperl and xsbuilder is used to generate glue code for Embperl,
> but then the mod_perl poeple that like to work on the docs need to install
> Embperl. The other way around it would be necessary for the Embperl people
> to install anotherTemplate module.
>
> I think we should keep it simple and avoid such dependencies.

+1

not so much for dependecies, but for KISS.


__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: Autogeneration of docs [ In reply to ]
Gerald Richter wrote:

>>(That's it.) Did I do something wrong? Is that all I should get?
>>
>>
>
>No, you should get a lot of functions. For me it's about 900 lines of pod.
>
>Can you please send me the full output of the xs_generate.pl and tell me
>which versions of mod_perl and Apache you are using?
>
>
I obtained the latest sources of apache and mod_perl... when I run
source_scan.pl this is what I get to begin with:

Search all headers in:
/usr/local/apache/include
Will search /usr/local/apache/include for include files...
Initialize parser

I don't think that's the right directory. I used
--prefix=/usr/local/apache2 when I configured and built mod_perl and
httpd. Shouldn't it be looking in /usr/local/apache2/include instead?

I modified XSBuilder::ParseSource.pm, and hardcoded the include
directory of my installation in at line 213. But I don't know where it
is getting the wrong directory directory from... $self->include_dirs?
How is that set?

Anyhow, now, it looks like it is generating the doc properly. Sorry for
the trouble. I'll start working on the formatting.

--
Jack



---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: Autogeneration of docs [ In reply to ]
Hi,

>
> I don't think that's the right directory. I used
> --prefix=/usr/local/apache2 when I configured and built mod_perl and
> httpd. Shouldn't it be looking in /usr/local/apache2/include instead?
>
> I modified XSBuilder::ParseSource.pm, and hardcoded the include
> directory of my installation in at line 213. But I don't know where it
> is getting the wrong directory directory from... $self->include_dirs?
> How is that set?
>

This methed is overloaded by Apache::ParseSource from mpbuilder, which gets
the include dirs from what mod_perl figured out at it's last perl
Makefile.PL run. To make this working properly you must either have
installed mod_perl or change the perl lib path to point to the blib
directory of mod_perl.

I guess you didn't run a make install after your last mod_perl and Apache
compile...

> Anyhow, now, it looks like it is generating the doc properly.

Great!

> Sorry for
> the trouble. I'll start working on the formatting.
>

No problem


Gerald


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org