GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  CLASS (3)

.ds Aq ’

NAME

CLASS - Alias for __PACKAGE__

CONTENTS

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.

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)

AUTHOR

Michael G Schwern <schwern@pobox.com>

LICENSE

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

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

SEE ALSO

perlmod(1)
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 CLASS (3) 2006-10-10

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.