Ming Qian wrote:
I encounter some code as follows, and can not understand. Would someone help
me?
use constant 'cache_result' => {};
sub abc {
............
...........
return cache_result->{$self->name};
}
What does this mean?
perl -e'
use constant cache_result => {};
sub name { print "<$_>\n" for @_; die }
my $self= __PACKAGE__;
sub abc { return cache_result->{ $self->name } }
abc();
'
<main>
Died at -e line 4.
--
Ruud
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/