CGI::Se...Handler(3)

πŸ’– CGI::Session::ErrorHandler πŸ’–

okay bestie, so this is the manual page for CGI::Session::ErrorHandler, from the User Contributed Perl Documentation corner of the universe ✨ (yes, that parenthetical is the manual name, we're folding it in, don't @ me).


🌸 NAME 🌸

CGI::Session::ErrorHandler β€” the error-handling routines for CGI::Session, periodt πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

like, here's the whole vibe in code form, copy it exactly bestie:

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");
    }
}

✨ DESCRIPTION ✨

so CGI::Session::ErrorHandler literally provides the set_error() and errstr() methods β€” one for setting error messages and one for accessing them β€” from inside CGI::Session's components 🫢

and listen, this one's a note for the driver developers out there: you should be using this method to give your code CGI::Session-standard error handling routines. like, that's the whole assignment, iykyk πŸ‘‘


πŸŽ€ METHODS πŸŽ€

  • set_error($message) β€” implicitly defines $pkg_name::errstr and sets its value to $message. the return value is always undef, no cap, every single time πŸ’€
  • errstr() β€” returns whatever value was set by the most recent call to set_error(). and if no message has been set yet? you get the empty string back, so the message can still concatenate without a warning 🌈 (yes, that's a real feature, not a bug, slay)

πŸ‘‘ LICENSING πŸ‘‘

for support and licensing information, go peek at CGI::Session πŸ’œ


🌸 k bye bestie, that's the whole page 🌸

this little icon was brought to you by perl v5.42.2, dated 2026-07-28 β€” same energy as the original footer, just with more sparkle βœ¨πŸ’–βœ¨

πŸ“¦ where this page comes from