Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: undef is undef

by andye (Curate)
on Aug 29, 2012 at 13:42 UTC ( #990471=note: print w/replies, xml ) Need Help??


in reply to undef is undef

this works, but it's not pretty:

use strict; use warnings; #set up a pretend subref inside some other stuff my $bar = {foo => [ sub {print "fishcake"}]}; { no warnings "uninitialized"; # we're going to be a bit naughty in t +his block ($bar->{potato}->[0] or sub {return undef})->() } # swap this for # ($bar->{foo}->[0] or sub {return undef})->() # and see what happens

if you use that then if I were you I'd comment it liberally, and possibly surround it with bio-hazard marker tape.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://990471]
help
Chatterbox?
[stevieb]: one of my long-running Perl procs crashes with a segfault (because it wraps C code) is crashing after an hour or so... seeing if wrapping the cli call with valgrind will produce something useful

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2017-04-29 03:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (531 votes). Check out past polls.