From: Vincent Pit Date: Thu, 6 Jan 2011 00:52:28 +0000 (+0100) Subject: Switch to qw<> X-Git-Tag: v0.07~22 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=0f9ca88734df707e9f1d70a8067e6502b96820a9;p=perl%2Fmodules%2FScalar-Vec-Util.git Switch to qw<> --- diff --git a/Makefile.PL b/Makefile.PL index 3dbfaa2..7b55ee5 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -7,7 +7,7 @@ use ExtUtils::MakeMaker; BEGIN { eval { require Config }; die 'OS unsupported' if $@; - Config->import(qw/%Config/); + Config->import(qw<%Config>); eval { require File::Spec }; die 'OS unsupported' if $@; } @@ -134,7 +134,7 @@ package MY; sub postamble { my $cv = join ' -coverage ', 'cover', - qw/statement branch condition path subroutine time/; + qw; <; =head1 NAME @@ -33,7 +33,7 @@ BEGIN { =head1 SYNOPSIS - use Scalar::Vec::Util qw/vfill vcopy veq/; + use Scalar::Vec::Util qw; my $s; vfill $s, 0, 100, 1; # Fill with 100 bits 1 starting at 0. @@ -207,12 +207,12 @@ They are all exported by the tags C<':consts'> and C<':all'>. =cut -use base qw/Exporter/; +use base qw; our @EXPORT = (); our %EXPORT_TAGS = ( - 'funcs' => [ qw/vfill vcopy vshift vrot veq/ ], - 'consts' => [ qw/SVU_PP SVU_SIZE/ ] + 'funcs' => [ qw ], + 'consts' => [ qw ] ); our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS; $EXPORT_TAGS{'all'} = [ @EXPORT_OK ]; diff --git a/samples/bench.pl b/samples/bench.pl index a571230..c899ea1 100755 --- a/samples/bench.pl +++ b/samples/bench.pl @@ -3,10 +3,10 @@ use strict; use warnings; -use Benchmark qw/cmpthese/; +use Benchmark qw; -use lib qw{blib/arch blib/lib}; -use Scalar::Vec::Util qw/vfill vcopy veq/; +use lib qw; +use Scalar::Vec::Util qw; BEGIN { print 'We '; diff --git a/t/02-pp.t b/t/02-pp.t index dea9f2b..0e41842 100644 --- a/t/02-pp.t +++ b/t/02-pp.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Config qw/%Config/; +use Config qw<%Config>; use Test::More tests => 4; @@ -17,10 +17,10 @@ BEGIN { }; } -use Scalar::Vec::Util qw/vfill vcopy veq SVU_PP/; +use Scalar::Vec::Util qw; is(SVU_PP, 1, 'using pure perl subroutines'); -for (qw/vfill vcopy veq/) { +for (qw) { no strict 'refs'; is(*{$_}{CODE}, *{'Scalar::Vec::Util::'.$_}{CODE}, $_ .' is ' . $_ . '_pp'); } diff --git a/t/03-size.t b/t/03-size.t index 8751911..d32e3d9 100644 --- a/t/03-size.t +++ b/t/03-size.t @@ -5,7 +5,7 @@ use warnings; use Test::More; -use Scalar::Vec::Util qw/SVU_SIZE SVU_PP/; +use Scalar::Vec::Util qw; if (SVU_PP) { plan tests => 1; diff --git a/t/11-veq.t b/t/11-veq.t index 31ba0a8..00e90a9 100644 --- a/t/11-veq.t +++ b/t/11-veq.t @@ -5,7 +5,7 @@ use warnings; use Test::More 'no_plan'; -use Scalar::Vec::Util qw/veq SVU_SIZE/; +use Scalar::Vec::Util qw; for ([ 1, 'offset', -1 ], [ 3, 'offset', '-1' ], [ 4, 'length', -1 ]) { my @args = ('1') x 5; diff --git a/t/12-veq-long.t b/t/12-veq-long.t index de11abd..ea0c7a0 100644 --- a/t/12-veq-long.t +++ b/t/12-veq-long.t @@ -4,9 +4,9 @@ use strict; use warnings; use Test::More tests => 1; -use Config qw/%Config/; +use Config qw<%Config>; -use Scalar::Vec::Util qw/veq/; +use Scalar::Vec::Util qw; my ($v1, $v2) = ('') x 2; my $n = ($Config{alignbytes} - 1) * 8; diff --git a/t/21-vfill.t b/t/21-vfill.t index 4702668..8403174 100644 --- a/t/21-vfill.t +++ b/t/21-vfill.t @@ -5,7 +5,7 @@ use warnings; use Test::More 'no_plan'; -use Scalar::Vec::Util qw/vfill SVU_SIZE/; +use Scalar::Vec::Util qw; for ([ 1, 'offset', -1 ], [ 2, 'length', '-1' ]) { my @args = (~0) x 4; diff --git a/t/22-vfill-long.t b/t/22-vfill-long.t index b682dbe..3325f2d 100644 --- a/t/22-vfill-long.t +++ b/t/22-vfill-long.t @@ -5,7 +5,7 @@ use warnings; use Test::More tests => 34; -use Scalar::Vec::Util qw/vfill/; +use Scalar::Vec::Util qw; my $n = 2 ** 16; diff --git a/t/30-vcopy-pp.t b/t/30-vcopy-pp.t index 73e6e1e..fda3803 100644 --- a/t/30-vcopy-pp.t +++ b/t/30-vcopy-pp.t @@ -6,7 +6,7 @@ use warnings; use lib 't/lib'; use Test::Leaner 'no_plan'; -use Scalar::Vec::Util qw/SVU_SIZE/; +use Scalar::Vec::Util qw; for ([ 1, 'offset', -1 ], [ 3, 'offset', '-1' ], [ 4, 'length', -1 ]) { my @args = ('1') x 5; diff --git a/t/31-vcopy-copy.t b/t/31-vcopy-copy.t index ac4876c..68b136b 100644 --- a/t/31-vcopy-copy.t +++ b/t/31-vcopy-copy.t @@ -6,7 +6,7 @@ use warnings; use lib 't/lib'; use Test::Leaner 'no_plan'; -use Scalar::Vec::Util qw/vcopy SVU_SIZE/; +use Scalar::Vec::Util qw; for ([ 1, 'offset', -1 ], [ 3, 'offset', '-1' ], [ 4, 'length', -1 ]) { my @args = (~0) x 5; diff --git a/t/32-vcopy-move.t b/t/32-vcopy-move.t index a771839..43776c0 100644 --- a/t/32-vcopy-move.t +++ b/t/32-vcopy-move.t @@ -6,7 +6,7 @@ use warnings; use lib 't/lib'; use Test::Leaner 'no_plan'; -use Scalar::Vec::Util qw/vcopy SVU_SIZE/; +use Scalar::Vec::Util qw; my $p = SVU_SIZE; $p = 8 if $p < 8; diff --git a/t/33-vcopy-long.t b/t/33-vcopy-long.t index 2da3ec5..865055d 100644 --- a/t/33-vcopy-long.t +++ b/t/33-vcopy-long.t @@ -4,9 +4,9 @@ use strict; use warnings; use Test::More tests => 34 + 2; -use Config qw/%Config/; +use Config qw<%Config>; -use Scalar::Vec::Util qw/vcopy/; +use Scalar::Vec::Util qw; my $n = 2 ** 16; diff --git a/t/40-vshift.t b/t/40-vshift.t index 635bba2..15d1dec 100644 --- a/t/40-vshift.t +++ b/t/40-vshift.t @@ -6,7 +6,7 @@ use warnings; use lib 't/lib'; use Test::Leaner 'no_plan'; -use Scalar::Vec::Util qw/vshift SVU_SIZE/; +use Scalar::Vec::Util qw; for ([ 1, 'offset', -1 ], [ 2, 'length', '-1' ]) { my @args = ('1') x 4; diff --git a/t/50-vrot.t b/t/50-vrot.t index 0da7f7b..227ca52 100644 --- a/t/50-vrot.t +++ b/t/50-vrot.t @@ -6,7 +6,7 @@ use warnings; use lib 't/lib'; use Test::Leaner 'no_plan'; -use Scalar::Vec::Util qw/vrot vcopy SVU_SIZE/; +use Scalar::Vec::Util qw; for ([ 1, 'offset', -1 ], [ 2, 'length', '-1' ]) { my @args = ('1') x 4;