Commit | Line | Data |
7c7063c9 |
1 | use strict; |
2 | use warnings FATAL => 'all'; |
3 | use Test::More |
4 | $] < 5.008004 ? ( skip_all => "can't test extra loading on perl < 5.8.4" ) |
5 | : ( tests => 1 ); |
6 | use File::Spec; |
32afac10 |
7 | |
7c7063c9 |
8 | my %extras = map { my $m = "$_.pm"; $m =~ s{::}{/}g; $m => 1 } qw( |
9 | indirect |
10 | multidimensional |
11 | bareword::filehandles |
12 | ); |
32afac10 |
13 | |
7c7063c9 |
14 | unshift @INC, sub { |
15 | my $mod = $_[1]; |
16 | die "Can't locate $mod in \@INC\n" |
17 | if $extras{$mod}; |
18 | return 0; |
19 | }; |
32afac10 |
20 | |
7c7063c9 |
21 | my $err = do { |
22 | local $ENV{PERL_STRICTURES_EXTRA} = 1; |
23 | local *STDERR; |
24 | open STDERR, '>', File::Spec->devnull; |
25 | eval q{use strictures;}; |
26 | $@; |
27 | }; |
32afac10 |
28 | |
7c7063c9 |
29 | is $err, '', 'can manage to survive with some modules missing!'; |