Hi, Juerd wrote: > This probably goes against everything a shell based platform wants, > but would it be possible to give the program a sub-like signature?
I like that idea very much, but... > signature ( > Rule $pattern, > bool +$help :short('h'), > Int +$verbose :short('v'), > Str [EMAIL PROTECTED] = <-> > ); ...this seems a bit ugly to me. What do you say about that: use Getopt::Auto; run &main; sub main ( Rule $pattern, bool +$help :short("h"), ... ) { ...; } Getopt::Auto's run-subroutine would then use &main.signature (IIRC) to parse @*ARGS, exactly as in your posting. > Probably a macro can handle this, but does (will) Perl parse a > signature-like argument list and hand the macro something it can use, > or would this require source-filter like trickery? With Perl providing &sub.signature, there won't be any need to use macros or even source-filters :) --Ingo -- Linux, the choice of a GNU | Mathematicians practice absolute freedom. generation on a dual AMD- | -- Henry Adams Athlon! |