X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FCPANPLUS%2FDist%2FGentoo.pm;h=177c70f91df1e6db4d1c5b94442fa504d3d2b9be;hb=bad6ecaf3e526f13b487fac29c30c048d1252b42;hp=e6dcb369b57ef8e64914f06b0491a45ca553548c;hpb=ae79a81243e280b798ce0c7c6a482d5f4ad78df0;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git diff --git a/lib/CPANPLUS/Dist/Gentoo.pm b/lib/CPANPLUS/Dist/Gentoo.pm index e6dcb36..177c70f 100644 --- a/lib/CPANPLUS/Dist/Gentoo.pm +++ b/lib/CPANPLUS/Dist/Gentoo.pm @@ -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;