Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

opal::action(3pm) [debian man page]

action(3pm)						User Contributed Perl Documentation					       action(3pm)

NAME
OpaL::action - Perl extension for easier handling of what information that should be presented when a action is made. SYNOPSIS
use OpaL::action qw(functionnames); No functions or variables are exported automaticly so you have to specify them here. DESCRIPTION
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. 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 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' perl v5.10.1 2009-04-21 action(3pm)

Check Out this Related Man Page

Jifty::Action::Record::Create(3pm)			User Contributed Perl Documentation			Jifty::Action::Record::Create(3pm)

NAME
Jifty::Action::Record::Create - Automagic creation action DESCRIPTION
This class is used as the base class for Jifty::Actions that are merely creating Jifty::Record objects. To use it, subclass it and override the "record_class" method to return the name of the Jifty::Record subclass that this action creates. METHODS
arguments Set the default value in each of the fields to whatever the default of the column is in the model take_action Overrides the virtual "take_action" method on Jifty::Action to call the appropriate "Jifty::Record"'s "create" method when the action is run, thus creating a new object in the database. The "id" of the new row is returned in the "id" content of the Jifty::Result for the action. You can use this in conjunction with request mapping in order to give later parts of the request access to the "id". create_record This method actually performs the call to "record->create". It receives as arguments the parameter hash and should return the message for the user, indicating success or failure. report_success Sets the "message" in Jifty::Result to default success message, "Created". Override this if you want to report some other more user- friendly result. possible_columns Create actions do not provide fields for columns marked as "private" or "protected". _extra_validator_args Passes "for => 'create'" to validators. _extra_canonicalizer_args Passes "for => 'create'" to canonicalizers. _extra_autocompleter_args Passes "for => 'create'" to autocompleters. SEE ALSO
Jifty::Action::Record, Jifty::Record LICENSE
Jifty is Copyright 2005-2010 Best Practical Solutions, LLC. Jifty is distributed under the same terms as Perl itself. perl v5.14.2 2010-12-10 Jifty::Action::Record::Create(3pm)
Man Page