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

> One might argue that the non-existence of the package Time::Hires should raise an error, probably you should file an error with perlbug.

not sure what is happening there, something creates the wrong namespace %Time::Hires:: after a require

DB<1> x grep {/hires/i} %Time:: empty array DB<2> require Time::Hires DB<3> x grep {/hires/i} %Time:: 0 'HiRes::' 1 *Time::HiRes:: 2 'Hires::' 3 *Time::Hires:: DB<4>

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

Replies are listed 'Best First'.
Re^3: Module name case typo silent failure
by Haarg (Priest) on Sep 19, 2019 at 22:53 UTC

    The stash is created when parsing the require function. It doesn't even have to be run. This generally doesn't matter but can have an impact on things like indirect method calls.

    Existence of a stash isn't really a useful concept though. Too many things can lead to a stash existing, including loading a sub-package (loading Blurf::Guff would cause the Blurf:: stash to exist).

      > Existence of a stash isn't really a useful concept though.

      I think it's good enough for just another "possible typo" warning.

      Especially if the stash HiRes:: is created after requiring the module Hires which resolved to the file HiRes.pm .

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