r31428 - in /trunk/libfile-sharedir-par-perl: ./ debian/ inc/Module/ inc/Module/Install/ lib/File/ShareDir/ t/

antonio-guest at users.alioth.debian.org antonio-guest at users.alioth.debian.org
Wed Mar 4 23:09:30 UTC 2009


Author: antonio-guest
Date: Wed Mar  4 23:09:27 2009
New Revision: 31428

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=31428
Log:
FTBS: waiting for libpar-perl 0.989, _first_member_matching
is not defined on previous versions
* New upstream release
* Adding me to the Uploaders

Modified:
    trunk/libfile-sharedir-par-perl/Changes
    trunk/libfile-sharedir-par-perl/META.yml
    trunk/libfile-sharedir-par-perl/Makefile.PL
    trunk/libfile-sharedir-par-perl/debian/changelog
    trunk/libfile-sharedir-par-perl/debian/control
    trunk/libfile-sharedir-par-perl/inc/Module/Install.pm
    trunk/libfile-sharedir-par-perl/inc/Module/Install/Base.pm
    trunk/libfile-sharedir-par-perl/inc/Module/Install/Can.pm
    trunk/libfile-sharedir-par-perl/inc/Module/Install/Fetch.pm
    trunk/libfile-sharedir-par-perl/inc/Module/Install/Makefile.pm
    trunk/libfile-sharedir-par-perl/inc/Module/Install/Metadata.pm
    trunk/libfile-sharedir-par-perl/inc/Module/Install/Share.pm
    trunk/libfile-sharedir-par-perl/inc/Module/Install/Win32.pm
    trunk/libfile-sharedir-par-perl/inc/Module/Install/WriteAll.pm
    trunk/libfile-sharedir-par-perl/lib/File/ShareDir/PAR.pm
    trunk/libfile-sharedir-par-perl/t/03_with_par.t

Modified: trunk/libfile-sharedir-par-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-sharedir-par-perl/Changes?rev=31428&op=diff
==============================================================================
--- trunk/libfile-sharedir-par-perl/Changes (original)
+++ trunk/libfile-sharedir-par-perl/Changes Wed Mar  4 23:09:27 2009
@@ -1,4 +1,7 @@
 Revision history for Perl extension File::ShareDir::PAR
+
+0.04 Mon  2 Mar 2009
+  - Fix issues accessing the dist_dir of PAR'd exes.
 
 0.03 Sat 15 Nov 2008
   - Fix issue on Win32 wrt path separators.

Modified: trunk/libfile-sharedir-par-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-sharedir-par-perl/META.yml?rev=31428&op=diff
==============================================================================
--- trunk/libfile-sharedir-par-perl/META.yml (original)
+++ trunk/libfile-sharedir-par-perl/META.yml Wed Mar  4 23:09:27 2009
@@ -6,7 +6,7 @@
   ExtUtils::MakeMaker: 6.11
   Test::More: 0.47
 distribution_type: module
-generated_by: 'Module::Install version 0.77'
+generated_by: 'Module::Install version 0.79'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -15,10 +15,9 @@
 name: File-ShareDir-PAR
 no_index:
   directory:
+    - foo
+    - inc
     - share
-    - foo
-    - share
-    - inc
     - t
 requires:
   Carp: 0
@@ -26,8 +25,9 @@
   File::Path: 0
   File::ShareDir: 0
   File::Spec: 0.80
+  PAR: 0.989
   Params::Util: 0.07
   perl: 5.005
 resources:
   license: http://dev.perl.org/licenses/
-version: 0.03
+version: 0.04

Modified: trunk/libfile-sharedir-par-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-sharedir-par-perl/Makefile.PL?rev=31428&op=diff
==============================================================================
--- trunk/libfile-sharedir-par-perl/Makefile.PL (original)
+++ trunk/libfile-sharedir-par-perl/Makefile.PL Wed Mar  4 23:09:27 2009
@@ -9,6 +9,7 @@
 requires      'Params::Util'     => '0.07';
 requires      'Class::Inspector' => '1.12';
 requires      'File::Spec'       => '0.80';
+requires      'PAR'              => '0.989';
 test_requires 'Test::More'       => '0.47';
 
 # Default version

Modified: trunk/libfile-sharedir-par-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-sharedir-par-perl/debian/changelog?rev=31428&op=diff
==============================================================================
--- trunk/libfile-sharedir-par-perl/debian/changelog (original)
+++ trunk/libfile-sharedir-par-perl/debian/changelog Wed Mar  4 23:09:27 2009
@@ -1,3 +1,13 @@
+libfile-sharedir-par-perl (0.04-1) UNRELEASED; urgency=low
+
+  FTBS: waiting for libpar-perl 0.989, _first_member_matching
+  is not defined on previous versions
+
+  * New upstream release
+  * Adding me to the Uploaders
+
+ -- Antonio Radici <antonio at dyne.org>  Tue, 03 Mar 2009 23:58:32 +0000
+
 libfile-sharedir-par-perl (0.03-1) unstable; urgency=low
 
   * Initial Release. Closes: #505763 -- ITP

Modified: trunk/libfile-sharedir-par-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-sharedir-par-perl/debian/control?rev=31428&op=diff
==============================================================================
--- trunk/libfile-sharedir-par-perl/debian/control (original)
+++ trunk/libfile-sharedir-par-perl/debian/control Wed Mar  4 23:09:27 2009
@@ -4,9 +4,9 @@
 Build-Depends: debhelper (>= 7)
 Build-Depends-Indep: perl (>= 5.005),
  libparams-util-perl (>= 0.07), libfile-sharedir-perl (>= 1.0),
- libclass-inspector-perl (>= 1.12), libpar-perl (>= 0.983)
+ libclass-inspector-perl (>= 1.12), libpar-perl (>= 0.989)
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Alex Muntada <alexm at alexm.org>
+Uploaders: Alex Muntada <alexm at alexm.org>, Antonio Radici <antonio at dyne.org>
 Standards-Version: 3.8.0
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libfile-sharedir-par-perl/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libfile-sharedir-par-perl/

Modified: trunk/libfile-sharedir-par-perl/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-sharedir-par-perl/inc/Module/Install.pm?rev=31428&op=diff
==============================================================================
--- trunk/libfile-sharedir-par-perl/inc/Module/Install.pm (original)
+++ trunk/libfile-sharedir-par-perl/inc/Module/Install.pm Wed Mar  4 23:09:27 2009
@@ -30,7 +30,7 @@
 	# This is not enforced yet, but will be some time in the next few
 	# releases once we can make sure it won't clash with custom
 	# Module::Install extensions.
-	$VERSION = '0.77';
+	$VERSION = '0.79';
 
 	*inc::Module::Install::VERSION = *VERSION;
 	@inc::Module::Install::ISA     = __PACKAGE__;
@@ -250,7 +250,7 @@
 sub load_extensions {
 	my ($self, $path, $top) = @_;
 
-	unless ( grep { lc $_ eq lc $self->{prefix} } @INC ) {
+	unless ( grep { !ref $_ and lc $_ eq lc $self->{prefix} } @INC ) {
 		unshift @INC, $self->{prefix};
 	}
 
@@ -366,4 +366,4 @@
 
 1;
 
-# Copyright 2008 Adam Kennedy.
+# Copyright 2008 - 2009 Adam Kennedy.

Modified: trunk/libfile-sharedir-par-perl/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-sharedir-par-perl/inc/Module/Install/Base.pm?rev=31428&op=diff
==============================================================================
--- trunk/libfile-sharedir-par-perl/inc/Module/Install/Base.pm (original)
+++ trunk/libfile-sharedir-par-perl/inc/Module/Install/Base.pm Wed Mar  4 23:09:27 2009
@@ -1,7 +1,7 @@
 #line 1
 package Module::Install::Base;
 
-$VERSION = '0.77';
+$VERSION = '0.79';
 
 # Suspend handler for "redefined" warnings
 BEGIN {

Modified: trunk/libfile-sharedir-par-perl/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-sharedir-par-perl/inc/Module/Install/Can.pm?rev=31428&op=diff
==============================================================================
--- trunk/libfile-sharedir-par-perl/inc/Module/Install/Can.pm (original)
+++ trunk/libfile-sharedir-par-perl/inc/Module/Install/Can.pm Wed Mar  4 23:09:27 2009
@@ -11,7 +11,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.77';
+	$VERSION = '0.79';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: trunk/libfile-sharedir-par-perl/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-sharedir-par-perl/inc/Module/Install/Fetch.pm?rev=31428&op=diff
==============================================================================
--- trunk/libfile-sharedir-par-perl/inc/Module/Install/Fetch.pm (original)
+++ trunk/libfile-sharedir-par-perl/inc/Module/Install/Fetch.pm Wed Mar  4 23:09:27 2009
@@ -6,20 +6,20 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.77';
+	$VERSION = '0.79';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
 
 sub get_file {
     my ($self, %args) = @_;
-    my ($scheme, $host, $path, $file) = 
+    my ($scheme, $host, $path, $file) =
         $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
 
     if ( $scheme eq 'http' and ! eval { require LWP::Simple; 1 } ) {
         $args{url} = $args{ftp_url}
             or (warn("LWP support unavailable!\n"), return);
-        ($scheme, $host, $path, $file) = 
+        ($scheme, $host, $path, $file) =
             $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
     }
 

Modified: trunk/libfile-sharedir-par-perl/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-sharedir-par-perl/inc/Module/Install/Makefile.pm?rev=31428&op=diff
==============================================================================
--- trunk/libfile-sharedir-par-perl/inc/Module/Install/Makefile.pm (original)
+++ trunk/libfile-sharedir-par-perl/inc/Module/Install/Makefile.pm Wed Mar  4 23:09:27 2009
@@ -7,7 +7,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.77';
+	$VERSION = '0.79';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
@@ -64,7 +64,7 @@
 	my $self  = shift;
 	my $clean = $self->makemaker_args->{clean} ||= {};
 	  %$clean = (
-		%$clean, 
+		%$clean,
 		FILES => join ' ', grep { length $_ } ($clean->{FILES} || (), @_),
 	);
 }
@@ -73,7 +73,7 @@
 	my $self      = shift;
 	my $realclean = $self->makemaker_args->{realclean} ||= {};
 	  %$realclean = (
-		%$realclean, 
+		%$realclean,
 		FILES => join ' ', grep { length $_ } ($realclean->{FILES} || (), @_),
 	);
 }
@@ -124,7 +124,7 @@
 
 	$self->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
 
-	# Generate the 
+	# Generate the
 	my $args = $self->makemaker_args;
 	$args->{DISTNAME} = $self->name;
 	$args->{NAME}     = $self->module_name || $self->name;
@@ -196,7 +196,7 @@
 	my $top_class     = ref($self->_top) || '';
 	my $top_version   = $self->_top->VERSION || '';
 
-	my $preamble = $self->preamble 
+	my $preamble = $self->preamble
 		? "# Preamble by $top_class $top_version\n"
 			. $self->preamble
 		: '';

Modified: trunk/libfile-sharedir-par-perl/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-sharedir-par-perl/inc/Module/Install/Metadata.pm?rev=31428&op=diff
==============================================================================
--- trunk/libfile-sharedir-par-perl/inc/Module/Install/Metadata.pm (original)
+++ trunk/libfile-sharedir-par-perl/inc/Module/Install/Metadata.pm Wed Mar  4 23:09:27 2009
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.77';
+	$VERSION = '0.79';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
@@ -176,18 +176,15 @@
 		"Did not provide a value to perl_version()"
 	);
 
-	# Convert triple-part versions (eg, 5.6.1 or 5.8.9) to
-	# numbers (eg, 5.006001 or 5.008009).
-
-	$version =~ s/^(\d+)\.(\d+)\.(\d+)$/sprintf("%d.%03d%03d",$1,$2,$3)/e;
-
-	$version =~ s/_.+$//;
-	$version = $version + 0; # Numify
+	# Normalize the version
+	$version = $self->_perl_version($version);
+
+	# We don't support the reall old versions
 	unless ( $version >= 5.005 ) {
 		die "Module::Install only supports 5.005 or newer (use ExtUtils::MakeMaker)\n";
 	}
+
 	$self->{values}{perl_version} = $version;
-	return 1;
 }
 
 sub license {
@@ -451,9 +448,6 @@
 		while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
 			$pattern =~ s{\s+}{\\s+}g;
 			if ( $license_text =~ /\b$pattern\b/i ) {
-				if ( $osi and $license_text =~ /All rights reserved/i ) {
-					print "WARNING: 'All rights reserved' in copyright may invalidate Open Source license.\n";
-				}
 				$self->license($license);
 				return 1;
 			}
@@ -482,19 +476,70 @@
 	return 1;
 }
 
-sub install_script {
-	my $self = shift;
-	my $args = $self->makemaker_args;
-	my $exe  = $args->{EXE_FILES} ||= [];
-        foreach ( @_ ) {
-		if ( -f $_ ) {
-			push @$exe, $_;
-		} elsif ( -d 'script' and -f "script/$_" ) {
-			push @$exe, "script/$_";
-		} else {
-			die("Cannot find script '$_'");
-		}
-	}
+# Convert triple-part versions (eg, 5.6.1 or 5.8.9) to
+# numbers (eg, 5.006001 or 5.008009).
+# Also, convert double-part versions (eg, 5.8)
+sub _perl_version {
+	my $v = $_[-1];
+	$v =~ s/^([1-9])\.([1-9]\d?\d?)$/sprintf("%d.%03d",$1,$2)/e;	
+	$v =~ s/^([1-9])\.([1-9]\d?\d?)\.(0|[1-9]\d?\d?)$/sprintf("%d.%03d%03d",$1,$2,$3 || 0)/e;
+	$v =~ s/(\.\d\d\d)000$/$1/;
+	$v =~ s/_.+$//;
+	if ( ref($v) ) {
+		$v = $v + 0; # Numify
+	}
+	return $v;
+}
+
+
+
+
+
+######################################################################
+# MYMETA.yml Support
+
+sub WriteMyMeta {
+	$_[0]->write_mymeta;
+}
+
+sub write_mymeta {
+	my $self = shift;
+	
+	# If there's no existing META.yml there is nothing we can do
+	return unless -f 'META.yml';
+
+	# Merge the perl version into the dependencies
+	my $val  = $self->Meta->{values};
+	my $perl = delete $val->{perl_version};
+	if ( $perl ) {
+		$val->{requires} ||= [];
+		my $requires = $val->{requires};
+
+		# Canonize to three-dot version after Perl 5.6
+		if ( $perl >= 5.006 ) {
+			$perl =~ s{^(\d+)\.(\d\d\d)(\d*)}{join('.', $1, int($2||0), int($3||0))}e
+		}
+		unshift @$requires, [ perl => $perl ];
+	}
+
+	# Load the advisory META.yml file
+	require YAML::Tiny;
+	my @yaml = YAML::Tiny::LoadFile('META.yml');
+	my $meta = $yaml[0];
+
+	# Overwrite the non-configure dependency hashs
+	delete $meta->{requires};
+	delete $meta->{build_requires};
+	delete $meta->{recommends};
+	if ( exists $val->{requires} ) {
+		$meta->{requires} = { map { @$_ } @{ $val->{requires} } };
+	}
+	if ( exists $val->{build_requires} ) {
+		$meta->{build_requires} = { map { @$_ } @{ $val->{build_requires} } };
+	}
+
+	# Save as the MYMETA.yml file
+	YAML::Tiny::DumpFile('MYMETA.yml', $meta);
 }
 
 1;

Modified: trunk/libfile-sharedir-par-perl/inc/Module/Install/Share.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-sharedir-par-perl/inc/Module/Install/Share.pm?rev=31428&op=diff
==============================================================================
--- trunk/libfile-sharedir-par-perl/inc/Module/Install/Share.pm (original)
+++ trunk/libfile-sharedir-par-perl/inc/Module/Install/Share.pm Wed Mar  4 23:09:27 2009
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.77';
+	$VERSION = '0.79';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: trunk/libfile-sharedir-par-perl/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-sharedir-par-perl/inc/Module/Install/Win32.pm?rev=31428&op=diff
==============================================================================
--- trunk/libfile-sharedir-par-perl/inc/Module/Install/Win32.pm (original)
+++ trunk/libfile-sharedir-par-perl/inc/Module/Install/Win32.pm Wed Mar  4 23:09:27 2009
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.77';
+	$VERSION = '0.79';
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }

Modified: trunk/libfile-sharedir-par-perl/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-sharedir-par-perl/inc/Module/Install/WriteAll.pm?rev=31428&op=diff
==============================================================================
--- trunk/libfile-sharedir-par-perl/inc/Module/Install/WriteAll.pm (original)
+++ trunk/libfile-sharedir-par-perl/inc/Module/Install/WriteAll.pm Wed Mar  4 23:09:27 2009
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.77';
+	$VERSION = '0.79';
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }

Modified: trunk/libfile-sharedir-par-perl/lib/File/ShareDir/PAR.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-sharedir-par-perl/lib/File/ShareDir/PAR.pm?rev=31428&op=diff
==============================================================================
--- trunk/libfile-sharedir-par-perl/lib/File/ShareDir/PAR.pm (original)
+++ trunk/libfile-sharedir-par-perl/lib/File/ShareDir/PAR.pm Wed Mar  4 23:09:27 2009
@@ -80,7 +80,7 @@
 
 use vars qw{$VERSION @EXPORT_OK %EXPORT_TAGS %CLEANUP_DIRS};
 BEGIN {
-  $VERSION     = '0.03';
+  $VERSION     = '0.04';
   @EXPORT_OK   = qw{dist_dir dist_file module_dir module_file class_file};
   %EXPORT_TAGS = (
     ALL => [ @EXPORT_OK ],
@@ -101,28 +101,32 @@
 
 # This isn't nice: Breaking PAR encapsulation.
 # finds the specified file in the loaded .par's
-# and returns the zip member and zip handle on
-# success
+# and returns the zip member, zip file, and zip handle
+# on success
 {
   my $ver          = $Config::Config{version};
   my $arch         = $Config::Config{archname};
   sub _par_find_zip_member {
-    my $file         = shift;
+    my $files = shift;
+    $files = [$files] if not ref $files;
 
     require PAR;
 
-    $file =~ s/\/+$//;
-
-    my @files = map {s/\\/\//g; $_} (
-      $file, "lib/$file", "arch/$file",
-      "$arch/$file", "$ver/$file", "$ver/$arch/$file"
-    );
-    @files = map {($_, "$_/")} @files;
-    #use Data::Dumper; warn Dumper \@files;
-    foreach my $zip (@PAR::LibCache) {
-    my @m = $zip->memberNames();
-        my $member = PAR::_first_member($zip, @files) or next;
-        return($member, $zip);
+    s/\/+$// for @$files;
+
+    my @files =
+      map {s{\\}{/}g; $_}
+      map {
+        my $file = $_;
+        ( $file, "lib/$file", "arch/$file", "$arch/$file", "$ver/$file", "$ver/$arch/$file" )
+      }
+      @$files;
+
+    my $files_regexp = '^(?:' . join(')|(?:', map {quotemeta($_)} @files) . ')/?';
+    foreach my $zipkey (keys %PAR::LibCache) {
+      my $zip = $PAR::LibCache{$zipkey};
+      my $member = PAR::_first_member_matching($zip, $files_regexp) or next;
+      return($member, $zipkey, $zip);
     }
 
     return;
@@ -135,26 +139,29 @@
   return 1;
 }
 
-{
-  my %extracted_already;
-  sub _search_and_unpar {
-    my $zippath = shift;
-    my ($member, $zip) = _par_find_zip_member($zippath);
-    if ($member) {
-      if (exists $extracted_already{$zip}) {
-        my $inc = $extracted_already{$zip};
+sub _search_and_unpar {
+  my $zippaths = shift;
+  $zippaths = [$zippaths] if not ref $zippaths;
+
+  my ($member, $zipkey, $zip) = _par_find_zip_member($zippaths);
+  if ($member) {
+    if (exists $PAR::ArchivesExtracted{$zip->fileName()} or $PAR::ArchivesExtracted{$zipkey}) {
+      my $inc = $PAR::ArchivesExtracted{$zip->fileName()};
+      return $inc;
+    }
+    else {
+      # watch out: breaking PAR encapsulation
+      my $inc_existed = -d "$PAR::SetupTemp::PARTemp/inc" ? 1 : 0;
+      my $inc = PAR::_extract_inc($zip, 'force');
+      $PAR::ArchivesExtracted{$zip->fileName()} = $inc;
+      if (defined $inc and not $inc_existed) {
+        $CLEANUP_DIRS{$inc} = 1;
         return $inc;
       }
-      else {
-        # watch out: breaking PAR encapsulation
-        my $inc = PAR::_extract_inc($zip, 'force');
-        $CLEANUP_DIRS{$inc} = 1;
-        $extracted_already{$zip} = $inc;
-        return $inc;
-      }
+      return();
     }
-    return();
-  }
+  }
+  return();
 }
 
 
@@ -163,15 +170,23 @@
 
 sub dist_dir {
   my @args = @_;
-  my $dist = File::ShareDir::_DIST(shift);
-
-  # Create the subpath
-  my $zippath = join (
-    '/',
-    'auto', split( /-/, $dist )
-  );
-
-  _search_and_unpar($zippath) if _par_in_use();
+  if (_par_in_use()) {
+    my $dist = File::ShareDir::_DIST(shift);
+
+    # Create the subpath
+    my $zip_paths = [
+      join (
+        '/',
+        'auto', split( /-/, $dist )
+      ),
+      join (
+        '/',
+        'auto', 'share', 'dist', split( /-/, $dist )
+      )
+    ];
+
+    _search_and_unpar($zip_paths);
+  }
 
   # hide from croak  
   @_ = @args;
@@ -282,7 +297,7 @@
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright (c) 2008 Steffen Mueller
+Copyright (c) 2008-2009 Steffen Mueller
 This program is free software; you can redistribute
 it and/or modify it under the same terms as Perl itself.
 

Modified: trunk/libfile-sharedir-par-perl/t/03_with_par.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-sharedir-par-perl/t/03_with_par.t?rev=31428&op=diff
==============================================================================
--- trunk/libfile-sharedir-par-perl/t/03_with_par.t (original)
+++ trunk/libfile-sharedir-par-perl/t/03_with_par.t Wed Mar  4 23:09:27 2009
@@ -9,7 +9,7 @@
   my $got_par = eval { require PAR; };
   if ($got_par) {
     my $v = PAR->VERSION;
-    if ($v >= 0.983) {
+    if (eval "$v+0" >= 0.983) {
       Test::More->import(tests => 30);
     }
     else {




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