Ugh, genius.... I do think ref was correct - we just have variable naming in our style guide and I did a :'<,'>s/direction/hDirection/gc and messed that one up :(
Thanks for the re - it got me where I want to be (knew it was something stupid). On Thu, Feb 13, 2014 at 6:27 AM, Paul Johnson <p...@pjcj.net> wrote: > On Thu, Feb 13, 2014 at 06:04:40AM -0500, shawn wilson wrote: >> I know I'm overlooking something real simple here but I just don't see it: > >> And the method ('HERE' marking the branch that is having issues): > > Are you sure? I think you might not be getting that far. > >> sub _list_set >> { >> my ($self, $params) = @_; >> my $name = $params->{name}; >> return undef unless (exists($self->{set}{$name}{list}) and >> ref($self->{set}{$name}{list}) eq 'ARRAY'); >> my @return; >> >> my %hDirection; >> if (ref(\$params->{hDirection}) eq 'SCALAR') > > You probably don't want to be taking that reference here because that > will always be a scalar. So I think you are executing this branch of > the conditional. > > Your test should probably be if (!ref $params->{hDirection}) > >> { >> %hDirection = map {$_ => 1} split(" ", $params->{direction}); >> } >> elsif (ref($params->{direction}) eq 'ARRAY') >> { >> %hDirection = map {$_ => 1} @{$params->{direction}}; # <-- HERE >> } >> else > > -- > Paul Johnson - p...@pjcj.net > http://www.pjcj.net -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/