Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^5: Ordering Template cards

by haukex (Archbishop)
on Jan 26, 2021 at 12:36 UTC ( [id://11127476]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Ordering Template cards
in thread Ordering Template cards

Well it could have been designed to detect that it's called in list context and return an empty list when the table is exhausted.

There are arguments to be made for and against this. If a method is documented to return a scalar, then you'd expect to be able to do my %data = ( foo => $sth->fetchrow_arrayref, bar => 123 );, if it suddenly returns the empty list that'd be a problem.

Replies are listed 'Best First'.
Re^6: Ordering Template cards
by LanX (Saint) on Jan 26, 2021 at 12:41 UTC
    haukex++ That's a very good point!

    But IMHO the culprit here is the design of the fat comma => as pairing operator.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2024-04-19 08:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found