Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jplindstrom (594)

  (email not shown publicly)

Journal of jplindstrom (594)

Monday January 10, 2005
05:04 AM

Annoying Windows typo

[ #22640 ]

This is fairly annoying. Mentioned here for future reference. The filesystem in Windows isn't case sensitive, Perl doesn't care and the error message you get is "Subroutine x redefined".

Let's say you have My::ModuleName in My/ . This:

use My::ModuleName;
use My::Modulename;

loads the file twice because %INC contains the case sensitive loaded file. But on the file system this evaluates to the same file.

You could argue that Perl does what you say. Load the file with this name. Okay.

You could also argue that Perl doesn't do what you say. Load this module, once. Eeep!

Of course, the problem isn't that it is loaded twice, it's that the mistyped module name gets loaded at all.

Anyway the actually annoying thing with this is that the error message you get from this typo is

Subroutine new redefined at ../My/ line 58.

which doesn't really help you figure out exactly where you made the wrong turn if you don't already know that this is the cause.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.