Paul Kulchenko wrote:

> Disadvantage of POD is that this
> information is not available for dynamic querying and discovery and
> you need to make it available to script in some way (thus duplicate).


The POD is a *source* format. If you want to do queries, convert it into 
any other format you prefer before doing the query (do it once at the 
beginning, and one more when updates to the pod happen). That's what the 
DocSet project does - it builds a cache of meta data and then when the 
output is rendered this query-able dataset is used. Which makes it 
independent of the source format.

 
> What probably could be done with Attribute::* modules is to store
> this information as attributes and have 
> 
> # @method something


with POD using something like:

@method:
@param

should be enough. This way the pod will be still rendered correctly with 
any pod2foo which is not aware of the special extension syntax. But 
since @method special tag may collide with a real @method array, I 
suggest using #method instead.

=head2

foo($bar, $zed);

#name: foo()
#param: $bar - ....
#param: $zed - ....
#return: none
#sideeffects:

#notes: 


=cut

the only thing that I still don't like about it is that you've to put 
each of the directives into its own paragraph, if you want the perldoc 
and alike utils not to throw everything together. So you end up with too 
many lines:

=head2

foo($bar, $zed);

#name: foo()

#param: $bar - ....

#param: $zed - ....

#return: none

#sideeffects:

#notes:

=cut

Otherwise you get the best of the two worlds:
- the simplicity of maintaining POD docs
- the well defined APIs (the converter will validate the PODs for 
correctness of used tags)

_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/

Reply via email to