http://qs1969.pair.com?node_id=608091


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