CGI::Session::ErrorHandler(3pm)

CGI::Session::ErrorHandler3pm

Error handling routines for cgi::session

Usage

    require CGI::Session::ErrorHandler;
    @ISA = qw( CGI::Session::ErrorHandler );
    sub some_method {
        my $self = shift;
        unless (  $some_condition ) {
            return $self->set_error("some_method(): \$some_condition isn't met");
        }
    }

Overview

CGI::Session::ErrorHandler provides set_error() and errstr() methods for setting and accessing error messages from within CGI::Session's components. This method should be used by driver developers for providing CGI::Session-standard error handling routines for their code

Methods

set_error($message)

Implicitly defines $pkg_name::errstr and sets its value to $message. Return value is always undef.

errstr()

Returns whatever value was set by the most recent call to set_error(). If no message as has been set yet, the empty string is returned so the message can still concatenate without a warning.

Licensing

For support and licensing information see CGI::Session.

Releases

11 releases since Debian 4.0 (Etch); the text changed 7 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8
  6. 9–11
  7. 12–13
  8. Arch

From perl-cgi-session 4.49-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.