|
Posted by David Worenklein on November 30, 2007, 1:49 pm
Please log in for more thread options
Try this. test.pl is being loaded before the "package" line, yet it
is evaluating within the package. Why would that be? Thanks.
use test;
<<<test.pm>>>
print __FILE__, ":", __LINE__, " - package is ", __PACKAGE__, "\n";
require "test2.pl";
print __FILE__, ":", __LINE__, " - package is ", __PACKAGE__, "\n";
package test;
1;
<<<test2.pl>>>
print __FILE__, ":", __LINE__, " - package is ", __PACKAGE__, "\n";
1;
Here's what I get:
test.pm:1 - package is main
test2.pl:1 - package is test <<==== Expected this to say main
test.pm:3 - package is main
|