AnonSec Team
Server IP : 82.165.83.148  /  Your IP : 216.73.217.113
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : u67745506 ( 4824611)
PHP Version : 7.0.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF
Directory (0755) :  /etc/../lib/python2.7/../../share/awk/../perl5/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //etc/../lib/python2.7/../../share/awk/../perl5/CLASS.pm
package CLASS;

use 5.004;

$VERSION = '1.00';

BEGIN { 
    # Faster than 'use constant'.  Load time critical.
    # Must eval to make $] constant.
    *PERL_VERSION = eval qq{ sub () { $] } };
}

sub import {
    my $caller = caller;
    *{$caller.'::CLASS'} = \$caller;

    # This logic is compiled out.
    if( PERL_VERSION >= 5.008 ) {
        # 5.8.x smart enough to make this a constant.
        *{$caller.'::CLASS'} = sub () { $caller };
    }
    else {
        # Make CLASS a constant.
        *{$caller.'::CLASS'} = eval qq{ sub () { q{$caller} } };
    }
}


=head1 NAME

CLASS - Alias for __PACKAGE__


=head1 SYNOPSIS

  package Foo;
  use CLASS;

  print CLASS;                  # Foo
  print "My class is $CLASS\n"; # My class is Foo

  sub bar { 23 }

  print CLASS->bar;     # 23
  print $CLASS->bar;    # 23


=head1 DESCRIPTION

CLASS and $CLASS are both synonyms for __PACKAGE__.  Easier to type.

$CLASS has the additional benefit of working in strings.


=head1 NOTES

CLASS is a constant, not a subroutine call.  $CLASS is a plain
variable, it is not tied.  There is no performance loss for using
CLASS over __PACKAGE__ except the loading of the module. (Thanks
Juerd)


=head1 AUTHOR

Michael G Schwern <schwern@pobox.com>


=head1 LICENSE

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

See L<http://www.perl.com/perl/misc/Artistic.html>


=head1 SEE ALSO

L<perlmod(1)>

=cut


1;

AnonSec - 2021