r42291 - in /branches/upstream/libautodie-perl/current: Changes META.yml lib/Fatal.pm lib/autodie.pm lib/autodie/exception.pm lib/autodie/exception/system.pm lib/autodie/hints.pm t/flock.t t/hints.t
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Fri Aug 21 12:46:21 UTC 2009
Author: dmn
Date: Fri Aug 21 12:46:15 2009
New Revision: 42291
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=42291
Log:
[svn-upgrade] Integrating new upstream version, libautodie-perl (2.06.01)
Modified:
branches/upstream/libautodie-perl/current/Changes
branches/upstream/libautodie-perl/current/META.yml
branches/upstream/libautodie-perl/current/lib/Fatal.pm
branches/upstream/libautodie-perl/current/lib/autodie.pm
branches/upstream/libautodie-perl/current/lib/autodie/exception.pm
branches/upstream/libautodie-perl/current/lib/autodie/exception/system.pm
branches/upstream/libautodie-perl/current/lib/autodie/hints.pm
branches/upstream/libautodie-perl/current/t/flock.t
branches/upstream/libautodie-perl/current/t/hints.t
Modified: branches/upstream/libautodie-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libautodie-perl/current/Changes?rev=42291&op=diff
==============================================================================
--- branches/upstream/libautodie-perl/current/Changes (original)
+++ branches/upstream/libautodie-perl/current/Changes Fri Aug 21 12:46:15 2009
@@ -1,4 +1,12 @@
Revision history for autodie
+
+2.06_01 Thu Jul 23 18:46:47 PDT 2009
+
+ * FEATURE: Added ->eval_error to autodie::exception, which
+ stores the contents of $@ at the time autodie throws its
+ own exception. This is useful when dealing with modules
+ such as Text::Balanced which set (but do not throw)
+ $@ on error.
2.06 Tue Jul 7 00:01:37 AUSEST 2009
@@ -14,6 +22,11 @@
* BUGFIX: autodie once again correctly works when used
inside a string eval. (This was accidently broken
somewhere around 1.997-1.998).
+
+ * TEST: Checking for flock() support no longer causes
+ test failures on older VMS sysstems. (RT #47812)
+ Thanks to Craig A. Berry for supplying a patch.
+
2.05 Sat Jul 4 16:33:01 AUSEST 2009
Modified: branches/upstream/libautodie-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libautodie-perl/current/META.yml?rev=42291&op=diff
==============================================================================
--- branches/upstream/libautodie-perl/current/META.yml (original)
+++ branches/upstream/libautodie-perl/current/META.yml Fri Aug 21 12:46:15 2009
@@ -27,4 +27,4 @@
bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=autodie
license: http://dev.perl.org/licenses/
repository: http://github.com/pfenwick/autodie/tree/master
-version: 2.06
+version: 2.06_01
Modified: branches/upstream/libautodie-perl/current/lib/Fatal.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libautodie-perl/current/lib/Fatal.pm?rev=42291&op=diff
==============================================================================
--- branches/upstream/libautodie-perl/current/lib/Fatal.pm (original)
+++ branches/upstream/libautodie-perl/current/lib/Fatal.pm Fri Aug 21 12:46:15 2009
@@ -39,7 +39,7 @@
use constant MIN_IPC_SYS_SIMPLE_VER => 0.12;
# All the Fatal/autodie modules share the same version number.
-our $VERSION = '2.06';
+our $VERSION = '2.06_01';
our $Debug ||= 0;
@@ -101,6 +101,7 @@
':2.04' => [qw(:default)],
':2.05' => [qw(:default)],
':2.06' => [qw(:default)],
+ ':2.06_01' => [qw(:default)],
);
$TAGS{':all'} = [ keys %TAGS ];
@@ -698,6 +699,7 @@
function => q{$human_sub_name}, args => [ @argv ],
pragma => q{$class}, errno => \$!,
context => \$context, return => \$retval,
+ eval_error => \$@
)
};
Modified: branches/upstream/libautodie-perl/current/lib/autodie.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libautodie-perl/current/lib/autodie.pm?rev=42291&op=diff
==============================================================================
--- branches/upstream/libautodie-perl/current/lib/autodie.pm (original)
+++ branches/upstream/libautodie-perl/current/lib/autodie.pm Fri Aug 21 12:46:15 2009
@@ -8,7 +8,7 @@
our $VERSION;
BEGIN {
- $VERSION = '2.06';
+ $VERSION = '2.06_01';
}
use constant ERROR_WRONG_FATAL => q{
@@ -373,9 +373,6 @@
statements, although it can be explicitly enabled inside a string
C<eval>.
-Under Perl 5.10 only, C<autodie> I<does not> operate correctly when
-used inside a string C<eval>.
-
Under Perl 5.10 only, using a string eval when C<autodie> is in
effect can cause the autodie behaviour to leak into the surrounding
scope. This can be worked around by using a C<no autodie> at the
Modified: branches/upstream/libautodie-perl/current/lib/autodie/exception.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libautodie-perl/current/lib/autodie/exception.pm?rev=42291&op=diff
==============================================================================
--- branches/upstream/libautodie-perl/current/lib/autodie/exception.pm (original)
+++ branches/upstream/libautodie-perl/current/lib/autodie/exception.pm Fri Aug 21 12:46:15 2009
@@ -14,7 +14,7 @@
use if ($] >= 5.010), overload => '~~' => "matches";
-our $VERSION = '2.06';
+our $VERSION = '2.06_01';
my $PACKAGE = __PACKAGE__; # Useful to have a scalar for hash keys.
@@ -169,6 +169,18 @@
# everything.
sub errno { return $_[0]->{$PACKAGE}{errno}; }
+
+=head3 eval_error
+
+ my $old_eval_error = $E->eval_error;
+
+The contents of C<$@> immediately after autodie triggered an
+exception. This may be useful when dealing with modules such
+as L<Text::Balanced> that set (but do not throw) C<$@> on error.
+
+=cut
+
+sub eval_error { return $_[0]->{$PACKAGE}{eval_error}; }
=head3 matches
@@ -698,6 +710,7 @@
$this->{$PACKAGE}{context} = $args{context};
$this->{$PACKAGE}{return} = $args{return};
+ $this->{$PACKAGE}{eval_error} = $args{eval_error};
$this->{$PACKAGE}{args} = $args{args} || [];
$this->{$PACKAGE}{function}= $args{function} or
Modified: branches/upstream/libautodie-perl/current/lib/autodie/exception/system.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libautodie-perl/current/lib/autodie/exception/system.pm?rev=42291&op=diff
==============================================================================
--- branches/upstream/libautodie-perl/current/lib/autodie/exception/system.pm (original)
+++ branches/upstream/libautodie-perl/current/lib/autodie/exception/system.pm Fri Aug 21 12:46:15 2009
@@ -5,7 +5,7 @@
use base 'autodie::exception';
use Carp qw(croak);
-our $VERSION = '2.06';
+our $VERSION = '2.06_01';
my $PACKAGE = __PACKAGE__;
Modified: branches/upstream/libautodie-perl/current/lib/autodie/hints.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libautodie-perl/current/lib/autodie/hints.pm?rev=42291&op=diff
==============================================================================
--- branches/upstream/libautodie-perl/current/lib/autodie/hints.pm (original)
+++ branches/upstream/libautodie-perl/current/lib/autodie/hints.pm Fri Aug 21 12:46:15 2009
@@ -5,7 +5,7 @@
use constant PERL58 => ( $] < 5.009 );
-our $VERSION = '2.06';
+our $VERSION = '2.06_01';
=head1 NAME
Modified: branches/upstream/libautodie-perl/current/t/flock.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libautodie-perl/current/t/flock.t?rev=42291&op=diff
==============================================================================
--- branches/upstream/libautodie-perl/current/t/flock.t (original)
+++ branches/upstream/libautodie-perl/current/t/flock.t Fri Aug 21 12:46:15 2009
@@ -23,7 +23,7 @@
plan skip_all => "Cannot lock this test on this system.";
}
-my $flock_return = flock($self_fh, LOCK_EX | LOCK_NB);
+my $flock_return = eval { flock($self_fh, LOCK_EX | LOCK_NB); };
if (not $flock_return) {
plan skip_all => "flock on my own test not supported on this system.";
Modified: branches/upstream/libautodie-perl/current/t/hints.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libautodie-perl/current/t/hints.t?rev=42291&op=diff
==============================================================================
--- branches/upstream/libautodie-perl/current/t/hints.t (original)
+++ branches/upstream/libautodie-perl/current/t/hints.t Fri Aug 21 12:46:15 2009
@@ -15,6 +15,16 @@
use constant PERL510 => ( $] >= 5.0100 );
use constant PERL5101 => ( $] >= 5.0101 );
+use constant PERL5102 => ( $] >= 5.0102 );
+
+# File::Copy states that all subroutines return '0' on failure.
+# However both Windows and VMS may return other false values
+# (notably empty-string) on failure. This constant indicates
+# whether we should skip some tests because the return values
+# from File::Copy may not be what's in the documentation.
+
+use constant WEIRDO_FILE_COPY =>
+ ( ! PERL5102 and ( $^O eq "MSWin32" or $^O eq "VMS" ));
use Hints_test qw(
fail_on_empty fail_on_false fail_on_undef
@@ -63,8 +73,8 @@
is($@->function, "File::Copy::copy", "Function should be original name");
SKIP: {
- skip("File::Copy is weird on Win32 before 5.10.1", 1)
- if ( ! PERL5101 and $^O eq "MSWin32" );
+ skip("File::Copy is weird on Win32/VMS before 5.10.1", 1)
+ if WEIRDO_FILE_COPY;
is($@->return, 0, "File::Copy returns zero on failure");
}
@@ -85,8 +95,8 @@
is($@->function, "File::Copy::copy", "Function should be original name");
SKIP: {
- skip("File::Copy is weird on Win32 before 5.10.1", 1)
- if ( ! PERL5101 and $^O eq "MSWin32" );
+ skip("File::Copy is weird on Win32/VMS before 5.10.1", 1)
+ if WEIRDO_FILE_COPY;
is_deeply($@->return, [0], "File::Copy returns zero on failure");
}
More information about the Pkg-perl-cvs-commits
mailing list