This sub will return an accessor, storing value without knowing anything of object structure :)sub create_accessor { my $hash = {}; return sub { # accessor my ($self, $value) = "_æ return $value ? $hash{$self} : $hash{$self} = $value; } }
--
Sergey Martynoff
In reply to Re^4: A Class:: module I don't want to write
by Martynoff
in thread A Class:: module I don't want to write
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |