Just another Perl shrine | |
PerlMonks |
Re: Why does $$self++ works?by davido (Cardinal) |
on Sep 28, 2018 at 13:48 UTC ( [id://1223230]=note: print w/replies, xml ) | Need Help?? |
This is a blessed scalar. Something like this:
A more typical constructor would bless a hashref:
(Neither of these have a sufficient level of error checking on their input paramaters, and are intended as a demonstration only.) But we'll look at the blessed scalar reference, as it's what is probably at play here. The last piece is this:
Dave
In Section
Seekers of Perl Wisdom
|
|