user-services

This commit is contained in:
Doug Bell 2009-05-15 18:03:03 +00:00
parent 18e095faee
commit 1f96d708bf
5 changed files with 18 additions and 180 deletions

View file

@ -231,10 +231,7 @@ all form variables.
sub body {
my $self = shift;
my $value = shift;
if ( !defined $value ) {
return keys %{ $self->{body} } if wantarray;
return { %{ $self->{body} } };
}
return keys %{ $self->{body} } unless defined $value;
if ($self->{body}->{$value}) {
if (wantarray && ref $self->{body}->{$value} eq "ARRAY") {
return @{$self->{body}->{$value}};