Bump version and update Changes
[zeal.git] / lib / Zeal / Feed.pm
index df306530ab818cbf68183738b84bf8396438f928..6c1ebc2416b08defc71d2eb1f9ba559d6d1996d8 100644 (file)
@@ -5,7 +5,7 @@ use strict;
 use warnings;
 use re '/s';
 
-our $VERSION = '0.000_002';
+our $VERSION = '0.001001';
 
 use parent qw/Class::Accessor::Fast/;
 __PACKAGE__->mk_ro_accessors(qw/version/);
@@ -58,19 +58,24 @@ sub url {
 
 sub _unpack_tar_to_dir {
        my ($file, $dir) = @_;
+       $file = rel2abs $file;
+       my $oldwd = getcwd;
+       chdir $dir;
        my $tar = which 'tar' or which 'gtar';
+
+       # uncoverable branch true
+       # uncoverable condition false
+       local $ENV{ZEAL_USE_INTERNAL_TAR} = 1 if $file =~ /gz$|bz2$/ && $^O eq 'solaris';
+
        if ($tar && !$ENV{ZEAL_USE_INTERNAL_TAR}) {
                my $arg = '-xf';
                $arg = '-xzf' if $file =~ /[.]t?gz$/;
                $arg = '-xjf' if $file =~ /[.]bz2$/;
-               system $tar, -C => $dir, $arg => $file
+               system $tar, $arg => $file
        } else {
-               $file = rel2abs $file;
-               my $oldwd = getcwd;
-               chdir $dir;
                Archive::Tar->extract_archive($file);
-               chdir $oldwd;
        }
+       chdir $oldwd;
 }
 
 sub download {
@@ -168,7 +173,7 @@ Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright (C) 2014 by Marius Gavrilescu
+Copyright (C) 2014-2015 by Marius Gavrilescu
 
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself, either Perl version 5.20.1 or,
This page took 0.009871 seconds and 4 git commands to generate.