Paul Kulchenko wrote:

> Hi, Gerald!
> 
> --- Gerald Richter <[EMAIL PROTECTED]> wrote:
> 
>>I didn't found this Attribute::Webservices on CPAN, where can I get
>>it to take a look at it ?
>>
> offlist.
> 
> 
>>I really like to have a standard way in p5ee how this
>>metainformations are
>>provided. This should be used for generating docs, perl beans, rpc,
>>webservices and so on. So we should carefully think and see what's
>>the best
>>way to do it.
>>
> Both Stat Bekman and James Tillman showed TMTOWTDI in work. I agree
> with their arguments.
> 
> Let me summarize. We have:
> 
> 1. Metainformation on language level (prototype, type, but not in all
> cases. no difference between int and string, no names, no in/out
> parameters and the rest). 
> NB. I'm not saying we need it on language level, I'm just saying that
> it's required in some cases and need to be attached somehow.
> 
> 2. Additional metainfo (names, comments, types, type checking).
> Part of it is required only occasionally (for example when asked for
> service description) and the rest of it is requried every time method
> is executed (for example, type checking as in Attribute::Signature). 
> 
> there are two parts of this metainfo:
> a) code (could be Attribute::Signature or something else), required
> in run-time.
> b) text (could be Attribute::*, POD or something else), occasionally
> required in run-time. Has to be preprocessed if in POD. 
> 
> 3. Documentation
> It's unclear how to provide this information in POD. Should we use
> external storage (XML or something)? How to specify polymorphic
> methods (method(string) vs method(int))?
> 
> POD vs. Attribute or something similar
> 
> Pros
> doesn't have run-time overhead
> work for any version of Perl (as soon as POD processing extended for
> new directives)
> metainfo is duplicated, so can be verified
> 
> Cons
> POD processing need to be extended
> metainfo is duplicated, so can be outdated/incorrect
> to use this metainfo POD has to be processed at run-time
> 
> Attribute example:
> 
> use Attribute::WebService;
> 
> sub MyService::foo # multiple signatures # @method
>   : Parameters (
>       My::Class var, 
>       [in/out] float FloatNum, 
>       [out] int Something
>     )
>   : Parameters1 (My::Another::Class var)  
>   { "foo"; }

Good, but you still need a lot of other documentation that would be the 
best maintained in POD. Hence I suggest that both are to be used:

- the API/Metadata docs are to be maintained only via Attributes 
(accessible in run time).

- the rest of the docs are written in POD.

- since the documentation must include APIs, convert these and append 
into the existing PODs during 'make'. So now PODs can be used for 
installing man pages, converting into various other formats. There is no 
duplication.

_____________________________________________________________________
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