in reply to Calling module function from within a blessed module
You are using the one argument version of bless.
sub new { return bless {}; }
Never, ever, ever do this. The one argument version of bless really should issue a warning.
Do this:
sub new { my $class = shift; return bless( {}, $class ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Calling module function from within a blessed module
by Bod (Parson) on Jan 03, 2021 at 11:57 UTC | |
by dsheroh (Monsignor) on Jan 03, 2021 at 12:45 UTC |