NAME
Fred::Fish::DBUG::SignalKiller - A crazy extension module for Fred::Fish::DBUG.
SYNOPSIS
use Fred::Fish::DBUG::SignalKiller;
or
require Fred::Fish::DBUG::SignalKiller;
DESCRIPTION
All this module does is redirect Perl's core die method to a custom function. So that whenever die is called, it bypasses Perl's die function in favor of the one defined here by Fred::Fish::DBUG::SignalKiller.
You only need to use this module if you wish to tell Perl to basically ignore all calls to die. By running:
DBUG_TRAP_SIGNAL ("__DIE__", DBUG_SIG_ACTION_LOG, @funcs);
After sourcing in this module, and making the above call to DBUG_TRAP_SIGNAL, any calls to die or croak will log this request to fish, call the provided custom functions, and then return control to your program as if the call to die or croak were just like any other function you called. Basically causing your code to ignore eval or try/catch logic. Breaking a lot of logic in many, many modules that depend on it.
Needless to say this isn't really recomended. But if you really, really want to do this, just source in this module and then use the DBUG_SIG_ACTION_LOG action for die will work this way. Otherwise if you don't source in this module it will behave exactly the same as DBUG_SIG_ACTION_DIE instead.
I repeat again, you really, really don't want to use this module. But if you do, it's your funeral.
WHAT ABOUT THE OTHER ACTIONS FOR DIE?
All the other actions for die work the same whether you source in this module or not. So why bother.
WHAT ABOUT THE OTHER SIGNALS?
All the other signals work the same whether you source in this module or not. Except if you use DBUG_SIG_ACTION_DIE to trigger a call to die and you've told die to use DBUG_SIG_ACTION_LOG. In that case please reread the DESCRIPTION for what's going to happen. It's not pretty.
SEE ALSO
Fred::Fish::DBUG - The controlling module for this set of modules. The one you should be using.
Fred::Fish::DBUG::ON - The live version of the fish module.
Fred::Fish::DBUG::OFF - The stub version of the fish module.
Fred::Fish::DBUG::TIE - Allows you to trap and log STDOUT/STDERR to fish.
Fred::Fish::DBUG::Signal - Handles the trapping and logging all signals to fish.
Fred::Fish::DBUG::Tutorial - Sample code demonstrating using the fish module.
COPYRIGHT
Copyright (c) 2019 - 2024 Curtis Leach. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.