DCPM: body bags

Steve Marvell steve at devon-it.co.uk
Fri Oct 31 04:54:43 CST 2003


On the subject of "what do I do with a die from a module way way down
the chain of command?":

#!/usr/bin/perl

local $SIG{__DIE__} = sub { 
  die "You killed Kenny! @_";
};

die "you bastard";

Be careful not to exit() in these handlers, since that really break
thing when someone evals it and expects to catch the dies.

I suppose evaling your call and checking $@ might be a good way of
handling this situation too.

There's a bit more in perlvar.

Steve



More information about the Devoncornwall-pm mailing list