perl-diddler has asked for the wisdom of the Perl Monks concerning the following question:

I'm looking for more out of the death of my poor programs...

I want more than a simple confession -- i.e. while my 'subjects' usually confess when they 'expire', their ramblings, while tracing back their route in their final moments, don't give me much insight into what parameters influenced them to take that route.

They are less than effusive, with cryptic utterings like '<OBJECT>=HASH(0x1d64930)' and 'ARRAY(0x1d41518)', which I'm sure contain the secrets that lead to their death, if only they could be deciphered.

Unfortunately, without the context contained in their minds as they spout these codes, they are nothing more than random numbers.

I've used interrogation methods on live "subjects", like "Data::Dumper" to interpret such codes, when I've prepped the "subjects" sufficiently beforehand, and was wondering what it would take to equip my 'agents' with an enhanced confession that would decipher those cryptic parameters that accompanied their final path.

Is this something I would have to construct on my own from scratch, or does anyone know of such modular tools out in the great SPAN of C that might be of assistance in this task?

[In case the above wasn't clear! ;-) Anyone know of a confess that does a Data::Dumper equiv on the params that are displayed in a confess stack backtrace when a program dies? ;-) Hey, I'm trying for some artistic problem statement here! ]

Thanks much sistren and brethren of the "one true^h^h^h^h^h^h^h^h^h"infinitely diverse" Perl path....

Replies are listed 'Best First'.
Re: Expanded death option(s)?
by educated_foo (Vicar) on May 03, 2011 at 22:46 UTC
    Override die (*CORE::GLOBAL::die = \&mydie), then use caller to root around in the stack.