[Israel.pm] gettin module directory in script
Yuval Yaari
yuval at windax.com
Tue Oct 19 00:55:51 PDT 2004
Itamar Elem wrote:
>what i want is from the script
>to find what is the module path
>is there easy way to do it except
>than iterating @INC array and find the module location that way
>
%INC :)
#!/usr/bin/perl -w
use Some::Module; # lower case namespaces are reserved for pragmas
use Data::Dumper;
print Dumper(\%INC);
# or print $INC{'Some/Module.pm'}; - but don't rely on it.
I hope you understand that you're writing code to clean after your own
mess...
--Yuval
More information about the Perl
mailing list