1 BEGIN { delete $ENV{PERL_STRICTURES_EXTRA} }
4 use Test::More $] >= 5.008_004 ? qw(no_plan)
5 : (skip_all => 'Extra tests disabled on perls <= 5.008003');
9 my $tempdir = File::Temp::tempdir(CLEANUP => 1, TMPDIR => 1);
14 %extras = map { $_ => 1 } qw(
17 bareword/filehandles.pm
26 sub indirect::unimport {
31 local $strictures::Smells_Like_VCS = undef;
37 ok defined $strictures::Smells_Like_VCS, 'VCS dir has been checked';
38 ok !$strictures::Smells_Like_VCS, 'VCS dir not detected with no .git';
44 local $strictures::Smells_Like_VCS = undef;
50 ok defined $strictures::Smells_Like_VCS, 'VCS dir has been checked';
51 ok $strictures::Smells_Like_VCS, 'VCS dir detected with .git';
54 $strictures::Smells_Like_VCS = 1;
63 ["lib/module.pm" => 1],
64 ["other/one.pl" => 0],
65 ["other/t/test.t" => 0],
66 ["blib/module.pm" => 1],
68 my ($file, $want) = @$check;
75 my $not = $want ? '' : ' not';
77 "file named $file does$not get extras";
81 local $ENV{PERL_STRICTURES_EXTRA} = 1;
82 local %strictures::extra_load_states = ();
84 die "Can't locate $_[1] in \@INC (...).\n"
92 open my $fh, '>', \(my $str = '');
96 #line 1 "t/load_fail.t"
105 qr/Missing were:\n\n indirect multidimensional bareword::filehandles/,
106 "failure to load all three extra deps is reported"
111 open my $fh, '>', \(my $str = '');
115 #line 1 "t/load_fail.t"
121 is $str, '', "extra dep load failure is not reported a second time";