sub param {
my($self,@p) = self_or_default(@_);
return $self->all_parameters unless @p;
my($name,$value,@other);
#~~~~~Snip~~~~~
($name,$value,@other) = rearrange([NAME,[DEFAULT,VALUE,VALUES]],@p
+);
#~~~~~Snip~~~~~
return wantarray ? @{$self->{$name}} : $self->{$name}->[0];
}
It also looks like CGI::Simple does the same:
From CGI::Simple 0.06
sub param {
my ( $self, $param, @p ) = @_;
#~~~~~Snip~~~~~
return wantarray ? @{$self->{$param}} : $self->{$param}->[0];
}
How do I love -d? Let me count the ways... |