in reply to Re^2: How do I curtail the noise
in thread How do I curtail the noise

Perl uses %INC to keep track of require'd files. On case-insensitive file systems, you can load the same file under more than one name. For example:

use Strict;

loads strict.pm but never calls its import method.

Replies are listed 'Best First'.
Re^4: How do I curtail the noise
by talexb (Chancellor) on Jul 14, 2010 at 14:47 UTC

    And is it useful to be able to have a strict.pm?

    I note that putting

    use Carp; use carp;
    in a module isn't flagged by perlcritic. Should this be an error, either of style or of syntax?

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

      There is no use to having Perl load "both" Strict.pm and strict.pm, especially if they both end up being the same file on some filesystems. But that that's possible is a side effect of hash keys (like in %INC) being case-sensitive and file systems sometimes being case-insensitive. I can't come up with a useful use for that.

      Having two modules whose names only differ in case is non-portable at least, and in my opinion could always be flagged as a potential error. But then, I avoid Perl::Critic, so I wouldn't know how to implement it.