in reply to Re^2: Why not use a local variable for $self in Moose?
in thread Why not use a local variable for $self in Moose?
No, your $self in global scope is just one variable that then gets overwritten every time you instantiate a new object. The old one automatically gets DESTROYed at that time.
Maybe consider just creating two objects of the same such class and watch what happens.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Why not use a local variable for $self in Moose?
by nysus (Parson) on Oct 19, 2018 at 07:14 UTC | |
by LanX (Saint) on Oct 19, 2018 at 07:40 UTC |