Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: why am I getting odd behavior on DESTROYby Corion (Patriarch) |
on Mar 20, 2015 at 09:39 UTC ( [id://1120721]=note: print w/replies, xml ) | Need Help?? |
Adding
after
will make Perl point out your error. You (re)use a global variable $self in various places in that package. This is actually a point where the new signatures feature (only available in 5.20+) could be useful as it makes it easier to avoid accidentially using global variables. On the other hand, you can still forget to list $self in the formal parameters of your subroutine...
In Section
Seekers of Perl Wisdom
|
|