Difference: ObjectMethod (2 vs. 3)

Revision 32010-06-24 - TWikiContributor

Changed:
<
<
An ObjectMethod is a method that must be called relative to a previous constructed object of the class type. For example:
>
>

Object Method

 
Added:
>
>
An ObjectMethod is a method that must be called relative to a previous constructed object of the class type. For example:
 

package Telecoms

Changed:
<
<

ClassMethod new()

ObjectMethod phone( $who )

>
>

ClassMethod new()

ObjectMethod phone( $who )

  must be called something like this

my $mobile = new Telecoms();
$mobile->phone( "home" );
or you can pass the object in as a parameter if you need to:
Telecoms::phone( $mobile, "home" );

Related Topics: ClassMethod, StaticMethod, DeveloperDocumentationCategory

Deleted:
<
<
 
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.ObjectMethod.