my $extras_load_warned;
+our $Smells_Like_VCS = -e '.git' || -e '.svn';
+
sub import {
strict->import;
warnings->import(FATAL => 'all');
$ENV{PERL_STRICTURES_EXTRA};
} elsif (! _PERL_LT_5_8_4) {
!!((caller)[1] =~ /^(?:t|xt|lib|blib)/
- and (-e '.git' or -e '.svn'))
+ and $Smells_Like_VCS)
}
};
if ($extra_tests) {
};
sub Foo::new { 1 }
chdir("t/smells-of-vcs");
+ local $strictures::Smells_Like_VCS = 1;
foreach my $file (qw(lib/one.pm t/one.t)) {
ok(!eval { require $file; 1 }, "Failed to load ${file}");
like($@, qr{Indirect call of method}, "Failed due to indirect.pm, ok");