Ano-Tech Computers
Enter keyword:

Perl: Globally demote or handle die()
Problem:
When debugging a script which dies unexpectedly, it would sometimes be helpful to catch the die() and replace it with a warning so that variables etc. can be examined further.
 
Solution:
*CORE::GLOBAL::die = \&do_something_else
 
Discuss this solution
Did this article solve your problem? Yes No Did not apply

We welcome anyone who is willing to contribute to this public knowledge base, contact siteadmin@atc.no if you have information you would like to share. The idea is not to replace the commercial support sites, but to publish those hard-to-find solutions you've found yourself looking for over and over again.

Show all articles