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"; }
Best wishes, Paul.
__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com