]> git.vpit.fr Git - perl/modules/IPC-MorseSignals.git/commitdiff
Importing IPC-MorseSignals-0.08.tar.gz v0.08
authorVincent Pit <vince@profvince.com>
Sun, 29 Jun 2008 16:35:37 +0000 (18:35 +0200)
committerVincent Pit <vince@profvince.com>
Sun, 29 Jun 2008 16:35:37 +0000 (18:35 +0200)
14 files changed:
Changes
META.yml
Makefile.PL
README
lib/IPC/MorseSignals.pm
t/10-proto.t
t/11-ascii.t
t/12-unicode.t
t/13-speed.t
t/boilerplate.t
t/kwalitee.t
t/lib/IPCMTest.pm
t/pod-coverage.t
t/pod.t

diff --git a/Changes b/Changes
index dea81152ea452abecb7ac1c6192d91c63b680f4a..f3f11353ab30baaf187c4c15fc70f2c50e0eab39 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,13 @@
 Revision history for IPC-MorseSignals
 
 Revision history for IPC-MorseSignals
 
+0.08    2007-09-05 09:40 UTC
+        + Chg : The sender detects now automatically if the message is encoded
+                in UTF-8, thanks to Encode::is_utf8. You no longer need to pass
+                the utf8 option to msend. The Encode module is a prerequisite.
+        + Chg : Tests that used to die now report correct failure.
+        + Fix : Tests are now strict.
+        + Fix : Miscount in t/13-speed.t
+
 0.07    2007-08-28 11:30 UTC
         + Chg : Common test code was factored into a module.
         + Chg : Tests were lightened again.
 0.07    2007-08-28 11:30 UTC
         + Chg : Common test code was factored into a module.
         + Chg : Tests were lightened again.
index 348e2928e19e552b2b9ac5a937ff6cf2fec5d677..f5ae1104ab619c2b57d7078c3cec76068ab7f6b3 100644 (file)
--- a/META.yml
+++ b/META.yml
@@ -1,12 +1,13 @@
 --- #YAML:1.0
 name:                IPC-MorseSignals
 --- #YAML:1.0
 name:                IPC-MorseSignals
-version:             0.07
+version:             0.08
 abstract:            Communicate between processes with Morse signals.
 license:             perl
 generated_by:        ExtUtils::MakeMaker version 6.36
 distribution_type:   module
 requires:     
     Carp:                          0
 abstract:            Communicate between processes with Morse signals.
 license:             perl
 generated_by:        ExtUtils::MakeMaker version 6.36
 distribution_type:   module
 requires:     
     Carp:                          0
+    Encode:                        0
     Exporter:                      0
     POSIX:                         0
     Test::More:                    0
     Exporter:                      0
     POSIX:                         0
     Test::More:                    0
index 2366dc91f07aca84da3b1ec4c5320bc98ce0aa76..2a416bd12090ebc6c4d4d54d08d295527f942c8e 100644 (file)
@@ -29,6 +29,7 @@ WriteMakefile(
     PL_FILES            => {},
     PREREQ_PM => {
         'Carp'        => 0,
     PL_FILES            => {},
     PREREQ_PM => {
         'Carp'        => 0,
+        'Encode'      => 0,
         'Exporter'    => 0,
         'POSIX'       => 0,
         'Test::More'  => 0,
         'Exporter'    => 0,
         'POSIX'       => 0,
         'Test::More'  => 0,
diff --git a/README b/README
index 4cc7af916d3a5caff16c75b3f7cb99de2cb2f3e5..a2fadc078293e6e626adfd705b5f7aa165d50067 100644 (file)
--- a/README
+++ b/README
@@ -2,7 +2,7 @@ NAME
     IPC::MorseSignals - Communicate between processes with Morse signals.
 
 VERSION
     IPC::MorseSignals - Communicate between processes with Morse signals.
 
 VERSION
-    Version 0.07
+    Version 0.08
 
 SYNOPSIS
         use IPC::MorseSignals qw/msend mrecv/;
 
 SYNOPSIS
         use IPC::MorseSignals qw/msend mrecv/;
@@ -29,16 +29,15 @@ DESCRIPTION
 
 FUNCTIONS
   "msend"
 
 FUNCTIONS
   "msend"
-        msend $msg, $pid [, speed => $speed, utf8 => $utf8, sign => $sign ]
+        msend $msg, $pid [, speed => $speed, sign => $sign ]
 
     Sends the string $msg to the process $pid (or to all the processes @$pid
     if $pid is an array ref) at $speed bits per second. Default speed is
     512, don't set it too low or the target will miss bits and the whole
 
     Sends the string $msg to the process $pid (or to all the processes @$pid
     if $pid is an array ref) at $speed bits per second. Default speed is
     512, don't set it too low or the target will miss bits and the whole
-    message will be crippled. If the "utf8" flag is set (default is unset),
-    the string will first be encoded in UTF-8. The "utf8" bit of the packet
-    message is turned on, so that the receiver is aware of it. If the "sign"
-    flag is unset (default is set), the PID of the sender won't be shipped
-    with the packet.
+    message will be crippled. If the "sign" flag is unset (default is set),
+    the PID of the sender won't be shipped with the packet. UTF-8 encoded
+    strings are automatically detected. The "utf8" bit of the packet message
+    is turned on, so that the receiver can encode them appropriately.
 
   "mrecv"
         mrecv %SIG [, cb => $callback ]
 
   "mrecv"
         mrecv %SIG [, cb => $callback ]
@@ -95,8 +94,8 @@ PROTOCOL
     m) and 1 (n) in the concatenation of the header and the data. A
     signature is then chosen :
 
     m) and 1 (n) in the concatenation of the header and the data. A
     signature is then chosen :
 
-    - If m > n, we take n+1 times 1 follewed by one 0 ;
-    - Otherwise, we take m+1 times 0 follewed by one 1.
+    - If m > n, we take n+1 times 1 followed by one 0 ;
+    - Otherwise, we take m+1 times 0 followed by one 1.
 
     The signal is then formed by concatenating the signature, the header,
     the data bits and the reversed signature (i.e. the bits of the signature
 
     The signal is then formed by concatenating the signature, the header,
     the data bits and the reversed signature (i.e. the bits of the signature
@@ -117,8 +116,8 @@ CAVEATS
     transfer data to a sleeping process.
 
 DEPENDENCIES
     transfer data to a sleeping process.
 
 DEPENDENCIES
-    Carp (standard since perl 5), POSIX (idem), Time::HiRes (since perl
-    5.7.3) and utf8 (since perl 5.6) are required.
+    Carp (standard since perl 5), POSIX (idem), utf8 (since perl 5.6),
+    Encode (since perl 5.7.3) and Time::HiRes (idem) are required.
 
 SEE ALSO
     perlipc for information about signals in perl.
 
 SEE ALSO
     perlipc for information about signals in perl.
index e9ef591b2212ad8e3efe64b4062bb3a30d3dd8ce..d6bd9056cc24feafa51de26eb9f0c03759f401f8 100644 (file)
@@ -6,6 +6,7 @@ use warnings;
 use utf8;
 
 use Carp qw/croak/;
 use utf8;
 
 use Carp qw/croak/;
+use Encode;
 use POSIX qw/SIGUSR1 SIGUSR2/;
 use Time::HiRes qw/usleep/;
 
 use POSIX qw/SIGUSR1 SIGUSR2/;
 use Time::HiRes qw/usleep/;
 
@@ -17,11 +18,11 @@ IPC::MorseSignals - Communicate between processes with Morse signals.
 
 =head1 VERSION
 
 
 =head1 VERSION
 
-Version 0.07
+Version 0.08
 
 =cut
 
 
 =cut
 
-our $VERSION = '0.07';
+our $VERSION = '0.08';
 
 =head1 SYNOPSIS
 
 
 =head1 SYNOPSIS
 
@@ -50,10 +51,11 @@ But, seriously, use something else for your IPC. :)
 
 =head2 C<msend>
 
 
 =head2 C<msend>
 
-    msend $msg, $pid [, speed => $speed, utf8 => $utf8, sign => $sign ]
+    msend $msg, $pid [, speed => $speed, sign => $sign ]
 
 Sends the string C<$msg> to the process C<$pid> (or to all the processes C<@$pid> if C<$pid> is an array ref) at C<$speed> bits per second. Default speed is 512, don't set it too low or the target will miss bits and the whole message will be crippled.
 
 Sends the string C<$msg> to the process C<$pid> (or to all the processes C<@$pid> if C<$pid> is an array ref) at C<$speed> bits per second. Default speed is 512, don't set it too low or the target will miss bits and the whole message will be crippled.
-If the C<utf8> flag is set (default is unset), the string will first be encoded in UTF-8. The C<utf8> bit of the packet message is turned on, so that the receiver is aware of it. If the C<sign> flag is unset (default is set), the PID of the sender won't be shipped with the packet.
+If the C<sign> flag is unset (default is set), the PID of the sender won't be shipped with the packet.
+UTF-8 encoded strings are automatically detected. The C<utf8> bit of the packet message is turned on, so that the receiver can encode them appropriately.
 
 =cut
 
 
 =cut
 
@@ -65,27 +67,24 @@ sub msend {
  croak 'Optional arguments must be passed as key => value pairs' if @o % 2;
  my %opts = @o;
  $opts{speed} ||= 512;
  croak 'Optional arguments must be passed as key => value pairs' if @o % 2;
  my %opts = @o;
  $opts{speed} ||= 512;
- $opts{utf8}  ||= 0;
  $opts{sign}    = 1 unless defined $opts{sign};
  $opts{sign}    = 1 unless defined $opts{sign};
+ $opts{utf8}    = Encode::is_utf8 $msg;
  my $delay = int(1_000_000 / $opts{speed});
 
  my $delay = int(1_000_000 / $opts{speed});
 
- my @head = (
+ # Form the header
+ my @bits = (
   ($opts{utf8} ? 1 : 0),
   ($opts{sign} ? 1 : 0),
  );
  if ($opts{sign}) {
   my $n = 2 ** PID_BITS;
   ($opts{utf8} ? 1 : 0),
   ($opts{sign} ? 1 : 0),
  );
  if ($opts{sign}) {
   my $n = 2 ** PID_BITS;
-  push @head, ($$ & $n) ? 1 : 0 while ($n /= 2) >= 1;
+  push @bits, ($$ & $n) ? 1 : 0 while ($n /= 2) >= 1;
  }
 
  my $tpl = 'B*';
  }
 
  my $tpl = 'B*';
- if ($opts{utf8}) {
-  utf8::encode $msg;
-  $tpl = 'U0' . $tpl;
- }
- my @bits = split //, unpack $tpl, $msg;
+ $tpl = 'U0' . $tpl if $opts{utf8};
+ push @bits, split //, unpack $tpl, $msg;
 
 
- unshift @bits, @head;
  my ($c, $n, @l) = (2, 0, 0, 0, 0);
  for (@bits) {
   if ($c == $_) {
  my ($c, $n, @l) = (2, 0, 0, 0, 0);
  for (@bits) {
   if ($c == $_) {
@@ -141,6 +140,7 @@ sub mrecv (\%@) {
     $tpl = 'U0' . $tpl if $s->{utf8};
     $s->{msg} = pack $tpl, $s->{bits};
     mreset $s;
     $tpl = 'U0' . $tpl if $s->{utf8};
     $s->{msg} = pack $tpl, $s->{bits};
     mreset $s;
+#    Encode::_utf8_off $s->{msg} if !$s->{utf8}; # Workaround a bug in 5.8.x
     $s->{cb}->(@{$s}{qw/sender msg/}) if $s->{cb};
    }
 
     $s->{cb}->(@{$s}{qw/sender msg/}) if $s->{cb};
    }
 
@@ -262,9 +262,9 @@ The emitter computes then the longuest sequence of successives 0 (say, m) and 1
 
 =over 4
 
 
 =over 4
 
-=item - If m > n, we take n+1 times 1 follewed by one 0 ;
+=item - If m > n, we take n+1 times 1 followed by one 0 ;
 
 
-=item - Otherwise, we take m+1 times 0 follewed by one 1.
+=item - Otherwise, we take m+1 times 0 followed by one 1.
 
 =back
 
 
 =back
 
@@ -283,7 +283,7 @@ C<SIGUSR{1,2}> seem to interrupt sleep, so it's not a good idea to transfer data
 
 =head1 DEPENDENCIES
 
 
 =head1 DEPENDENCIES
 
-L<Carp> (standard since perl 5), L<POSIX> (idem), L<Time::HiRes> (since perl 5.7.3) and L<utf8> (since perl 5.6) are required.
+L<Carp> (standard since perl 5), L<POSIX> (idem), L<utf8> (since perl 5.6), L<Encode> (since perl 5.7.3) and L<Time::HiRes> (idem) are required.
 
 =head1 SEE ALSO
 
 
 =head1 SEE ALSO
 
index d05c7efc515455cd3e153abd44a843b0a89ccc70..5c25980877e4c9c5f9100d15cdd899efc61c404a 100644 (file)
@@ -8,9 +8,15 @@ use Test::More tests => 2;
 use lib 't/lib';
 use IPCMTest qw/try init cleanup/;
 
 use lib 't/lib';
 use IPCMTest qw/try init cleanup/;
 
-init;
+sub test {
+ my ($desc, @args) = @_;
+ eval { ok(try(@args), $desc) };
+ fail($desc . " (died : $@)") if $@;
+}
 
 
-ok(try('x', 0), 'anonymous');
-ok(try('x', 1), 'signed');
+init 6;
+
+test 'anonymous' => 'x', 0;
+test 'signed'    => 'x', 1;
 
 cleanup;
 
 cleanup;
index b5cc073c012560b3b93afb41041064bfb55b65d7..a9b6d69350763d2272a39b8c1f82a32da15f94b2 100644 (file)
@@ -8,11 +8,17 @@ use Test::More tests => 4;
 use lib 't/lib';
 use IPCMTest qw/try init cleanup/;
 
 use lib 't/lib';
 use IPCMTest qw/try init cleanup/;
 
-init;
+sub test {
+ my ($desc, @args) = @_;
+ eval { ok(try(@args), $desc) };
+ fail($desc . " (died : $@)") if $@;
+}
 
 
-ok(try('hello'), 'ascii');
-ok(try("\0" x 5), 'few bits');
-ok(try("\x{FF}" x 5), 'lots of bits');
-ok(try("a\0b"), 'null character');
+init 12;
+
+test 'ascii'          => 'hello';
+test 'few bits'       => "\0" x 5;
+test 'lots of bits'   => "\x{FF}" x 5;
+test 'null character' => "a\0b";
 
 cleanup;
 
 cleanup;
index 77ce70c40782127c3ac3cad68eaeb7960a5ccdb3..e0cfab38a94ef68d6a71ed6cd269eda1bd9c2e42 100644 (file)
@@ -10,14 +10,20 @@ use utf8;
 use lib 't/lib';
 use IPCMTest qw/try init cleanup/;
 
 use lib 't/lib';
 use IPCMTest qw/try init cleanup/;
 
-init 1;
-
-ok(try('hello'), 'ascii');
-ok(try("\0" x 5), 'few bits');
-ok(try("\x{FF}" x 5), 'lots of bits');
-ok(try("a\0b"), 'null character');
-ok(try('éàùçà'), 'extended');
-ok(try('€€€'), 'unicode');
-ok(try('à€béd'), 'mixed');
+sub test {
+ my ($desc, @args) = @_;
+ eval { ok(try(@args), $desc) };
+ fail($desc . " (died : $@)") if $@;
+}
+
+init 21;
+
+test 'ascii'          => 'hello';
+test 'few bits'       => "\0" x 5;
+test 'lots of bits'   => "\x{FF}" x 5;
+test 'null character' => "a\0b";
+test 'extended'       => 'éàùçà';
+test 'unicode'        => '€€€';
+test 'mixed'          => 'à€béd';
 
 cleanup;
 
 cleanup;
index ee5a80ce00645818c0fba05605b6448a481d4e5f..6398de09a64dda7844461d5eb453ac64e5c214f5 100644 (file)
@@ -11,7 +11,7 @@ use IPCMTest qw/speed init cleanup/;
 my $diag = sub { diag @_ };
 my @res;
 
 my $diag = sub { diag @_ };
 my @res;
 
-init;
+init 12;
 
 ok(speed(4,  1, $diag, \@res));
 ok(speed(4,  4, $diag, \@res));
 
 ok(speed(4,  1, $diag, \@res));
 ok(speed(4,  4, $diag, \@res));
index 0e13af462069881f2f0a80b37191ecc32585c580..9918dc9da14ca9620bab0ae745bf9103db34bd27 100644 (file)
@@ -2,6 +2,7 @@
 
 use strict;
 use warnings;
 
 use strict;
 use warnings;
+
 use Test::More tests => 3;
 
 sub not_in_file_ok {
 use Test::More tests => 3;
 
 sub not_in_file_ok {
index 1e95c3dc6897784a9bff7930462619480923e513..7775e608d046d625d33d383cd329e8197a3e5ede 100644 (file)
@@ -1,5 +1,8 @@
 #!perl
 
 #!perl
 
+use strict;
+use warnings;
+
 use Test::More;
 
 eval { require Test::Kwalitee; Test::Kwalitee->import() };
 use Test::More;
 
 eval { require Test::Kwalitee; Test::Kwalitee->import() };
index 33d006ca54b1fe2d6c00a5235050f35106833e07..6cd2f43f106827d1195b7b0ae949eceb3a3603db 100644 (file)
@@ -3,6 +3,7 @@ package IPCMTest;
 use strict;
 use warnings;
 
 use strict;
 use warnings;
 
+use Encode;
 use POSIX qw/SIGINT SIGTERM SIGKILL SIGHUP EXIT_FAILURE/;
 
 use IPC::MorseSignals qw/msend mrecv mreset/;
 use POSIX qw/SIGINT SIGTERM SIGKILL SIGHUP EXIT_FAILURE/;
 
 use IPC::MorseSignals qw/msend mrecv mreset/;
@@ -11,9 +12,7 @@ use base qw/Exporter/;
 
 our @EXPORT_OK = qw/try speed init cleanup/;
 
 
 our @EXPORT_OK = qw/try speed init cleanup/;
 
-our $lives = 10;
-
-my ($utf8, $pid, $rdr);
+my ($lives, $pid, $rdr);
 
 sub spawn {
  --$lives;
 
 sub spawn {
  --$lives;
@@ -23,25 +22,24 @@ sub spawn {
  if (!defined $pid) {
   die "fork() failed: $!";
  } elsif ($pid == 0) {
  if (!defined $pid) {
   die "fork() failed: $!";
  } elsif ($pid == 0) {
+  local %SIG;
   close $rdr or die "close() failed: $!";
   close $rdr or die "close() failed: $!";
-  binmode $wtr, ':utf8' if $utf8;
-  my $block = 0;
-  my $rcv = mrecv local %SIG, cb => sub {
-   if ($block) {
-    $block = 0;
-   } else {
-    select $wtr; $| = 1;
-    print $wtr $_[0], ':', $_[1], "\n";
-    select $wtr; $| = 1;
-   }
+  my $rcv = mrecv %SIG, cb => sub {
+   binmode $wtr, ':utf8' if Encode::is_utf8 $_[1];
+   select $wtr; $| = 1;
+   print $wtr $_[0], ':', $_[1], "\n";
+   select $wtr; $| = 1;
   };
   $SIG{HUP} = sub { mreset $rcv };
   };
   $SIG{HUP} = sub { mreset $rcv };
-  $SIG{__WARN__} = sub { $block = 1 };
+  $SIG{__WARN__} = sub {
+   select $wtr; $| = 1;
+   print $wtr "__WARN__\n";
+   select $wtr; $| = 1;
+  };
   1 while 1;
   exit EXIT_FAILURE;
  }
  close $wtr or die "close() failed: $!";
   1 while 1;
   exit EXIT_FAILURE;
  }
  close $wtr or die "close() failed: $!";
- binmode $rdr, ':utf8' if $utf8;
 }
 
 sub slaughter {
 }
 
 sub slaughter {
@@ -52,7 +50,8 @@ sub slaughter {
 }
 
 sub init {
 }
 
 sub init {
- $utf8 = $_[0] || 0;
+ ($lives) = @_;
+ $lives ||= 10;
  spawn;
 }
 
  spawn;
 }
 
@@ -64,25 +63,24 @@ sub try {
  my $speed = 2 ** 16;
  my $ok = 0;
  my @ret;
  my $speed = 2 ** 16;
  my $ok = 0;
  my @ret;
+ binmode $rdr, ((Encode::is_utf8 $msg) ? ':utf8' : ':crlf');
  while (!$ok && (($speed /= 2) >= 1)) {
   my $r = '';
   eval {
    local $SIG{ALRM} = sub { die 'timeout' };
  while (!$ok && (($speed /= 2) >= 1)) {
   my $r = '';
   eval {
    local $SIG{ALRM} = sub { die 'timeout' };
-   local $SIG{__WARN__} = sub { die 'do not want warnings' };
+   local $SIG{__WARN__} = sub { alarm 0; die 'do not want warnings' };
    my $a = (int(100 * (3 * length $msg) / $speed) || 1);
    $a = 10 if $a > 10;
    alarm $a;
    kill SIGHUP => $pid;
    my $a = (int(100 * (3 * length $msg) / $speed) || 1);
    $a = 10 if $a > 10;
    alarm $a;
    kill SIGHUP => $pid;
-   msend $msg => $pid, speed => $speed, utf8 => $utf8, sign => $sign;
+   msend $msg => $pid, speed => $speed, sign => $sign;
    $r = <$rdr>;
    $r = <$rdr>;
+   alarm 0;
   };
   };
-  kill SIGHUP => $pid if $@;
-  alarm 0;
   if (!defined $r) { # Something bad happened, respawn
    close $rdr or die "close() failed: $!";
    slaughter;
    spawn;
   if (!defined $r) { # Something bad happened, respawn
    close $rdr or die "close() failed: $!";
    slaughter;
    spawn;
-   $speed *= 2;      # Retry this speed
   } else {
    chomp $r;
    if ($r eq ((($sign) ? $$ : 0) . ':' . $msg)) {
   } else {
    chomp $r;
    if ($r eq ((($sign) ? $$ : 0) . ':' . $msg)) {
@@ -103,6 +101,7 @@ sub speed {
  my $msg = join '', map { $alpha[rand @alpha] } 1 .. $l;
  my $desc_base = "$l bytes sent $n times";
  while (($ok < $n) && (($speed /= 2) >= 1)) {
  my $msg = join '', map { $alpha[rand @alpha] } 1 .. $l;
  my $desc_base = "$l bytes sent $n times";
  while (($ok < $n) && (($speed /= 2) >= 1)) {
+  $ok = 0;
   my $desc = "$desc_base at $speed bits/s";
   $diag->("try $desc...");
 TRY:
   my $desc = "$desc_base at $speed bits/s";
   $diag->("try $desc...");
 TRY:
@@ -110,21 +109,20 @@ TRY:
    my $r = '';
    eval {
     local $SIG{ALRM} = sub { die 'timeout' };
    my $r = '';
    eval {
     local $SIG{ALRM} = sub { die 'timeout' };
-    local $SIG{__WARN__} = sub { die 'do not want warnings' };
+    local $SIG{__WARN__} = sub { alarm 0; die 'do not want warnings' };
     my $a = (int(100 * (3 * $l) / $speed) || 1);
     $a = 10 if $a > 10;
     alarm $a;
     kill SIGHUP => $pid;
     my $a = (int(100 * (3 * $l) / $speed) || 1);
     $a = 10 if $a > 10;
     alarm $a;
     kill SIGHUP => $pid;
-    msend $msg => $pid, speed => $speed, utf8 => $utf8, sign => 0;
+    msend $msg => $pid, speed => $speed, sign => 0;
     $r = <$rdr>;
     $r = <$rdr>;
+    alarm 0;
    };
    };
-   kill SIGHUP => $pid if $@;
-   alarm 0;
    if (!defined $r) { # Something bad happened, respawn
     close $rdr or die "close() failed: $!";
     slaughter;
     spawn;
    if (!defined $r) { # Something bad happened, respawn
     close $rdr or die "close() failed: $!";
     slaughter;
     spawn;
-    redo TRY;         # Retry this send
+    last TRY;
    } else {
     chomp $r;
     if ($r eq '0:' . $msg) {
    } else {
     chomp $r;
     if ($r eq '0:' . $msg) {
index 703f91de3601f3e0939d7d6e6e780d342c5c381f..5cc37aab1722c310a2de3338fb3aef3c6b8eb9fa 100644 (file)
@@ -1,6 +1,10 @@
 #!perl -T
 
 #!perl -T
 
+use strict;
+use warnings;
+
 use Test::More;
 use Test::More;
+
 eval "use Test::Pod::Coverage 1.04";
 plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
 all_pod_coverage_ok();
 eval "use Test::Pod::Coverage 1.04";
 plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
 all_pod_coverage_ok();
diff --git a/t/pod.t b/t/pod.t
index 976d7cdfb2a829b1383ffe12570180e25c14668c..f1e1d3e375d2b802ad35abd32ba55f7f5eddacae 100644 (file)
--- a/t/pod.t
+++ b/t/pod.t
@@ -1,6 +1,10 @@
 #!perl -T
 
 #!perl -T
 
+use strict;
+use warnings;
+
 use Test::More;
 use Test::More;
+
 eval "use Test::Pod 1.14";
 plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
 all_pod_files_ok();
 eval "use Test::Pod 1.14";
 plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
 all_pod_files_ok();