pjcj / Devel--Cover

Code coverage metrics for Perl
http://www.pjcj.net/perl.html
93 stars 89 forks source link

-blib switch breaks Devel::Hide operation #249

Open eserte opened 4 years ago

eserte commented 4 years ago

If Devel::Cover is activated, and -blib mode is enabled, then Devel::Hide does not hide modules anymore. To reproduce the problem, try the following, best in an empty directory. First the working setup without -blib:

$ env PERL5OPT=-MDevel::Cover perl -MDevel::Hide=Math::Trig -e 'use Math::Trig'
Devel::Hide hides Math/Trig.pm
Can't locate Math/Trig.pm (hidden)
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

If blib mode is enabled (either with the -blib switch or by creating a "blib" subdirectory), then Devel::Hide is effectless:

$ PERL5OPT=-MDevel::Cover=-blib,1 perl -MDevel::Hide=Math::Trig -e 'use Math::Trig'
Devel::Hide hides Math/Trig.pm