in reply to Preferred technique for named subroutine parameters?
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 : { @_ }; # ... }
|
|---|