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

Re^3: RFC: Defined-Or for before Perl 5.10

by ikegami (Pope)
on Nov 10, 2010 at 22:48 UTC( #870715=note: print w/replies, xml ) Need Help??

in reply to Re^2: RFC: Defined-Or for before Perl 5.10
in thread RFC: Defined-Or for before Perl 5.10

sub _defined { if (defined($_[0])) { return $_[0]; } else { return $_[1]->(); } } sub _or(&) { return $_[0]; } my $pid = _defined fork(), _or { die "Can't fork: $!" };

I'll let you pick better names.

Update: Nevermind. If you try to pick useful names, you end up back with

my $pid = defined_or fork(), sub { die "Can't fork: $!" };

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2016-08-30 02:02 GMT
Find Nodes?
    Voting Booth?
    The best thing I ever won in a lottery was:

    Results (410 votes). Check out past polls.