in reply to why am I getting odd behavior on DESTROY
Adding
use strict;
after
package it_item;
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...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: why am I getting odd behavior on DESTROY
by einhverfr (Friar) on Mar 20, 2015 at 13:28 UTC | |
by einhverfr (Friar) on Mar 23, 2015 at 10:26 UTC | |
by marinersk (Priest) on Mar 20, 2015 at 14:41 UTC | |
Re^2: why am I getting odd behavior on DESTROY
by einhverfr (Friar) on Mar 20, 2015 at 10:09 UTC | |
by GrandFather (Saint) on Mar 20, 2015 at 10:18 UTC |