in reply to Take reference and then dereference die() and warn()
Sorry, I might have missed something, but why would you need reference to die in the first place?
Can't you have simply something like this:
I guess it should work fine.if ($error) { $die_on_error ? die : warn->($error); }
If not in your case, you could define a "my_die" function:
and take a reference to my_die, or alternatively make it a coderef with something like this:sub my_die{die "I died\d"}
$my_die = sub {die};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Take reference and then dereference die() and warn()
by dmitri (Priest) on Nov 08, 2013 at 15:46 UTC | |
by Laurent_R (Canon) on Nov 08, 2013 at 17:28 UTC | |
by dmitri (Priest) on Nov 09, 2013 at 04:52 UTC | |
by Laurent_R (Canon) on Nov 09, 2013 at 10:27 UTC |