in reply to Re: Why not use a local variable for $self in Moose?
in thread Why not use a local variable for $self in Moose?
Ah, OK. So I understand what you are saying but I'm not quite sure why it is so. I don't have a clear idea of how memory gets allocated for a class. How does $self get assigned to the same exact memory location every time a new object is created? I guess this happens when the compiler sets up a "prototype" (for lack of a better word) for the object class?
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Why not use a local variable for $self in Moose?
by haj (Vicar) on Oct 19, 2018 at 07:46 UTC | |
|
Re^3: Why not use a local variable for $self in Moose?
by haukex (Archbishop) on Oct 19, 2018 at 08:12 UTC | |
|
Re^3: Why not use a local variable for $self in Moose?
by Corion (Patriarch) on Oct 19, 2018 at 06:52 UTC | |
by nysus (Parson) on Oct 19, 2018 at 07:14 UTC | |
by LanX (Saint) on Oct 19, 2018 at 07:40 UTC |