From: Paul Fenwick Date: Sat, 3 Jan 2009 01:17:32 +0000 (-0600) Subject: Subject: [PATCH] Update autodie to 1.998 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3776a2029920e2a44859557cfb9ab34f869f7e36;p=p5sagit%2Fp5-mst-13.2.git Subject: [PATCH] Update autodie to 1.998 From: Paul Fenwick Date: Sat, 03 Jan 2009 11:32:59 +1100 Message-ID: <495EB23B.6080504@perltraining.com.au> --- diff --git a/lib/Fatal.pm b/lib/Fatal.pm index 0f7ef8f..bc92630 100644 --- a/lib/Fatal.pm +++ b/lib/Fatal.pm @@ -31,7 +31,7 @@ use constant ERROR_FATAL_CONFLICT => q{"use Fatal '%s'" is not allowed while "no use constant MIN_IPC_SYS_SIMPLE_VER => 0.12; # All the Fatal/autodie modules share the same version number. -our $VERSION = '1.997'; +our $VERSION = '1.998'; our $Debug ||= 0; @@ -83,6 +83,7 @@ my %TAGS = ( ':1.995' => [qw(:default)], ':1.996' => [qw(:default)], ':1.997' => [qw(:default)], + ':1.998' => [qw(:default)], ); @@ -1092,6 +1093,10 @@ C clobbers the context in which a function is called and always makes it a scalar context, except when the C<:void> tag is used. This problem does not exist in L. +"Used only once" warnings can be generated when C or C +is used with package filehandles (eg, C). It's strongly recommended +you use scalar filehandles instead. + =head1 AUTHOR Original module by Lionel Cons (CERN). diff --git a/lib/autodie.pm b/lib/autodie.pm index 38c12f9..41ad856 100644 --- a/lib/autodie.pm +++ b/lib/autodie.pm @@ -8,7 +8,7 @@ our @ISA = qw(Fatal); our $VERSION; BEGIN { - $VERSION = "1.997"; + $VERSION = "1.998"; } use constant ERROR_WRONG_FATAL => q{ diff --git a/lib/autodie/exception.pm b/lib/autodie/exception.pm index 43f50fc..45a32b0 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 = '1.997'; +our $VERSION = '1.998'; 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 e286b51..e49bf4b 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 = '1.997'; +our $VERSION = '1.998'; my $PACKAGE = __PACKAGE__; diff --git a/t/lib/autodie/truncate.t b/t/lib/autodie/truncate.t index c99f500..e69ee32 100644 --- a/t/lib/autodie/truncate.t +++ b/t/lib/autodie/truncate.t @@ -6,13 +6,14 @@ use File::Temp qw(tempfile); use IO::Handle; my $tmpfh = tempfile(); +my $truncate_status; eval { - truncate($tmpfh, 0); + $truncate_status = truncate($tmpfh, 0); }; -if ($@) { - plan skip_all => 'Truncate not implemented on this system'; +if ($@ || !defined($truncate_status)) { + plan skip_all => 'Truncate not implemented or not working on this system'; } plan tests => 3;