> > > use Custom::Sigs 'SEARCH'; > > sub function :signature(SEARCH) {...} > > And replace SEARCH with the results of the sub call without nasty eval > hacks. I'm actually working on some code to try to handle the latter case, > but so far I've been using the Marpa parser to develop a BNF grammar to > parse the Perl code in the attribute and install the signature. It's very > painful. > > just repeating my previous idea - what about `extends` for functions? eg: package Foo { sub SEARCH (... signature ...); } sub function :extends(&Foo::SEARCH) { ... } later extended signature support for setting fixed value (in opposite to default value) of parameter, eg: sub function :extends(&Foo::SEARCH) ($search_key := value = q (fixed value)) { ... } Best regards, BranoThread Previous | Thread Next