NAME

CLASS - Alias for __PACKAGE__

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

DESCRIPTION

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

$CLASS has the additional benefit of working in strings.

AUTHOR

Michael G Schwern <schwern@pobox.com>

SEE ALSO

perlmod(1)