X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fstrictures.pm;h=2c59148466e608f3da569d6d0d51ea5749c9d1cd;hb=8190ff5bc784d2efaa9677dd49fc8767d3f3cfee;hp=e8bff80ef5243bc3c2ec351b804f3fd91d6b3736;hpb=2288278ff65b5402e191cfc726a8425e412cce2e;p=p5sagit%2Fstrictures.git diff --git a/lib/strictures.pm b/lib/strictures.pm index e8bff80..2c59148 100644 --- a/lib/strictures.pm +++ b/lib/strictures.pm @@ -5,7 +5,7 @@ use warnings FATAL => 'all'; use constant _PERL_LT_5_8_4 => ($] < 5.008004) ? 1 : 0; -our $VERSION = '1.004001'; # 1.4.1 +our $VERSION = '1.004004'; # 1.4.4 sub VERSION { for ($_[1]) { @@ -21,7 +21,7 @@ sub VERSION { shift->SUPER::VERSION(@_); } -my $extras_load_warned; +our $extra_load_states; our $Smells_Like_VCS = (-e '.git' || -e '.svn' || (-e '../../dist.ini' && (-e '../../.git' || -e '../../.svn'))); @@ -43,37 +43,44 @@ sub import { } }; if ($extra_tests) { - my @failed; - if (eval { require indirect; 1 }) { - indirect->unimport(':fatal'); - } else { - push @failed, 'indirect'; - } - if (eval { require multidimensional; 1 }) { - multidimensional->unimport; - } else { - push @failed, 'multidimensional'; - } - if (eval { require bareword::filehandles; 1 }) { - bareword::filehandles->unimport; - } else { - push @failed, 'bareword::filehandles'; - } - if (@failed and not $extras_load_warned++) { - my $failed = join ' ', @failed; - warn <unimport(':fatal') if $extra_load_states->{indirect}; + multidimensional->unimport if $extra_load_states->{multidimensional}; + bareword::filehandles->unimport if $extra_load_states->{'bareword::filehandles'}; } } @@ -249,7 +256,7 @@ mst - Matt S. Trout (cpan:MSTROUT) =head1 CONTRIBUTORS -None required yet. Maybe this module is perfect (hahahahaha ...). +Karen Etheridge (cpan:ETHER) =head1 COPYRIGHT