nysus has asked for the wisdom of the Perl Monks concerning the following question:
return if $self->{_init}{__PACKAGE__}++;sub _init { my ($self, %args) = @_;
</code> I think I'm overloaded with too much Perl because I am completely missing how this simple code works. Apparently, the above syntax creates an attribute for the object, causing a return out of the current subroutine if the attribute is non-zero. But how does throwing a class, {__PACKAGE__}, on the right side of an object method call, $self->{_init}, create an attribute?... }
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop";
$nysus = $PM . $MCF;
Click here if you love Perl Monks
|
|---|