- or download this
my $object = bless($reference, "MyClass");
- or download this
sub bless {
my ($reference, $class) = @_;
$reference->{class_name} = $class;
return $reference;
}
- or download this
$object->some_function($arg1);
- or download this
$object->{class_name}::some_function($object, $arg1);
- or download this
MyClass::some_function($object, $arg1);