[libarchive-tar-wrapper-perl] 01/04: Imported Upstream version 0.18
Intrigeri
intrigeri at alioth.debian.org
Thu Aug 8 10:28:48 UTC 2013
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to branch master
in repository libarchive-tar-wrapper-perl.
commit d5144633b6cc0537a7281783a72881c95505d30d
Author: intrigeri <intrigeri at boum.org>
Date: Thu Aug 8 10:16:33 2013 +0000
Imported Upstream version 0.18
---
Changes | 8 ++++++++
META.json | 3 ++-
META.yml | 3 ++-
MYMETA.json | 3 ++-
MYMETA.yml | 3 ++-
Makefile.PL | 1 +
README | 2 +-
lib/Archive/Tar/Wrapper.pm | 34 ++++++----------------------------
t/002Mult.t | 8 ++------
t/003Dirs.t | 4 ++--
10 files changed, 28 insertions(+), 41 deletions(-)
diff --git a/Changes b/Changes
index bad686c..29924d4 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,14 @@
######################################################################
Revision history for Perl extension Archive::Tar::Wrapper
+0.18 (2013/07/15)
+ (ms) Moved to tmpdir() in t/002Mult.t because some smoke testers don't
+ like writing into t/data.
+
+0.17 (2013/07/01)
+ (ms) Sanko Robinson replaced bin_find() by File::Which::which() to allow
+ for better Win32 portability.
+
0.16 (2012/03/19)
(ms) [rt.cpan.org 75770] Allow add() with directories, and now preserves
directory permissions.
diff --git a/META.json b/META.json
index fc244d9..e0c062b 100644
--- a/META.json
+++ b/META.json
@@ -34,6 +34,7 @@
"requires" : {
"Cwd" : "0",
"File::Temp" : "0",
+ "File::Which" : "0",
"IPC::Run" : "0",
"Log::Log4perl" : "0"
}
@@ -45,5 +46,5 @@
"url" : "http://github.com/mschilli/archive-tar-wrapper-perl"
}
},
- "version" : "0.16"
+ "version" : "0.18"
}
diff --git a/META.yml b/META.yml
index 28e937c..7f0df69 100644
--- a/META.yml
+++ b/META.yml
@@ -20,8 +20,9 @@ no_index:
requires:
Cwd: 0
File::Temp: 0
+ File::Which: 0
IPC::Run: 0
Log::Log4perl: 0
resources:
repository: http://github.com/mschilli/archive-tar-wrapper-perl
-version: 0.16
+version: 0.18
diff --git a/MYMETA.json b/MYMETA.json
index e7708fb..7e154e3 100644
--- a/MYMETA.json
+++ b/MYMETA.json
@@ -34,6 +34,7 @@
"requires" : {
"Cwd" : "0",
"File::Temp" : "0",
+ "File::Which" : "0",
"IPC::Run" : "0",
"Log::Log4perl" : "0"
}
@@ -45,5 +46,5 @@
"url" : "http://github.com/mschilli/archive-tar-wrapper-perl"
}
},
- "version" : "0.16"
+ "version" : "0.18"
}
diff --git a/MYMETA.yml b/MYMETA.yml
index afcfdeb..c7076d0 100644
--- a/MYMETA.yml
+++ b/MYMETA.yml
@@ -20,8 +20,9 @@ no_index:
requires:
Cwd: 0
File::Temp: 0
+ File::Which: 0
IPC::Run: 0
Log::Log4perl: 0
resources:
repository: http://github.com/mschilli/archive-tar-wrapper-perl
-version: 0.16
+version: 0.18
diff --git a/Makefile.PL b/Makefile.PL
index f4f04d4..35618ef 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -20,6 +20,7 @@ WriteMakefile(
Cwd => 0,
Log::Log4perl => 0,
IPC::Run => 0,
+ File::Which => 0,
}, # e.g., Module::Name => 1.1
$ExtUtils::MakeMaker::VERSION >= 6.50 ? (%$meta_merge) : (),
($] >= 5.005 ? ## Add these new keywords supported since 5.005
diff --git a/README b/README
index 3db06e8..f657be8 100644
--- a/README
+++ b/README
@@ -1,5 +1,5 @@
######################################################################
- Archive::Tar::Wrapper 0.16
+ Archive::Tar::Wrapper 0.18
######################################################################
NAME
diff --git a/lib/Archive/Tar/Wrapper.pm b/lib/Archive/Tar/Wrapper.pm
index 412c644..fabff4e 100644
--- a/lib/Archive/Tar/Wrapper.pm
+++ b/lib/Archive/Tar/Wrapper.pm
@@ -16,10 +16,11 @@ use File::Path;
use File::Copy;
use File::Find;
use File::Basename;
+use File::Which qw(which);
use IPC::Run qw(run);
use Cwd;
-our $VERSION = "0.16";
+our $VERSION = "0.18";
###########################################
sub new {
@@ -40,8 +41,8 @@ sub new {
bless $self, $class;
- $self->{tar} = bin_find("tar") unless defined $self->{tar};
- $self->{tar} = bin_find("gtar") unless defined $self->{tar};
+ $self->{tar} = which("tar") unless defined $self->{tar};
+ $self->{tar} = which("gtar") unless defined $self->{tar};
if( ! defined $self->{tar} ) {
LOGDIE "tar not found in PATH, please specify location";
@@ -411,29 +412,6 @@ sub DESTROY {
rmtree($self->{tmpdir}) if defined $self->{tmpdir};
}
-######################################
-sub bin_find {
-######################################
- my($exe) = @_;
-
- my @paths = split /:/, $ENV{PATH};
-
- push @paths,
- "/usr/bin",
- "/bin",
- "/usr/sbin",
- "/opt/bin",
- "/ops/csw/bin",
- ;
-
- for my $path ( @paths ) {
- my $full = File::Spec->catfile($path, $exe);
- return $full if -x $full;
- }
-
- return undef;
-}
-
###########################################
sub is_gnu {
###########################################
@@ -456,8 +434,8 @@ sub ramdisk_mount {
# mkdir -p /mnt/myramdisk
# mount -t tmpfs -o size=20m tmpfs /mnt/myramdisk
- $self->{mount} = bin_find("mount") unless $self->{mount};
- $self->{umount} = bin_find("umount") unless $self->{umount};
+ $self->{mount} = which("mount") unless $self->{mount};
+ $self->{umount} = which("umount") unless $self->{umount};
for (qw(mount umount)) {
if(!defined $self->{$_}) {
diff --git a/t/002Mult.t b/t/002Mult.t
index 80258c1..af897bd 100644
--- a/t/002Mult.t
+++ b/t/002Mult.t
@@ -7,19 +7,15 @@ use warnings;
use strict;
use Log::Log4perl qw(:easy);
use File::Path;
-use File::Temp qw(tempfile);
+use File::Temp qw(tempfile tempdir);
my $TARDIR = "data";
$TARDIR = "t/$TARDIR" unless -d $TARDIR;
-my $TMPDIR = "$TARDIR/tmp";
+my $TMPDIR = tempdir( CLEANUP => 1 );
use Test::More tests => 5;
BEGIN { use_ok('Archive::Tar::Wrapper') };
-rmdir $TMPDIR if -d $TMPDIR;
-mkdir $TMPDIR or die "Cannot mkdir $TMPDIR";
-END { rmtree $TMPDIR }
-
my $arch = Archive::Tar::Wrapper->new(tmpdir => $TMPDIR);
ok($arch->read("$TARDIR/foo.tgz"), "opening compressed tarfile");
diff --git a/t/003Dirs.t b/t/003Dirs.t
index 089e76d..7b35671 100644
--- a/t/003Dirs.t
+++ b/t/003Dirs.t
@@ -7,11 +7,11 @@ use warnings;
use strict;
use Log::Log4perl qw(:easy);
use File::Path;
-use File::Temp qw(tempfile);
+use File::Temp qw(tempfile tempdir);
my $TARDIR = "data";
$TARDIR = "t/$TARDIR" unless -d $TARDIR;
-my $TMPDIR = "$TARDIR/tmp";
+my $TMPDIR = tempdir( CLEANUP => 1 );
use Test::More tests => 4;
BEGIN { use_ok('Archive::Tar::Wrapper') };
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libarchive-tar-wrapper-perl.git
More information about the Pkg-perl-cvs-commits
mailing list