- or download this
package Object;
{
...
}
1;
- or download this
use Object
Object::pow( 2, 2 );
- or download this
use Object 'pow';
pow( 2,2 );
- or download this
Object->pow(2,2);
...
$obj->pow(2,2);
pow(2,2); # Exported or internal method call
- or download this
sub rmvObjRef
{
...
return @_;
}
- or download this
shift if ref $_[0] eq __PACKAGE || $_[0] eq __PACKAGE__;
- or download this
@_ = rmvObjRef( __PACKAGE__, @_ );
- or download this
package NumObject;
...
return NumObject + NumObject;
}
- or download this
my $num1 = NumObject->new();
my $num2 = NumObject->new();
NumObject::addObjects( $num1, $num2 );