subdir is a directory directly under my current directory and directory where the script resides. @INC contains '.' If I do the following...use subdir::Somemodule qw(%myhash); print join ("\n", keys %myhash), "\n"; __END__
Perl finds the module, but the import function is not called and %myhash in main is empty (which it is not in Somemodule.pm) However if I change the code above to the following...$>perl -I. import_test.pl
Everything is a-ok. Furthermore, if i change the code to be...use subdir::Somemodule; import Somemodule qw(%myhash); print join ("\n", keys %myhash), "\n"; __END__
And invoke perl as follows...# delete the 'subdir' from the use # use Somemodule qw(%myhash); print join ("\n", keys %myhash), "\n"; __END__
This also works. Any ideas? Here's the version of perl i'm running on Win 2000 Pro.$> perl -I 'subdir' importest.pl
Thanks in advance, jrThis is perl, v5.6.1 built for MSWin32-x86-multi-thread
In reply to Perl Bug? import function by jroberts
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |