From: Peter Rabbitson Date: Tue, 12 Mar 2013 21:57:23 +0000 (+0100) Subject: Switch tabs to 3-space (from bad to worse) X-Git-Tag: v0.001009~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=69c9647cc05997a77e47aefbc7f94fc73e555b6c;p=p5sagit%2FSub-Exporter-Progressive.git Switch tabs to 3-space (from bad to worse) --- diff --git a/Makefile.PL b/Makefile.PL index 5002aa7..2bbacae 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -5,9 +5,9 @@ use ExtUtils::MakeMaker; (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; my %deps = ( - PREREQ_PM => { - Exporter => '5.58', - }, + PREREQ_PM => { + Exporter => '5.58', + }, ); my $key = eval { ExtUtils::MakeMaker->VERSION(6.56) } ? 'BUILD_REQUIRES' : 'PREREQ_PM' ; $deps{$key}{'Test::More'} = '0.96'; diff --git a/t/tags.t b/t/tags.t index 110bcb3..dd0a20d 100644 --- a/t/tags.t +++ b/t/tags.t @@ -8,7 +8,7 @@ use lib 't/lib'; use A::Junk ':other'; BEGIN { - unshift @INC, sub { croak 'Shouldn\'t load Sub::Exporter' if $_[1] eq 'Sub/Exporter.pm' }; + unshift @INC, sub { croak 'Shouldn\'t load Sub::Exporter' if $_[1] eq 'Sub/Exporter.pm' }; } ok(!main->can('junk1'), 'junk1 not exported'); @@ -17,41 +17,41 @@ ok(main->can('junk3'), 'junk3 exported'); ok(! $INC{'Sub/Exporter.pm'}, 'Sub::Exporter not loaded'); BEGIN { - package Local::Exporter; - use Sub::Exporter::Progressive -setup => { - exports => [qw/ foo bar baz /], - groups => { - default => [qw/ foo /], - bb => [qw/ bar baz /], - }, - }; - use constant { - foo => 1, - bar => 2, - baz => 3, - }; - $INC{'Local/Exporter.pm'} = __FILE__; + package Local::Exporter; + use Sub::Exporter::Progressive -setup => { + exports => [qw/ foo bar baz /], + groups => { + default => [qw/ foo /], + bb => [qw/ bar baz /], + }, + }; + use constant { + foo => 1, + bar => 2, + baz => 3, + }; + $INC{'Local/Exporter.pm'} = __FILE__; }; my $i = 0; sub check_tag { - my ($tag, $should, $shouldnt) = @_; - my $pkg = 'Local::Importer' . ++$i; - subtest "test the '$tag' tag" => sub - { - plan tests => 1 + @$should + @$shouldnt; - local $@ = undef; - - ok(eval qq{ - package $pkg; - use Local::Exporter qw( $tag ); - 1; - }, "$pkg compiled") or diag $@; - - ok( $pkg->can($_), "$pkg\->can(\"$_\")") for @$should; - ok(!$pkg->can($_), "$pkg\->can't(\"$_\")") for @$shouldnt; - } + my ($tag, $should, $shouldnt) = @_; + my $pkg = 'Local::Importer' . ++$i; + subtest "test the '$tag' tag" => sub + { + plan tests => 1 + @$should + @$shouldnt; + local $@ = undef; + + ok(eval qq{ + package $pkg; + use Local::Exporter qw( $tag ); + 1; + }, "$pkg compiled") or diag $@; + + ok( $pkg->can($_), "$pkg\->can(\"$_\")") for @$should; + ok(!$pkg->can($_), "$pkg\->can't(\"$_\")") for @$shouldnt; + } } check_tag(':default', [qw/foo/], [qw/bar baz/]);