From: Vincent Pit Date: Sat, 24 Aug 2013 21:38:53 +0000 (-0300) Subject: Switch qw delimiters to <> X-Git-Tag: v0.14~3 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=df2d2239c4e52ed9bf6891f03d6a3bb8e65a1297;p=perl%2Fmodules%2FLinux-SysInfo.git Switch qw delimiters to <> --- diff --git a/lib/Linux/SysInfo.pm b/lib/Linux/SysInfo.pm index 1d5a48a..d18ede2 100644 --- a/lib/Linux/SysInfo.pm +++ b/lib/Linux/SysInfo.pm @@ -22,7 +22,7 @@ BEGIN { =head1 SYNOPSIS - use Linux::SysInfo qw/sysinfo/; + use Linux::SysInfo qw; my $si = sysinfo; print "$_: $si->{$_}\n" for keys %$si; @@ -143,12 +143,12 @@ Functions are also exported by the C<:funcs> tag, and constants by C<:consts>. =cut -use base qw/Exporter/; +use base qw; our @EXPORT = (); our %EXPORT_TAGS = ( - 'funcs' => [ qw/sysinfo/ ], - 'consts' => [ qw/LS_HAS_EXTENDED/ ] + 'funcs' => [ qw ], + 'consts' => [ qw ] ); our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS; $EXPORT_TAGS{'all'} = [ @EXPORT_OK ]; diff --git a/samples/sysinfo.pl b/samples/sysinfo.pl index a0d860b..4f2bf7f 100755 --- a/samples/sysinfo.pl +++ b/samples/sysinfo.pl @@ -3,9 +3,9 @@ use strict; use warnings; -use lib qw{blib/lib blib/arch}; +use lib qw; -use Linux::SysInfo qw/sysinfo LS_HAS_EXTENDED/; +use Linux::SysInfo qw; my $si = sysinfo; die 'sysinfo() failed ! (should be pretty rare but it did happen)' unless $si; @@ -21,5 +21,5 @@ if (LS_HAS_EXTENDED) { ($si->{mem_unit} == 1) ? "the memory values are the actual sizes in bytes :\n" : "the sizes in bytes are actually :\n"; print '- ', $_, ': ', $si->{$_} * $si->{mem_unit}, "\n" for sort - qw/totalram freeram sharedram bufferram totalswap freeswap totalhigh freehigh/; + qw; } diff --git a/t/10-standard.t b/t/10-standard.t index 2442dff..30c2002 100644 --- a/t/10-standard.t +++ b/t/10-standard.t @@ -5,7 +5,7 @@ use warnings; use Test::More tests => 12 * 5; -use Linux::SysInfo qw/sysinfo/; +use Linux::SysInfo qw; SKIP: { for my $run (0 .. 4) { @@ -14,8 +14,8 @@ SKIP: { unless defined $si; is ref($si), 'HASH', "sysinfo returns a hash reference at run $run"; - for (qw/uptime load1 load5 load15 procs - totalram freeram sharedram bufferram totalswap freeswap/) { + for (qw) { if (defined $si->{$_}) { like $si->{$_}, qr/^\d+(?:\.\d+)?$/, "key $_ looks like a number at run $run"; diff --git a/t/20-extended.t b/t/20-extended.t index 8876414..779fe25 100644 --- a/t/20-extended.t +++ b/t/20-extended.t @@ -5,7 +5,7 @@ use warnings; use Test::More; -use Linux::SysInfo qw/sysinfo LS_HAS_EXTENDED/; +use Linux::SysInfo qw; unless (LS_HAS_EXTENDED) { plan skip_all => 'your kernel does not support extended sysinfo fields'; @@ -20,7 +20,7 @@ unless (LS_HAS_EXTENDED) { is ref($si), 'HASH', "sysinfo returns a hash reference at run $run"; is scalar(keys %$si), 14, "sysinfo object has the right number of keys at run $run"; - for (qw/totalhigh freehigh mem_unit/) { + for (qw) { if (defined $si->{$_}) { like $si->{$_}, qr/^\d+(?:\.\d+)?$/, "key $_ looks like a number at run $run"; diff --git a/t/30-threads.t b/t/30-threads.t index b7318c7..690bd11 100644 --- a/t/30-threads.t +++ b/t/30-threads.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Config qw/%Config/; +use Config qw<%Config>; BEGIN { my $has_threads = do { @@ -20,7 +20,7 @@ BEGIN { } } -use Linux::SysInfo qw/sysinfo/; +use Linux::SysInfo qw; sub try { my $tid = threads->tid();