Razor2:...handler(3)
π NAME π
okay so bestie, this is the Razor2:...handler(3) page from User Contributed Perl Documentation β¨ and it's literally about Razor::Errorhandler - Error handling mechanism for Razor. periodt π
β¨ SYNOPSIS β¨
here's the whole vibe in code, no cap:
package Foo;
use Razor::Errorhandler;
@ISA = qw(Razor::Errorhandler);
sub alive {
..
..
return
$self->error ("Awake, awake! Ring the alarum bell! \
Murther and treason!", $dagger)
if $self->murdered($king);
}
package main;
use Foo;
my $foo = new Foo;
$foo->alive($king) or print $foo->errstr();
# prints "Awake, awake! ... "
π¦ DESCRIPTION π¦
okay so Razor::Errorhandler encapsulates the error handling mechanism used by the modules in Razor bundle. it doesn't have a constructor and is meant to be inherited β no constructor main character energy here, just inheritance realness. the derived modules use its two methods, error() and errstr(), to communicate error messages to the caller. π«Ά
when a method of the derived module fails, it calls $self->error() and returns to the caller. the error message passed to error() is made available to the caller through the errstr() accessor. error() also accepts a list of sensitive data that it wipes out (undef'es) before returning. π₯
bestie, listen: the caller should never callerrstr()to check for errors. no cap.errstr()should be called only when a method indicates (usually through anundefreturn value) that an error has occured. this is becauseerrstr()is never overwritten and will always contain a value after the occurance of first error. π
π METHODS π
error($mesage, ($wipeme, $wipemetoo))
the first argument to error() is $message β and yes, the signature says $mesage with one s, that's the original spelling, iykyk π β which is placed in $self->{errstr}, and the remaining arguments are interpretted as variables containing sensitive data that are wiped out from the memory. error() always returns undef. slay. β¨
errstr()
errstr() is an accessor method for $self->{errstr}. it's giving simple accessor, and honestly? iconic. π
π AUTHOR π
Vipul Ved Prakash, <mail@vipul.net> β author behavior, periodt. π
π₯ SEE ALSO π₯
Razor::Client(3)β go peek, bestie. π«Ά
this page is from perl v5.44.0, dated 2026-10-17, and it's the Razor2:...handler(3) page β bye bestie, slay your error handling π
β¨
π¦ where this page comes from
- arch rolling: razor 2.88-2 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms