in reply to Re^2: Template, sorting an array with only one member
in thread Template, sorting an array with only one member

Have one/all return arrayrefs, not lists?
sub all { my $self = shift; return $self->{'objects'}; } sub one { my $self = shift; my $filter = shift; return [ grep { $_->{'value'} == $filter } @{$self->{'objects'}} ]; }

Replies are listed 'Best First'.
Re^4: Template, sorting an array with only one member
by FloydATC (Deacon) on Oct 20, 2014 at 18:32 UTC

    You're absolutely right, both of you... Damnit. Well, at least I'll be able to sleep tonight :-)

    -- FloydATC

    Time flies when you don't know what you're doing