Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Context aware functions - best practices?

by Aristotle (Chancellor)
on Jan 15, 2003 at 22:01 UTC ( #227245=note: print w/ replies, xml ) Need Help??


in reply to Re: Context aware functions - best practices?
in thread Context aware functions - best practices?

Very good point. I hadn't considered the lack of values case - what struck me immediately (the first time I was about to write such code, even) about at that snippet was the opposite case: if foo has several values you get extraneous key/value pairs - oops. So I have to agree that it's easy to create confusing semantics with wantarray.

At this point I am confident about my choice for this particular case, and reassured about the fact I hadn't overlooked any caveats myself. Thanks and ++ to everyone for their arguments and for pointing out some implications that escaped me.

Makeshifts last the longest.


Comment on Re^2: Context aware functions - best practices?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2015-07-06 03:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls