data/TWiki/ClassMethod.txt
author Colas Nahaboo <colas@nahaboo.net>
Sat, 26 Jan 2008 15:50:53 +0100
changeset 0 414e01d06fd5
permissions -rw-r--r--
RELEASE 4.2.0 freetown
colas@0
     1
%META:TOPICINFO{author="TWikiContributor" date="1111929255" format="1.0" version="1"}%
colas@0
     2
%META:TOPICPARENT{name="ObjectMethod"}%
colas@0
     3
A ClassMethod is a method that must be called relative to the containing class object. This normally only applies to the =new= method used to create new object instances. For example,
colas@0
     4
colas@0
     5
---+ package Telecoms
colas@0
     6
---++ ClassMethod new()
colas@0
     7
colas@0
     8
<verbatim>
colas@0
     9
my $mobile = new Telecoms();
colas@0
    10
</verbatim>
colas@0
    11
or
colas@0
    12
<verbatim>
colas@0
    13
my $mobile = Telecoms->new();
colas@0
    14
</verbatim>
colas@0
    15
colas@0
    16
colas@0
    17
__Related Topics:__ DeveloperDocumentationCategory, StaticMethod, ObjectMethod