Skip to content

Commit

Permalink
Workaround for Archive::Tar::Constant::FILE bareword error
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Dec 5, 2016
1 parent 25ad0f7 commit f6de6a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Build/Archrepo.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ if (!defined &Archive::Tar::iter) {
*Archive::Tar::iter = sub {
my ($class, $filename) = @_;
die("Archive::Tar is not available\n") unless defined &Archive::Tar::new;
Archive::Tar->new();
my $handle = $class->_get_handle($filename, 1, 'rb') or return undef;
my @data;
return sub {
Expand Down Expand Up @@ -80,7 +81,7 @@ sub parse {
my $lastfn = '';
my $d;
while ($e = $repodb->()) {
next unless $e->type() == Archive::Tar::Constant::FILE;
next unless $e->type() == Archive::Tar::Constant::FILE();
my $fn = $e->name();
next unless $fn =~ s/\/(?:depends|desc|files)$//s;
if ($lastfn ne $fn) {
Expand Down

0 comments on commit f6de6a5

Please sign in to comment.