in reply to prototypes: so many \@'s?
I tried (@\@) but that accepted any old thing (doh!). perlsub does warn you the prototyping capability is limited!
You could always roll your own at run-time, something like (untested):
our %proto = ( '@\@' => sub { return !grep (ref( $_ ) ne 'ARRAY' ), @_ +; }, # ... # proto => sub { enforcement-code } ); sub foo { $proto{ '@\@' }{@_} or die; # followed by "real" code for sub foo }
-M
Free your mind
|
---|
In Section
Seekers of Perl Wisdom