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;
In reply to Re: GLOBAL VARIABLE HANDLING
by Corion
in thread GLOBAL VARIABLE HANDLING
by kaushal_k1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |