The key you require is "If EXPR is a bareword, the require assumes a ``.pm'' extension and replaces ``::'' with ``/'' in the filename for you, to make it easy to load standard modules. This form of loading of modules does not risk altering your namespace." (from require). See also %INC and @INC.
Update which doesn't actually say anything about it. However:
use lib ".\\"; print "$_\n" for @INC;
Prints:
.\ C:\Program Files\ActiveState Komodo 3.5\lib\support\dbgp\perllib C:/Perl/lib C:/Perl/site/lib .
On an XP system and:
print "$_ => $INC{$_}\n" for keys %INC; prints in part: IO/Socket/UNIX.pm => C:/Perl/lib/IO/Socket/UNIX.pm IO.pm => C:/Perl/lib/IO.pm Carp.pm => C:/Perl/lib/Carp.pm bytes.pm => C:/Perl/lib/bytes.pm DB/RedirectStdOutput.pm => C:\Program Files\ActiveState Komodo 3.5\lib +\support\dbgp\perllib/DB/RedirectStdOutput.pm
In reply to Re: Does %INC always have Unix-style paths?
by GrandFather
in thread Does %INC always have Unix-style paths?
by jthalhammer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |