$o = new Module; $o->method; package Module; { my %obj; sub new { my $class = shift; my $self = {@_}; bless $self, ref($class) || $class; $obj{"$self"} = { say => "Hello World"}; $self; } sub method { my $self = shift; my $obj = $obj{"$self"}; return $obj->{say}; } DESTROY { my $self = shift; delete $obj{"$self"}; } }
In reply to What is HASH(0x17653d4) for? by Tetramin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |