action(3pm)

πŸ“¦
version 0.2.2.1build1 Β· 3 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– action(3pm) β€” the OpaL::action glow-up πŸ’–

okay bestie, gather round, because this is the action(3pm) page from the User Contributed Perl Documentation and it's genuinely serving bug-tracking realness. let's get into it. ✨


🌸 NAME 🌸

OpaL::action β€” a Perl extension for easier handling of what information that should be presented when a action is made. periodt.


✨ SYNOPSIS ✨

  use OpaL::action qw(functionnames);

No functions or variables are exported automaticly so you have to specify them here. no cap, you gotta ask for them by name. πŸ™ˆ


πŸ¦‹ DESCRIPTION πŸ¦‹

OpaL::action is a module to allow some better bugtracking and information to be sent to the user/developer. it's giving "we're gonna tell you what went wrong and how bad it was." πŸ’…

All functions are autoloaded so they will not be loaded into memory if you have not used them before. lazy-loading icon behavior, honestly. πŸŽ€

There are 5 different levels of the information/action:

  1. critical
  2. error
  3. warning
  4. message
  5. debug

πŸ‘‘ FUNCTIONS πŸ‘‘

setQuitLevel

You can set on what errorlevel the program should exit if an error occur. The default level is 2 and you canges it like this:

USAGE:

    "setQuitLevel"(level);

setErrorHandler

You can set an alternative error handler function (no arguments). The default one is exit.

USAGE:

    "setErrorHandler"(\funcname);

setDebugLevel

You can set on what errorlevel the program should output messages if an error occur. The debug level indicates what type of information that should be presented to the user.

USAGE:

    "setDebugLevel"(level);

getQuitLevel

You can set on what errorlevel the program should exit if an error occur.

USAGE:

    $foo = "getQuitLevel";

getDebugLevel

You can get the debuglevel on which the program should output messages, if an error occurs.

USAGE:

    $foo = "getDebugLevel";

pdebug

You can set on what errorlevel the program should exit if an error occur. With the pdebug method you can present information and mark it with a debuglevel using:

USAGE:

    "pdebug"(level, "A sample informational text." [,funcref]);

action

With this function you can handle and print a message if a function does not work correctly.

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.

cmdaction

Actually the same as action with the difference that it executes a external command instead.

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
πŸ’€ note: yes, that =back is just sitting there in the original. we don't ask questions. we just report. fr fr.

🌈 AUTHOR 🌈

Ola Lundqvist <ola@inguza.com>


⭐ SEE ALSO ⭐

perl(1).


😭 POD ERRORS 😭

Hey! The above document had some coding errors, which are explained below:

Around line 415:

    You forgot a '=back' before '=head1'

and that's the whole vibe check, bestie 🫢 this page is from perl v5.40.1, dated 2025-12-17 β€” slay, stay critical, and may your error levels always be debugged. πŸ’œπŸŒΈ

πŸ“¦ where this page comes from