Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Style question on conditional return statements:

by VSarkiss (Monsignor)
on Oct 06, 2006 at 18:58 UTC ( #576741=note: print w/ replies, xml ) Need Help??


in reply to Style question on conditional return statements:

They're not the same, so it's not just a style issue. The first returns 1 or undef, the second returns whatever is_writable returns, and the third returns 1 or 0.

It looks like you're trying to do a "call-thru", in which case I'd probably use the second one, or better still, use Method::Alias:

use Method::Alias 'is_connected' => 'is_writable';


Comment on Re: Style question on conditional return statements:
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (11)
As of 2015-07-29 19:42 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 (267 votes), past polls