update: possibly bad example - that's how I retrofit some of the legacy code at work. New code would inherit new() from Moose or Mouse :)sub new { my $class = shift; my $args = (ref $_[0] eq 'HASH') ? shift : { @_ }; # ... }
In reply to Re: Preferred technique for named subroutine parameters?
by spacebat
in thread Preferred technique for named subroutine parameters?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |