SPUG: Perl oddity?

Adam Monsen adamm at wazamatta.com
Thu Jan 29 13:36:23 CST 2004

Colin Meyer wrote:
> ... speaking of which, how many Perl programmers make use of
> prototypes on a regular basis?

I try and use them for every non-OO subroutine. Unfortunately, my subs 
almost always take an %args hash, so every prototype is just (%). I need 
Perl6 named params!

I usually do something like this:

sub foo(%) {
   my %args = (name => 'default', @_);
   # do stuff


...so for me, prototypes are just a notch above useless.

Adam Monsen

More information about the spug-list mailing list