Mailing List Archive

Autogenerating Docs
Stas has mentioned that getting the autogenerating of skeleton
pods would be useful ... Attached is a script that perhaps might
be a start in that direction - it takes a pdd file and writes a
pod outline of the included methods (name, C definition,
description, arguments, and return type).

--
best regards,
randy
Re: Autogenerating Docs [ In reply to ]
Randy Kobes wrote:
> Stas has mentioned that getting the autogenerating of skeleton
> pods would be useful ...

Gerald works on the generalized WrapXS, which also parses the C headers
files and based on that will generate the pods. Lyle was/is working on
the latter functionality.

> Attached is a script that perhaps might
> be a start in that direction - it takes a pdd file and writes a
> pod outline of the included methods (name, C definition,
> description, arguments, and return type).

what's pdd?

> ------------------------------------------------------------------------
>
> use strict;
> use warnings;
> my $pdd = shift || die "Useage: $0 pdd_file";
>
> pdd2pod($pdd);
> sub pdd2pod {
> my $pdd = shift || die "Please supply a pdd file";
> open(PDD, $pdd) or die "Coudn't open $pdd: $!";
> my @lines = <PDD>;
> close PDD;
> my $VAR1;
> my $code = join " ", @lines;
> eval ($code);
> (my $pod = $pdd) =~ s!\.pdd$!.pod!;
> open (POD, ">$pod") or die "Can't open $pod: $!";
> my $module = $VAR1->{module};
> print POD <<"END";
> =head1 $VAR1->{module} documentation
>
> The following methods are available.
>
> =head1 Methods
>
> =over
>
> END
>
> foreach my $hash (@{$VAR1->{functions_detailed}}) {
> my $comment = $hash->{comment_parsed};
> my $desc = $comment->{func_desc} || 'none given';
> my $return = $comment->{doxygen_return} || 'not supplied';
> print POD <<"END";
>
> =item $hash->{name}
>
> I<C Type>:
>
> $hash->{code}
>
> I<Description:> $desc
>
> END
>
> my @keys = keys %{$comment->{doxygen_param_desc}};
> if (@keys) {
> print POD "I<Arguments:>\n";
> foreach my $key (@keys) {
> print POD " \n$key: $comment->{doxygen_param_desc}->{$key}\n";
> }
> }
> else {
> print POD "I<Arguments:>\nnot supplied\n";
> }
> print POD "\nI<Return:> $return\n";
>
> }
>
> print POD "\n=back\n";
> close POD;
> }
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
> For additional commands, e-mail: docs-dev-help@perl.apache.org


--


__________________________________________________________________
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: Autogenerating Docs [ In reply to ]
On Mon, 9 Dec 2002, Stas Bekman wrote:

> Randy Kobes wrote:
> > Stas has mentioned that getting the autogenerating of skeleton
> > pods would be useful ...
>
> Gerald works on the generalized WrapXS, which also parses the C headers
> files and based on that will generate the pods. Lyle was/is working on
> the latter functionality.
>
> > Attached is a script that perhaps might
> > be a start in that direction - it takes a pdd file and writes a
> > pod outline of the included methods (name, C definition,
> > description, arguments, and return type).
>
> what's pdd?

It's a file that was in Gerald's WrapXS distribution, generated
by ModPerl::WrapXS for each module, containing information on the
available methods.

--
best regards,
randy


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: Autogenerating Docs [ In reply to ]
> Stas has mentioned that getting the autogenerating of skeleton
> pods would be useful ... Attached is a script that perhaps might
> be a start in that direction - it takes a pdd file and writes a
> pod outline of the included methods (name, C definition,
> description, arguments, and return type).
>

Lyle has send me a few days ago his work, which does basicly the same. I
will take a look at both of your work during the week. To avoid duplicating
work, please wait until I have finished this. I try to do this ASAP so work
can continue and to work together on one code base.

Gerald



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