This is counter-intuitive since one expects to pass a LIST and get the same at the other end. While I am aware that signal handlers traditionally only take a single argument, this particular caveat is not explained in the docs (although it alludes to taking a single argument, as the example code always used $_[0] when referring to the arguments). Also, I'm fairly sure this is consistent across all platforms since the concatenation is hard-coded in the perl source (i.e no platform dependent #ifdef's).use strict; $SIG{'__DIE__'} = sub { local $" = ', '; # this will have no effect on @errs my @errs = @_; print "$0: @errs"; exit(1); }; die('foo', {'bar' => 'xxx'}, ['baz','quux']); __END__ output - die.pl: fooHASH(0x80f9964)ARRAY(0x810a014) at die.pl line 9.
So this is not so much a bug (as I first thought it might be) as an inconsistency between the documentation and the code. Perhaps some wisened monks out there could enlighten me as to the purpose of this 'feature' ...
broquaint
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Any last words?
by Anonymous Monk on Nov 23, 2001 at 02:22 UTC | |
Re: Any last words?
by pike (Monk) on Nov 23, 2001 at 15:03 UTC |