in reply to Omitted subroutine arguments
Then I call it likesub my_sub { my %args = ( param1 => 'default', param2 => 0, @_, ); ... }
then the defaults get overridden with what I send, or use the defaults if I don't. If it is an object method, then I just add a line before the args:my_sub( param1 => 'Not Default Text' );
sub my_sub { my $self = shift; my %args = ( @_, ); .... }
|
|---|