in reply to GLOBAL VARIABLE HANDLING
You never call mypkg->new(). Why do you expect initialization to happen if you never call it?
If you want the initialization to always happen automatically, call mypkg->new() from within mypkg:
package mypkg; use strict; sub new { ... }; ... mypkg->new(); 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: GLOBAL VARIABLE HANDLING
by kaushal_k1 (Novice) on Jul 26, 2011 at 15:03 UTC |