summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Fenwick <pjf@perltraining.com.au>2009-07-02 23:55:08 +1000
committerH.Merijn Brand <h.m.brand@xs4all.nl>2009-07-02 16:24:04 +0200
commit6c4f9c520f7c863966a9eaf04834a7f12d49a9bc (patch)
treec6c47c67df569c72e97f1207072779725864fdea /lib
parentaa51dd4123784e6e747b83403a96885ffb248802 (diff)
downloadperl-6c4f9c520f7c863966a9eaf04834a7f12d49a9bc.tar.gz
Upgrade autodie to 2.04
G'day p5p, Sorry about the slew of autodie patches. This is hopefully the last one you'll see for a while, and merely fixes some nits in the test suite. Generated against the latest blead, but there's a chance some of these changes may already be applied. Apologies for any inconvenience caused. All the best, Paul -- Paul Fenwick <pjf@perltraining.com.au> | http://perltraining.com.au/ Director of Training | Ph: +61 3 9354 6001 Perl Training Australia | Fax: +61 3 9354 2681 From 2ac05f822da3f96c6453dd32570bc76e4a8e1489 Mon Sep 17 00:00:00 2001 From: Paul Fenwick <pjf@perltraining.com.au> Date: Thu, 2 Jul 2009 23:46:53 +1000 Subject: [PATCH] Upgrade autodie to 2.04 * TEST: Removed spurious warning about insufficient credit. * TEST: hints.t produces less debugging output when testing the Perl core. (Thanks to Jerry D. Hedden) * TEST: hints.t no longer spuriously fails when checking the return values from File::Copy under Windows before Perl 5.10.1. (Thanks to Curtis Jewell) Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/Fatal.pm4
-rw-r--r--lib/autodie.pm2
-rw-r--r--lib/autodie/exception.pm2
-rw-r--r--lib/autodie/exception/system.pm2
-rw-r--r--lib/autodie/hints.pm2
-rwxr-xr-xlib/autodie/t/hints.t19
6 files changed, 22 insertions, 9 deletions
diff --git a/lib/Fatal.pm b/lib/Fatal.pm
index e65cc57049..be20a2b89a 100644
--- a/lib/Fatal.pm
+++ b/lib/Fatal.pm
@@ -39,7 +39,7 @@ use constant ERROR_58_HINTS => q{Non-subroutine %s hints for %s are not supporte
use constant MIN_IPC_SYS_SIMPLE_VER => 0.12;
# All the Fatal/autodie modules share the same version number.
-our $VERSION = '2.03';
+our $VERSION = '2.04';
our $Debug ||= 0;
@@ -98,7 +98,7 @@ my %TAGS = (
':2.01' => [qw(:default)],
':2.02' => [qw(:default)],
':2.03' => [qw(:default)],
-
+ ':2.04' => [qw(:default)],
);
$TAGS{':all'} = [ keys %TAGS ];
diff --git a/lib/autodie.pm b/lib/autodie.pm
index 72f312e08d..1f8d7e5fd3 100644
--- a/lib/autodie.pm
+++ b/lib/autodie.pm
@@ -8,7 +8,7 @@ our @ISA = qw(Fatal);
our $VERSION;
BEGIN {
- $VERSION = '2.03';
+ $VERSION = '2.04';
}
use constant ERROR_WRONG_FATAL => q{
diff --git a/lib/autodie/exception.pm b/lib/autodie/exception.pm
index 364b134155..5a09617eba 100644
--- a/lib/autodie/exception.pm
+++ b/lib/autodie/exception.pm
@@ -14,7 +14,7 @@ use overload
use if ($] >= 5.010), overload => '~~' => "matches";
-our $VERSION = '2.03';
+our $VERSION = '2.04';
my $PACKAGE = __PACKAGE__; # Useful to have a scalar for hash keys.
diff --git a/lib/autodie/exception/system.pm b/lib/autodie/exception/system.pm
index d7be816f96..59b2eaf4a1 100644
--- a/lib/autodie/exception/system.pm
+++ b/lib/autodie/exception/system.pm
@@ -5,7 +5,7 @@ use warnings;
use base 'autodie::exception';
use Carp qw(croak);
-our $VERSION = '2.03';
+our $VERSION = '2.04';
my $PACKAGE = __PACKAGE__;
diff --git a/lib/autodie/hints.pm b/lib/autodie/hints.pm
index 71b371a81d..db22467f19 100644
--- a/lib/autodie/hints.pm
+++ b/lib/autodie/hints.pm
@@ -5,7 +5,7 @@ use warnings;
use constant PERL58 => ( $] < 5.009 );
-our $VERSION = '2.03';
+our $VERSION = '2.04';
=head1 NAME
diff --git a/lib/autodie/t/hints.t b/lib/autodie/t/hints.t
index ec1ef32e7a..c21fde5ff6 100755
--- a/lib/autodie/t/hints.t
+++ b/lib/autodie/t/hints.t
@@ -23,7 +23,7 @@ use Hints_test qw(
use autodie qw(fail_on_empty fail_on_false fail_on_undef);
diag("Sub::Identify ", exists( $INC{'Sub/Identify.pm'} ) ? "is" : "is not",
- " loaded");
+ " loaded") if (! $ENV{PERL_CORE});
my $hints = "autodie::hints";
@@ -61,7 +61,14 @@ isnt("$@", "", "Copying in scalar context should throw an error.");
isa_ok($@, "autodie::exception");
is($@->function, "File::Copy::copy", "Function should be original name");
-is($@->return, 0, "File::Copy returns zero on failure");
+
+SKIP: {
+ skip("File::Copy is weird on Win32 before 5.10.1", 1)
+ if ( ! PERL5101 and $^O eq "MSWin32" );
+
+ is($@->return, 0, "File::Copy returns zero on failure");
+}
+
is($@->context, "scalar", "File::Copy called in scalar context");
# List context test.
@@ -76,7 +83,13 @@ isnt("$@", "", "Copying in list context should throw an error.");
isa_ok($@, "autodie::exception");
is($@->function, "File::Copy::copy", "Function should be original name");
-is_deeply($@->return, [0], "File::Copy returns zero on failure");
+
+SKIP: {
+ skip("File::Copy is weird on Win32 before 5.10.1", 1)
+ if ( ! PERL5101 and $^O eq "MSWin32" );
+
+ is_deeply($@->return, [0], "File::Copy returns zero on failure");
+}
is($@->context, "list", "File::Copy called in list context");
# Tests on loaded funcs.