Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: How do I check the return value of wantarray?

by imp (Priest)
on Apr 04, 2007 at 15:09 UTC ( #608295=note: print w/replies, xml ) Need Help??


in reply to How do I check the return value of wantarray?

Because in the first case it isn't possible to reach the branch that tests if wantarray is true, since it is an elsif after testing if it is defined.
if(defined wantarray()) { } elsif(wantarray()) { }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2016-10-01 23:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?






    Results (9 votes). Check out past polls.