X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2FMaypole.pm;h=1ac5ff4a01b7ecb289b0b8a3dc5b5e7e72cd7455;hb=e767951f92d57740dc76425868cce32f6bcf1296;hp=596479e21ec8f2b57cbe4dd20dc1957c2385ad18;hpb=fe502daa5fcf39d01c38823dbf169199d1a50e99;p=maypole.git diff --git a/lib/Maypole.pm b/lib/Maypole.pm index 596479e..1ac5ff4 100644 --- a/lib/Maypole.pm +++ b/lib/Maypole.pm @@ -1,5 +1,4 @@ package Maypole; -use Class::C3; use base qw(Class::Accessor::Fast Class::Data::Inheritable); use UNIVERSAL::require; use strict; @@ -1294,9 +1293,9 @@ sub param $self->params->{$key} = $new_val; } - return ref $val ? @$val : ($val) if wantarray; + return (ref $val eq 'ARRAY') ? @$val : ($val) if wantarray; - return ref $val ? $val->[0] : $val; + return (ref $val eq 'ARRAY') ? $val->[0] : $val; }