[Kc] subroutine parameter list

Andy Lester andy at petdance.com
Wed Apr 9 14:15:16 PDT 2008


On Apr 9, 2008, at 4:14 PM, David Nicol wrote:
> as I understand it the best practice for readability is
>
>  param_test(tom => "somestring", george => "anotherstring", ref =>  
> \@array);
>
> sub param_test {
>   my %args = @_;
>   croak <<INSTRUCTIONS unless 3 == grep { exists $args{$_}} qw/tom  
> george ref/;
>       please refer to thread on KCLUG mailing list
> INSTRUCTIONS
>    ...


Roughly, yes, but Params::Validate encapsulates all that.

--
Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance






More information about the kc mailing list