From: Vincent Pit Date: Sat, 24 Aug 2013 21:30:11 +0000 (-0300) Subject: Switch qw delimiters to <> X-Git-Tag: v0.17~5 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=cbd0d5635c26b4203e32f543f4a3b323a6875b41;p=perl%2Fmodules%2FIPC-MorseSignals.git Switch qw delimiters to <> --- diff --git a/lib/IPC/MorseSignals/Emitter.pm b/lib/IPC/MorseSignals/Emitter.pm index 7a4c3d6..a8abfae 100644 --- a/lib/IPC/MorseSignals/Emitter.pm +++ b/lib/IPC/MorseSignals/Emitter.pm @@ -3,12 +3,12 @@ package IPC::MorseSignals::Emitter; use strict; use warnings; -use Carp qw/croak/; -use POSIX qw/SIGUSR1 SIGUSR2/; -use Time::HiRes qw/usleep/; +use Carp qw; +use POSIX qw; +use Time::HiRes qw; use Bit::MorseSignals::Emitter; -use base qw/Bit::MorseSignals::Emitter/; +use base qw; =head1 NAME diff --git a/lib/IPC/MorseSignals/Receiver.pm b/lib/IPC/MorseSignals/Receiver.pm index a72eec7..96d0420 100644 --- a/lib/IPC/MorseSignals/Receiver.pm +++ b/lib/IPC/MorseSignals/Receiver.pm @@ -3,10 +3,10 @@ package IPC::MorseSignals::Receiver; use strict; use warnings; -use Carp qw/croak/; +use Carp qw; use Bit::MorseSignals::Receiver; -use base qw/Bit::MorseSignals::Receiver/; +use base qw; =head1 NAME @@ -31,7 +31,7 @@ our $VERSION = '0.16'; =head1 DESCRIPTION -This module installs C<$SIG{qw/USR1 USR2/}> handlers and forwards the bits received to an underlying L receiver. +This module installs C<< $SIG{qw} >> handlers and forwards the bits received to an underlying L receiver. =head1 METHODS @@ -51,7 +51,7 @@ sub new { croak 'The first argument must be a hash reference to the %SIG hash' unless $sig and ref $sig eq 'HASH'; my $self = bless $class->SUPER::new(@_), $class; - @{$sig}{qw/USR1 USR2/} = (sub { $self->push(0) }, sub { $self->push(1) }); + @{$sig}{qw} = (sub { $self->push(0) }, sub { $self->push(1) }); return $self; } diff --git a/samples/bench.pl b/samples/bench.pl index 9bd146e..5e6a34e 100755 --- a/samples/bench.pl +++ b/samples/bench.pl @@ -3,11 +3,11 @@ use strict; use warnings; -use POSIX qw/SIGINT SIGTERM SIGKILL SIGHUP EXIT_FAILURE/; +use POSIX qw; -use lib qw{blib/lib t/lib}; +use lib qw; -use IPC::MorseSignals::TestSuite qw/init bench cleanup/; +use IPC::MorseSignals::TestSuite qw; sub diag { print STDERR "@_\n" }; *IPC::MorseSignals::TestSuite::diag = *main::diag; diff --git a/samples/try.pl b/samples/try.pl index f76d747..2996727 100755 --- a/samples/try.pl +++ b/samples/try.pl @@ -3,9 +3,9 @@ use strict; use warnings; -use POSIX qw/pause EXIT_SUCCESS EXIT_FAILURE/; +use POSIX qw; -use lib qw{blib/lib}; +use lib qw; use IPC::MorseSignals::Emitter; use IPC::MorseSignals::Receiver; diff --git a/t/02-can.t b/t/02-can.t index a78573e..6db168c 100644 --- a/t/02-can.t +++ b/t/02-can.t @@ -7,13 +7,13 @@ use Test::More tests => 10 + 7; require IPC::MorseSignals::Emitter; -for (qw/new post pop reset flush busy queued/, qw/new send delay speed/) { +for (qw, qw) { ok(IPC::MorseSignals::Emitter->can($_), 'IME can ' . $_); } require IPC::MorseSignals::Receiver; -for (qw/new push reset busy msg/, qw/new/) { +for (qw, qw) { ok(IPC::MorseSignals::Receiver->can($_), 'IMR can ' . $_); } diff --git a/t/10-sigusr.t b/t/10-sigusr.t index 60b17b2..cb3f2d4 100644 --- a/t/10-sigusr.t +++ b/t/10-sigusr.t @@ -5,7 +5,7 @@ use warnings; use Test::More tests => 4; -use POSIX qw/SIGUSR1 SIGUSR2/; +use POSIX qw; my ($a, $b) = (0, 0); diff --git a/t/50-self-plain.t b/t/50-self-plain.t index df5c272..fd16ad8 100644 --- a/t/50-self-plain.t +++ b/t/50-self-plain.t @@ -8,8 +8,8 @@ use Test::More tests => 9; use IPC::MorseSignals::Emitter; use IPC::MorseSignals::Receiver; -my @msgs = qw/hlagh hlaghlaghlagh HLAGH HLAGHLAGHLAGH \x{0dd0}\x{00} - h\x{00}la\x{00}gh \x{00}\x{ff}\x{ff}\x{00}\x{00}\x{ff}/; +my @msgs = qw; my $deuce = IPC::MorseSignals::Emitter->new(speed => 1024); my $pants = IPC::MorseSignals::Receiver->new(\%SIG, done => sub { diff --git a/t/51-self-utf8.t b/t/51-self-utf8.t index 5379b71..b281de3 100644 --- a/t/51-self-utf8.t +++ b/t/51-self-utf8.t @@ -10,7 +10,7 @@ use Test::More tests => 7; use IPC::MorseSignals::Emitter; use IPC::MorseSignals::Receiver; -my @msgs = qw/€éèë 月語 x tata たTÂ/; +my @msgs = qw<€éèë 月語 x tata たTÂ>; sub cp { join '.', map ord, split //, $_[0] } diff --git a/t/60-fork-plain.t b/t/60-fork-plain.t index 043e99e..af36286 100644 --- a/t/60-fork-plain.t +++ b/t/60-fork-plain.t @@ -6,7 +6,7 @@ use warnings; use Test::More tests => 7; use lib 't/lib'; -use IPC::MorseSignals::TestSuite qw/try init cleanup/; +use IPC::MorseSignals::TestSuite qw; *IPC::MorseSignals::TestSuite::diag = *Test::More::diag; @@ -20,8 +20,8 @@ sub test { ok($res, $desc . ' (' . $len . ' bits @ ' . $speed . ' bauds)'); } -my @msgs = qw/hlagh hlaghlaghlagh HLAGH HLAGHLAGHLAGH \x{0dd0}\x{00} - h\x{00}la\x{00}gh \x{00}\x{ff}\x{ff}\x{00}\x{00}\x{ff}/; +my @msgs = qw; init 6; diff --git a/t/61-fork-utf8.t b/t/61-fork-utf8.t index c2c9c34..e8aeacf 100644 --- a/t/61-fork-utf8.t +++ b/t/61-fork-utf8.t @@ -8,7 +8,7 @@ use utf8; use Test::More tests => 5; use lib 't/lib'; -use IPC::MorseSignals::TestSuite qw/try init cleanup/; +use IPC::MorseSignals::TestSuite qw; *IPC::MorseSignals::TestSuite::diag = *Test::More::diag; @@ -22,7 +22,7 @@ sub test { ok($res, $desc . ' (' . $len . ' bits @ ' . $speed . ' bauds)'); } -my @msgs = qw/€éèë 月語 x tata たTÂ/; +my @msgs = qw<€éèë 月語 x tata たTÂ>; init 6; diff --git a/t/62-fork-storable.t b/t/62-fork-storable.t index 56e36eb..91e2e3d 100644 --- a/t/62-fork-storable.t +++ b/t/62-fork-storable.t @@ -8,7 +8,7 @@ use utf8; use Test::More tests => 8; use lib 't/lib'; -use IPC::MorseSignals::TestSuite qw/try init cleanup/; +use IPC::MorseSignals::TestSuite qw; *IPC::MorseSignals::TestSuite::diag = *Test::More::diag; diff --git a/t/70-speed.t b/t/70-speed.t index 07dd767..9eba2d9 100644 --- a/t/70-speed.t +++ b/t/70-speed.t @@ -9,7 +9,7 @@ my $n; use Test::More tests => 1 + ($n = 5); use lib 't/lib'; -use IPC::MorseSignals::TestSuite qw/bench init cleanup/; +use IPC::MorseSignals::TestSuite qw; *IPC::MorseSignals::TestSuite::diag = *Test::More::diag; diff --git a/t/lib/IPC/MorseSignals/TestSuite.pm b/t/lib/IPC/MorseSignals/TestSuite.pm index 31996ba..74568a3 100644 --- a/t/lib/IPC/MorseSignals/TestSuite.pm +++ b/t/lib/IPC/MorseSignals/TestSuite.pm @@ -4,14 +4,14 @@ use strict; use warnings; use Data::Dumper; -use POSIX qw/pause SIGKILL EXIT_FAILURE/; +use POSIX qw; use IPC::MorseSignals::Emitter; use IPC::MorseSignals::Receiver; -use base qw/Exporter/; +use base qw; -our @EXPORT_OK = qw/try bench init cleanup/; +our @EXPORT_OK = qw; $Data::Dumper::Indent = 0;