Except the following happensIndeed, I've lamented this in Any last words?. The problem is due to the fact that the __DIE__ signal handler (and all signal handlers for that matter) only expect one argument, so if you ever pass more than one arg to die perl automagically concatenates the arguments. There is one way around it, but it is rather hackish - set $@ to an object and that will be passed to your $SIG{__DIE__} handler (consult the die docs for more info on this behaviour) e.g
Terrifically hackish, but it works ;)use overload q[""] => sub { "@{$_[0]}" }, fallback => 0; $SIG{__DIE__} = sub { print "dang - ", @{$_[0]}, $/ }; $@ = bless [qw/that didn't work/]; die; __output__ dang - thatdidn'twork that didn't work
_________
broquaint
In reply to Re: Argument stringification in __WARN__ and __DIE__
by broquaint
in thread Argument stringification in __WARN__ and __DIE__
by Rhandom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |