Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

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 avoiding work at the Monastery: (10)
As of 2016-10-26 15:57 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (344 votes). Check out past polls.