Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: Template, sorting an array with only one member

by ysth (Canon)
on Oct 20, 2014 at 18:16 UTC ( [id://1104475]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1104475]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-23 06:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found