in reply to PERL modules named differently than the package won't export
The problem is that if you use a different name in the use statement than what you have named the package, Perl will try to call the import method on the wrong package. In your case, it tries to call Utils1->import, and, as there is no such package/method, nothing is being called and consequently nothing imported.
So don't do this. Or if you really want to, make the appropriate import call yourself. I.e. instead of use Utils1, write:
BEGIN { require Utils1; Utils->import; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: PERL modules named differently than the package won't export
by kovacsbv (Novice) on May 15, 2012 at 16:44 UTC |
In Section
Seekers of Perl Wisdom