r42293 - in /trunk/libautodie-perl: Changes META.yml debian/changelog 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:49:23 UTC 2009


Author: dmn
Date: Fri Aug 21 12:49:17 2009
New Revision: 42293

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=42293
Log:
New upstream release
Closes: #542023 -- new upstream development release, version numbering

Modified:
    trunk/libautodie-perl/Changes
    trunk/libautodie-perl/META.yml
    trunk/libautodie-perl/debian/changelog
    trunk/libautodie-perl/lib/Fatal.pm
    trunk/libautodie-perl/lib/autodie.pm
    trunk/libautodie-perl/lib/autodie/exception.pm
    trunk/libautodie-perl/lib/autodie/exception/system.pm
    trunk/libautodie-perl/lib/autodie/hints.pm
    trunk/libautodie-perl/t/flock.t
    trunk/libautodie-perl/t/hints.t

Modified: trunk/libautodie-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libautodie-perl/Changes?rev=42293&op=diff
==============================================================================
--- trunk/libautodie-perl/Changes (original)
+++ trunk/libautodie-perl/Changes Fri Aug 21 12:49:17 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: trunk/libautodie-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libautodie-perl/META.yml?rev=42293&op=diff
==============================================================================
--- trunk/libautodie-perl/META.yml (original)
+++ trunk/libautodie-perl/META.yml Fri Aug 21 12:49:17 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: trunk/libautodie-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libautodie-perl/debian/changelog?rev=42293&op=diff
==============================================================================
--- trunk/libautodie-perl/debian/changelog (original)
+++ trunk/libautodie-perl/debian/changelog Fri Aug 21 12:49:17 2009
@@ -1,3 +1,10 @@
+libautodie-perl (2.06.01-1) UNRELEASED; urgency=low
+
+  * New upstream release
+    Closes: #542023 -- new upstream development release, version numbering
+
+ -- Damyan Ivanov <dmn at debian.org>  Fri, 21 Aug 2009 15:46:35 +0300
+
 libautodie-perl (2.06-1) unstable; urgency=low
 
   * New upstream release

Modified: trunk/libautodie-perl/lib/Fatal.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libautodie-perl/lib/Fatal.pm?rev=42293&op=diff
==============================================================================
--- trunk/libautodie-perl/lib/Fatal.pm (original)
+++ trunk/libautodie-perl/lib/Fatal.pm Fri Aug 21 12:49:17 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: trunk/libautodie-perl/lib/autodie.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libautodie-perl/lib/autodie.pm?rev=42293&op=diff
==============================================================================
--- trunk/libautodie-perl/lib/autodie.pm (original)
+++ trunk/libautodie-perl/lib/autodie.pm Fri Aug 21 12:49:17 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: trunk/libautodie-perl/lib/autodie/exception.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libautodie-perl/lib/autodie/exception.pm?rev=42293&op=diff
==============================================================================
--- trunk/libautodie-perl/lib/autodie/exception.pm (original)
+++ trunk/libautodie-perl/lib/autodie/exception.pm Fri Aug 21 12:49:17 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: trunk/libautodie-perl/lib/autodie/exception/system.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libautodie-perl/lib/autodie/exception/system.pm?rev=42293&op=diff
==============================================================================
--- trunk/libautodie-perl/lib/autodie/exception/system.pm (original)
+++ trunk/libautodie-perl/lib/autodie/exception/system.pm Fri Aug 21 12:49:17 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: trunk/libautodie-perl/lib/autodie/hints.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libautodie-perl/lib/autodie/hints.pm?rev=42293&op=diff
==============================================================================
--- trunk/libautodie-perl/lib/autodie/hints.pm (original)
+++ trunk/libautodie-perl/lib/autodie/hints.pm Fri Aug 21 12:49:17 2009
@@ -5,7 +5,7 @@
 
 use constant PERL58 => ( $] < 5.009 );
 
-our $VERSION = '2.06';
+our $VERSION = '2.06_01';
 
 =head1 NAME
 

Modified: trunk/libautodie-perl/t/flock.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libautodie-perl/t/flock.t?rev=42293&op=diff
==============================================================================
--- trunk/libautodie-perl/t/flock.t (original)
+++ trunk/libautodie-perl/t/flock.t Fri Aug 21 12:49:17 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: trunk/libautodie-perl/t/hints.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libautodie-perl/t/hints.t?rev=42293&op=diff
==============================================================================
--- trunk/libautodie-perl/t/hints.t (original)
+++ trunk/libautodie-perl/t/hints.t Fri Aug 21 12:49:17 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