r25726 - in /trunk/libpar-dist-perl: Changes META.yml debian/changelog lib/PAR/Dist.pm t/03merge_meta.t

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Wed Oct 1 21:21:00 UTC 2008


Author: gregoa
Date: Wed Oct  1 21:20:57 2008
New Revision: 25726

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=25726
Log:
New upstream release.

Modified:
    trunk/libpar-dist-perl/Changes
    trunk/libpar-dist-perl/META.yml
    trunk/libpar-dist-perl/debian/changelog
    trunk/libpar-dist-perl/lib/PAR/Dist.pm
    trunk/libpar-dist-perl/t/03merge_meta.t

Modified: trunk/libpar-dist-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-dist-perl/Changes?rev=25726&op=diff
==============================================================================
--- trunk/libpar-dist-perl/Changes (original)
+++ trunk/libpar-dist-perl/Changes Wed Oct  1 21:20:57 2008
@@ -1,3 +1,13 @@
+By: smueller on 2008/09/30
+    * Skip 03merge_meta tests if no YAML *DUMPER* could be found.
+    * Better debug output for the YAML-search.
+    * This is 0.36.
+____________________________________________________________________________
+By: smueller on 2008/09/30
+    * Skip 03merge_meta tests if no A::Zip nor zip/unzip found.
+    * Better error messages from _zip/_unzip
+    * This is 0.35.
+____________________________________________________________________________
 By: smueller on 2008/09/24
     * Do not fail if _zip() doesn't return true, doh!
     * This is 0.34.

Modified: trunk/libpar-dist-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-dist-perl/META.yml?rev=25726&op=diff
==============================================================================
--- trunk/libpar-dist-perl/META.yml (original)
+++ trunk/libpar-dist-perl/META.yml Wed Oct  1 21:20:57 2008
@@ -1,11 +1,11 @@
 --- #YAML:1.0
 name:                PAR-Dist
-version:             0.34
+version:             0.36
 abstract:            Create and manipulate PAR distributions
 license:             ~
 author:              
     - Audrey Tang <cpan at audreyt.org>
-generated_by:        ExtUtils::MakeMaker version 6.42
+generated_by:        ExtUtils::MakeMaker version 6.44
 distribution_type:   module
 requires:     
     File::Find:                    0

Modified: trunk/libpar-dist-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-dist-perl/debian/changelog?rev=25726&op=diff
==============================================================================
--- trunk/libpar-dist-perl/debian/changelog (original)
+++ trunk/libpar-dist-perl/debian/changelog Wed Oct  1 21:20:57 2008
@@ -1,3 +1,9 @@
+libpar-dist-perl (0.36-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- gregor herrmann <gregoa at debian.org>  Wed, 01 Oct 2008 23:19:41 +0200
+
 libpar-dist-perl (0.34-1) unstable; urgency=low
 
   * New upstream release.

Modified: trunk/libpar-dist-perl/lib/PAR/Dist.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-dist-perl/lib/PAR/Dist.pm?rev=25726&op=diff
==============================================================================
--- trunk/libpar-dist-perl/lib/PAR/Dist.pm (original)
+++ trunk/libpar-dist-perl/lib/PAR/Dist.pm Wed Oct  1 21:20:57 2008
@@ -1,8 +1,8 @@
 package PAR::Dist;
 require Exporter;
-use vars qw/$VERSION @ISA @EXPORT @EXPORT_OK/;
-
-$VERSION    = '0.34';
+use vars qw/$VERSION @ISA @EXPORT @EXPORT_OK $DEBUG/;
+
+$VERSION    = '0.36';
 @ISA	    = 'Exporter';
 @EXPORT	    = qw/
   blib_to_par
@@ -21,6 +21,8 @@
   contains_binaries
 /;
 
+$DEBUG = 0;
+
 use strict;
 use Carp qw/carp croak/;
 use File::Spec;
@@ -31,7 +33,7 @@
 
 =head1 VERSION
 
-This document describes version 0.34 of PAR::Dist, released September 24, 2008.
+This document describes version 0.36 of PAR::Dist, released September 30, 2008.
 
 =head1 SYNOPSIS
 
@@ -744,10 +746,11 @@
   foreach my $module (@modules) {
     eval "require $module;";
     if (!$@) {
+      warn "PAR::Dist testers/debug info: Using '$module' as YAML implementation" if $DEBUG;
       foreach my $sub (qw(Load Dump LoadFile DumpFile)) {
         no strict 'refs';
         my $subref = \&{"${module}::$sub"};
-        if (defined $subref) {
+        if (defined $subref and ref($subref) eq 'CODE') {
           $yaml_functions{$sub} = $subref;
         }
       }
@@ -899,7 +902,11 @@
     }
     # Then fall back to the system
     else {
-        return if system(unzip => $dist, '-d', $path);
+        undef $!;
+        if (system(unzip => $dist, '-d', $path)) {
+            die "Failed to unzip '$dist' to path '$path': Could neither load "
+                . "Archive::Zip nor (successfully) run the system 'unzip' (unzip said: $!)";
+        }
     }
 
     return 1;
@@ -915,7 +922,11 @@
         $zip->writeToFileNamed( $dist ) == Archive::Zip::AZ_OK() or die $!;
     }
     else {
-        system(qw(zip -r), $dist, File::Spec->curdir) and die $!;
+        undef $!;
+        if (system(qw(zip -r), $dist, File::Spec->curdir)) {
+            die "Failed to zip '" .File::Spec->curdir(). "' to '$dist': Could neither load "
+                . "Archive::Zip nor (successfully) run the system 'zip' (zip said: $!)";
+        }
     }
     return 1;
 }

Modified: trunk/libpar-dist-perl/t/03merge_meta.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-dist-perl/t/03merge_meta.t?rev=25726&op=diff
==============================================================================
--- trunk/libpar-dist-perl/t/03merge_meta.t (original)
+++ trunk/libpar-dist-perl/t/03merge_meta.t Wed Oct  1 21:20:57 2008
@@ -7,21 +7,31 @@
 BEGIN { $loaded = eval { require PAR::Dist; 1 } };
 BEGIN {
   my $tests = 25;
-  if ($loaded) {
+  if ($loaded) {  
+    # skip these tests without YAML loader or without (A::Zip or zipo/unzip)
+    $PAR::Dist::DEBUG = 1;
     my ($y_func) = PAR::Dist::_get_yaml_functions();
-    if ($y_func and exists $y_func->{Load}) {
+    $PAR::Dist::DEBUG = 0;
+    if (not $y_func or not exists $y_func->{DumpFile}) {
+      plan tests => 1;
+      skip("Skip because no YAML loader/dumper could be found");
+      exit();
+    }
+    elsif (not eval {use Archive::Zip; 1;}
+           and (not system("zip") or not system("unzip")))
+    {
+      plan tests => 1;
+      skip("Skip because neither Archive::Zip nor zip/unzip could be found");
+      exit();
+    }
+    else {
       plan tests => $tests;
       ok(1);
-    }
-    else {
-      plan tests => 1;
-      skip("Skip because no YAML loader could be found");
-      exit();
     }
   }
   else {
     plan tests => $tests;
-    ok(0);
+    ok(0, "Could not load PAR::Dist: $@");
     exit();
   }
 }




More information about the Pkg-perl-cvs-commits mailing list