X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FCPANPLUS%2FDist%2FGentoo.pm;h=177c70f91df1e6db4d1c5b94442fa504d3d2b9be;hb=4c42ce6b627580e8aff003ac0870c5bf5cc4270d;hp=c2380648fb8a0ae5994e1c944698958a4b44c6f4;hpb=0ffdc6d6358811884761fcae760fe1d84012dca6;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git diff --git a/lib/CPANPLUS/Dist/Gentoo.pm b/lib/CPANPLUS/Dist/Gentoo.pm index c238064..177c70f 100644 --- a/lib/CPANPLUS/Dist/Gentoo.pm +++ b/lib/CPANPLUS/Dist/Gentoo.pm @@ -22,11 +22,11 @@ CPANPLUS::Dist::Gentoo - CPANPLUS backend generating Gentoo ebuilds. =head1 VERSION -Version 0.05 +Version 0.07 =cut -our $VERSION = '0.05'; +our $VERSION = '0.07'; =head1 SYNOPSIS @@ -84,22 +84,22 @@ sub format_available { } if (IPC::Cmd->can_capture_buffer) { - my ($success, $errmsg, $output) = run command => [ qw/emerge --info/ ], - verbose => 0; + my $buffers; + my ($success, $errmsg) = run command => [ qw/emerge --info/ ], + verbose => 0, + buffer => \$buffers; if ($success) { - for (@{$output || []}) { - if (/^PORTDIR_OVERLAY=(.*)$/m) { - $overlays = [ map abs_path($_), split ' ', _unquote($1) ]; - } - if (/^ACCEPT_KEYWORDS=(.*)$/m) { - $default_keywords = [ split ' ', _unquote($1) ]; - } - if (/^DISTDIR=(.*)$/m) { - $default_distdir = abs_path(_unquote($1)); - } - if (/^PORTDIR=(.*)$/m) { - $main_portdir = abs_path(_unquote($1)); - } + if ($buffers =~ /^PORTDIR_OVERLAY=(.*)$/m) { + $overlays = [ map abs_path($_), split ' ', _unquote($1) ]; + } + if ($buffers =~ /^ACCEPT_KEYWORDS=(.*)$/m) { + $default_keywords = [ split ' ', _unquote($1) ]; + } + if ($buffers =~ /^DISTDIR=(.*)$/m) { + $default_distdir = abs_path(_unquote($1)); + } + if ($buffers =~ /^PORTDIR=(.*)$/m) { + $main_portdir = abs_path(_unquote($1)); } } else { error $errmsg; @@ -441,7 +441,7 @@ sub _run { unless ($success) { error "$errmsg -- aborting"; - if (not $verbose and defined $output and $self->status->verbose) { + if (not $verbose and defined $output and $stat->verbose) { my $msg = join '', @$output; 1 while chomp $msg; error $msg;