in reply to use x; equivalent
Might think of something else if indeed you had an import method defined in the package you are trying to import.import There is no builtin "import" function. It is just an ordinary method (subroutine) defined (or inherited) by modules that wish to export names to another module. The "use" function calls the "import" method for the package used. See also the use entry elsewhere in this document, the perlmod manpage, and the Exporter manpage.
package packg; 1;
And that is with Perl 5.6.1, which could also mean I cannot fully replicate your problem. Maybe include a sample of your package code?BEGIN { require packg; import packg; } print "ok\n";
|
---|