in reply to die hooks, signal handlers and eval, all mixed up

As tye already said you should better use eval. I fully agree with him.

If you fill that you really need DIE handler (actually very unlikely) you can try to use well-placed localized DIE handlers as suggested Zaxo (i.e. in scopes where you do not call any modules - which limits seriously applicability of this advice) but probably it is better to use module Sig::PackageScoped which allows to do completly crazy things like package scoped DIE and WARN handlers. If you will use this module be sure to pay attention to its docs

--
Ilya Martynov (http://martynov.org/)

  • Comment on Re: die hooks, signal handlers and eval, all mixed up