in reply to Re: Module name case typo silent failure
in thread Module name case typo silent failure

... file an error with perlbug.

Having a case-preserving but case-insensitive file system is another wonderful feature of Windows. Perl tries to be OS-agnostic, but there's only so much a humble program can do. The fact that this problem has not been addressed so far suggests to me that it's very difficult or impossible to deal with in this particular OS. Can you think of a way?


Give a man a fish:  <%-{-{-{-<

Replies are listed 'Best First'.
Re^3: Module name case typo silent failure
by LanX (Saint) on Sep 19, 2019 at 20:53 UTC
    > Can you think of a way?

    IMHO the problem is at another place.

    It's OK that ->import() is not required to exist inside a package (or let's say I doubt that this can be changed in a backwards compatible way).

    But trying to call a method on a non-existing package could fail. I.e. use could check if the MODULE-name exists in the right capitalization after require.*

    But for reasons that I do not understand yet does require auto-vivify the misspelled package.

    DB<7> require DaTa::DuMpEr DB<8> x grep {/dumper/i} %DaTa:: 0 'DuMpEr::' 1 *DaTa::DuMpEr:: DB<9>

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

    *) or if it exists twice in different capitalizations.