action(3pm) | User Contributed Perl Documentation | action(3pm) |
OpaL::action - Perl extension for easier handling of what information that should be presented when a action is made.
use OpaL::action qw(functionnames);
No functions or variables are exported automaticly so you have to specify them here.
OpaL::action is a module to allow some better bugtracking and information to be sent to the user/developer.
All functions are autoloaded so they will not be loaded into memory if you have not used them before.
There are 5 different levels of the information/action.
USAGE:
"setQuitLevel"(level);
USAGE:
"setErrorHandler"(\funcname);
USAGE:
"setDebugLevel"(level);
USAGE:
$foo =
"getQuitLevel";
USAGE:
$foo =
"getDebugLevel";
USAGE:
"pdebug"(level, "A sample
informational text." [,funcref]);
It will exit the program and print a message with the error level before if the action returns true and if the action_critic is lower or equal to the set error level.
If the debug level is high enough it will present the message but without the trailing error message.
USAGE:
"action"(some_action,
"A sample informational text about the action.",
how_critical [,funcref]);
The last parameter (how_critical) is optional.
It is almost identical to action(system"a command to execute", ...);
USAGE:
"cmdaction"("a command to
execute.",
"A sample informational text about the action.",
how_critical, how_quiet [,funcref]);
The two last parameter (how_critical) is optional. The last
parameter tells how quiet the executing command should be:
0 - extremely quiet (ie: >& /dev/null)
1 - quiet (ie: >& /dev/null)
2 - everything sent to stdout. =back
Ola Lundqvist <ola@inguza.com>
Hey! The above document had some coding errors, which are explained below:
2022-03-24 | perl v5.34.0 |