| CGI-MxScreen documentation | view source | Contained in the CGI-MxScreen distribution. |
CGI::MxScreen::Action_Env - Action callback error context
# Not meant to be created directly
sub action { # an action callback
my $env = pop @_; # the Action_Env error context
my @args = @_;
return CGI_MX_OK if $env->error_count;
...
return CGI_MX_OK;
}
Instances of this class are used to record failed actions during the processing of button callbacks. They are given as the last parameter of each action callback, and must therefore be retrieved with:
my $env = pop @_;
This object can be queried for the error_count (to avoid any further
action processing if an error was detected, for instance), or for the
full error_list, wich tracks a list of
[$object, $routine, [args]]
Those are the callbacks that were called and which returned an error condition (see CGI::MxScreen::Error for a list of allowed returned values).
This object is also passed as last argument to dynamic error trapping callbacks, so that a proper screen destination can be derived from the errors, if needed.
See CGI::MxScreen::Form::Button for more information on action callback and dynamic error trapping.
The original authors are Raphael Manfredi <Raphael_Manfredi@pobox.com> and Christophe Dehaudt <Christophe.Dehaudt@teamlog.fr>.
Send bug reports, suggestions, problems or questions to Jason Purdy <Jason@Purdy.INFO>
CGI::MxScreen::Error(3), CGI::MxScreen::Form::Button(3).
| CGI-MxScreen documentation | view source | Contained in the CGI-MxScreen distribution. |