From: Vincent Pit Date: Sun, 27 Feb 2011 00:28:53 +0000 (+0100) Subject: Switch to qw<> X-Git-Tag: v0.07~2 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Fsubs-auto.git;a=commitdiff_plain;h=bdab145ebb1c29e7ec08d6aff4b25f9282fa4d2f Switch to qw<> --- diff --git a/Makefile.PL b/Makefile.PL index 0f5fccb..4a53d7a 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -61,7 +61,7 @@ package MY; sub postamble { my $cv = join ' -coverage ', 'cover', - qw/statement branch condition path subroutine time/; + qw; <; BEGIN { unless (Variable::Magic::VMG_UVAR) { @@ -84,7 +84,7 @@ my %core; @B::Keywords::Functions, 'DATA', } = (); -delete @core{qw/my local/}; +delete @core{qw}; BEGIN { *_REFCNT_PLACEHOLDERS = eval 'sub () { ' . ($] < 5.011002 ? 0 : 1) . '}' diff --git a/samples/subs.pl b/samples/subs.pl index 8d25208..4d81e9b 100644 --- a/samples/subs.pl +++ b/samples/subs.pl @@ -3,10 +3,10 @@ use strict; use warnings; -use lib qw{blib/lib}; +use lib qw; my $x = 7; -my @a = qw/ba na na/; +my @a = qw; { use subs::auto; diff --git a/t/05-args.t b/t/05-args.t index d449b73..5a1a3dc 100644 --- a/t/05-args.t +++ b/t/05-args.t @@ -7,7 +7,7 @@ use Test::More tests => 8; my $invalid = qr/Invalid\s+package\s+name/; -eval "use subs::auto qw/a b c/"; +eval "use subs::auto qw"; like($@, qr|Optional\s+arguments\s+must\s+be\s+passed\s+as\s+keys?\s*/\s*values?\s+pairs?|, 'no even number of args'); eval "use subs::auto in => \\( q{foo::bar} )"; diff --git a/t/10-base.t b/t/10-base.t index 249fe0f..c96ba8c 100644 --- a/t/10-base.t +++ b/t/10-base.t @@ -284,7 +284,7 @@ _got_undefined('blech', 1, eval => 1); # ... How's my symbol table, Doug Hastings? ................................... { - no strict qw/refs subs/; + no strict qw; is(*{::feh}{CODE}, undef, 'feh isn\'t defined'); is(*{::feh}{CODE}, undef, 'feh isn\'t defined, really'); isnt(*{::yay}{CODE}, undef, 'yay is defined'); @@ -340,7 +340,7 @@ close DONGS; seek DATA, 0, 1; my @fruits = ; chomp @fruits; -is_deeply(\@fruits, [ qw/apple pear banana/ ], 'DATA filehandle ok'); +is_deeply(\@fruits, [ qw ], 'DATA filehandle ok'); # ... Retest foo (declared and defined inside) ................................ diff --git a/t/12-proto.t b/t/12-proto.t index 10c59bb..651fb9f 100644 --- a/t/12-proto.t +++ b/t/12-proto.t @@ -10,7 +10,7 @@ sub foo ($) { $foo = $_[0] }; my $baz; eval q| - use warnings qw/FATAL redefine prototype/; + use warnings qw; sub main::baz ($) { $baz = $_[0] } |; like($@, qr/Prototype\s+mismatch\s*:\s+sub\s+main::baz\s*:\s+none\s+vs\s+\(\$\)/, 'baz appears as prototyped'); diff --git a/t/13-meth.t b/t/13-meth.t index db8ee14..e695f0f 100644 --- a/t/13-meth.t +++ b/t/13-meth.t @@ -10,7 +10,7 @@ my %res; eval q[ package subs::auto::Test; use subs::auto; - $res{"${_}2"} = __PACKAGE__->can($_) ? 1 : 0 for qw/foo bar baz qux/; + $res{"${_}2"} = __PACKAGE__->can($_) ? 1 : 0 for qw; return; BEGIN { $res{foo} = __PACKAGE__->can('foo') ? 1 : 0; } sub bar; diff --git a/t/92-pod-coverage.t b/t/92-pod-coverage.t index a63d2f4..ef87f5b 100644 --- a/t/92-pod-coverage.t +++ b/t/92-pod-coverage.t @@ -15,4 +15,4 @@ my $min_pc = 0.18; eval "use Pod::Coverage $min_pc"; plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage" if $@; -all_pod_coverage_ok({ also_private => [ qw/unimport/ ] }); +all_pod_coverage_ok({ also_private => [ qw ] });