- or download this
use vars qw( $ERROR );
...
return;
}
sub errstr { ref($_[0]) ? $_[0]->{_errstr} : $ERROR }
- or download this
return $obj->error("Got an error") unless $foo; ## OR
return $class->error("Got an error") unless $foo;
- or download this
$obj->foo or die $obj->errstr; ## OR
My::Class->foo or die My::Class->errstr;