Windows NT KAMIDAKI 10.0 build 19045 (Windows 10) AMD64
Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.3.9
Server IP : 192.168.3.16 & Your IP : 216.73.216.204
Domains :
Cant Read [ /etc/named.conf ]
User : SISTEMA
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
C: /
xampp /
perl /
vendor /
lib /
Class /
Delete
Unzip
Name
Size
Permission
Date
Action
Accessor
[ DIR ]
drwxrwxrwx
2024-07-26 17:38
C3
[ DIR ]
drwxrwxrwx
2024-07-26 17:38
Data
[ DIR ]
drwxrwxrwx
2024-07-26 17:38
Inspector
[ DIR ]
drwxrwxrwx
2024-07-26 17:38
Load
[ DIR ]
drwxrwxrwx
2024-07-26 17:38
MOP
[ DIR ]
drwxrwxrwx
2024-07-26 17:38
Method
[ DIR ]
drwxrwxrwx
2024-07-26 17:38
C3.pm
18.06
KB
-rw-rw-rw-
2020-11-09 08:20
ErrorHandler.pm
2.38
KB
-rw-rw-rw-
2015-05-11 02:08
Inspector.pm
18.19
KB
-rw-rw-rw-
2019-07-19 16:35
Load.pm
11.27
KB
-rw-rw-rw-
2018-06-11 00:55
Loader.pm
5.61
KB
-rw-rw-rw-
2005-04-28 03:55
LoaderTest.pm
648
B
-rw-rw-rw-
2001-05-02 06:01
MOP.pm
38.3
KB
-rw-rw-rw-
2020-12-19 02:06
Singleton.pm
12.36
KB
-rw-rw-rw-
2020-12-02 10:37
Tiny.pm
16.97
KB
-rw-rw-rw-
2020-09-04 18:04
Save
Rename
# $Id: ErrorHandler.pm,v 1.1.1.1 2004/08/15 14:55:43 btrott Exp $ package Class::ErrorHandler; use strict; use vars qw( $VERSION $ERROR ); $VERSION = '0.04'; sub error { my $msg = $_[1] || ''; if (ref($_[0])) { $_[0]->{_errstr} = $msg; } else { $ERROR = $msg; } return; } sub errstr { ref($_[0]) ? $_[0]->{_errstr} : $ERROR } 1; __END__ =for stopwords errstr =head1 NAME Class::ErrorHandler - Base class for error handling =head1 SYNOPSIS package Foo; use base qw( Class::ErrorHandler ); sub class_method { my $class = shift; ... return $class->error("Help!") unless $continue; } sub object_method { my $obj = shift; ... return $obj->error("I am no more") unless $continue; } package main; use Foo; Foo->class_method or die Foo->errstr; my $foo = Foo->new; $foo->object_method or die $foo->errstr; =head1 DESCRIPTION I<Class::ErrorHandler> provides an error-handling mechanism that's generic enough to be used as the base class for a variety of OO classes. Subclasses inherit its two error-handling methods, I<error> and I<errstr>, to communicate error messages back to the calling program. On failure (for whatever reason), a subclass should call I<error> and return to the caller; I<error> itself sets the error message internally, then returns C<undef>. This has the effect of the method that failed returning C<undef> to the caller. The caller should check for errors by checking for a return value of C<undef>, and calling I<errstr> to get the value of the error message on an error. As demonstrated in the L<SYNOPSIS>, I<error> and I<errstr> work as both class methods and object methods. =head1 USAGE =head2 Class->error($message) =head2 $object->error($message) Sets the error message for either the class I<Class> or the object I<$object> to the message I<$message>. Returns C<undef>. =head2 Class->errstr =head2 $object->errstr Accesses the last error message set in the class I<Class> or the object I<$object>, respectively, and returns that error message. =head1 LICENSE This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHOR & COPYRIGHT Except where otherwise noted, I<Class::ErrorHandler> is Copyright 2004 Benjamin Trott, cpan@stupidfool.org. All rights reserved. =cut