- or download this
#!/usr/bin/perl
...
my ( $self ) = @_;
return $self -> {state};
}
- or download this
# use_oo.pl
#!/usr/bin/perl
...
print "Object is: ", $object_instance,"\n";
$object_instance -> set_state ( "here is a new state" );
print "Object state: ", $object_instance -> get_state(),"\n";
- or download this
MyObject=HASH(x012345)
- or download this
$object_instance -> set_state ( "here is a new state" );
- or download this
MyObject::set_state ( $object_instance, "here is a new state" );