Server IP : 103.119.228.120 / Your IP : 13.59.205.182 Web Server : Apache System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : nobody ( 99) PHP Version : 5.6.40 Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/local/ssl/local/ssl/share/perl5/vendor_perl/TAP/ |
Upload File : |
package TAP::Object; use strict; use vars qw($VERSION); =head1 NAME TAP::Object - Base class that provides common functionality to all C<TAP::*> modules =head1 VERSION Version 3.28 =cut $VERSION = '3.28'; =head1 SYNOPSIS package TAP::Whatever; use strict; use vars qw(@ISA); use TAP::Object; @ISA = qw(TAP::Object); # new() implementation by TAP::Object sub _initialize { my ( $self, @args) = @_; # initialize your object return $self; } # ... later ... my $obj = TAP::Whatever->new(@args); =head1 DESCRIPTION C<TAP::Object> provides a default constructor and exception model for all C<TAP::*> classes. Exceptions are raised using L<Carp>. =head1 METHODS =head2 Class Methods =head3 C<new> Create a new object. Any arguments passed to C<new> will be passed on to the L</_initialize> method. Returns a new object. =cut sub new { my $class = shift; my $self = bless {}, $class; return $self->_initialize(@_); } =head2 Instance Methods =head3 C<_initialize> Initializes a new object. This method is a stub by default, you should override it as appropriate. I<Note:> L</new> expects you to return C<$self> or raise an exception. See L</_croak>, and L<Carp>. =cut sub _initialize { return $_[0]; } =head3 C<_croak> Raise an exception using C<croak> from L<Carp>, eg: $self->_croak( 'why me?', 'aaarrgh!' ); May also be called as a I<class> method. $class->_croak( 'this works too' ); =cut sub _croak { my $proto = shift; require Carp; Carp::croak(@_); return; } =head3 C<_confess> Raise an exception using C<confess> from L<Carp>, eg: $self->_confess( 'why me?', 'aaarrgh!' ); May also be called as a I<class> method. $class->_confess( 'this works too' ); =cut sub _confess { my $proto = shift; require Carp; Carp::confess(@_); return; } =head3 C<_construct> Create a new instance of the specified class. =cut sub _construct { my ( $self, $class, @args ) = @_; $self->_croak("Bad module name $class") unless $class =~ /^ \w+ (?: :: \w+ ) *$/x; unless ( $class->can('new') ) { local $@; eval "require $class"; $self->_croak("Can't load $class") if $@; } return $class->new(@args); } =head3 C<mk_methods> Create simple getter/setters. __PACKAGE__->mk_methods(@method_names); =cut sub mk_methods { my ( $class, @methods ) = @_; for my $method_name (@methods) { my $method = "${class}::$method_name"; no strict 'refs'; *$method = sub { my $self = shift; $self->{$method_name} = shift if @_; return $self->{$method_name}; }; } } 1;