Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

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';

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://576741]
[shmem]: Python 2.7.9
[shmem]: but! perl4 doesn't suck.
[LanX]: better try 3
[shmem]: that python stuff is none of my business.
[shmem]: but sometimes I have to debug things implemeted by "the other team" and stick their nose into their dirt.
[shmem]: because it affects "my team"

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2018-03-20 18:35 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (257 votes). Check out past polls.