|Think about Loose Coupling|
yes, this is a nasty one indeed. as we all know, Perl is case sensitive, but the Windows filesystem not. what happens here is that Perl stores information about the modules it has loaded in its %INC hash, and it ends up having two entries for Subclass1. if you add these lines at the end of the bla.pl script:
you'll see something like:
so, the file is one but Perl sees (and loads) two modules. this could also pose serious problems with imported symbols, because when the case of the package name doesn't match, Perl loads the .pm file but doesn't export anything, as in:
this is even more unobvious, because the error goes unnoticed until you try to use something that's exported from the module.
unfortunately, Perl can't possibly catch this sort of errors, so you have to watch your case. one possible solution (for the typo-prone individuals :-) could be to always cut & paste the use line from the SYNOPSIS found in the module documentation.
King of Laziness, Wizard of Impatience, Lord of Hubris
In reply to Re: Windows pitfall: Subroutine redefined with use Modul