sub Foo::address : lvalue { my $self = shift; $self->{address} }; ... my $f = Foo::new; $f->address = "123 main street"; print $f->address;
-- Randal L. Schwartz, Perl hacker
In reply to Re: Uses for an lvalue subroutine
by merlyn
in thread Uses for an lvalue subroutine
by bent
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |