So how was the OP getting a subroutine redefined error in the first place if the import wasn't getting called?
File/Basename.pm and File/BaseName.pm are both loaded, which on Windows is the same file. Both times it loads its definitions into the same namespace: File::Basename. It's there that the subs are defined twice.
Just remember the rule of thumb: filenames are case insensitive on Windows, but package names still are case sensitive.
p.s. tye has created a patch to UNIVERSAL.pm a long time ago, the package all packages inherit from (which matters for import) so your Windows system would catch misused case: Universally unimportant and overused
In reply to Re^5: An Interesting Gotcha With use/require
by bart
in thread An Interesting Gotcha With use/require
by periapt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |