X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FCPANPLUS%2FDist%2FGentoo.pm;h=b3032fd51a374705885854f8366eb9f1f14bed9c;hb=2a0cfb8393cbfdcbf07bc72b046e1046da752c5b;hp=177c70f91df1e6db4d1c5b94442fa504d3d2b9be;hpb=4c42ce6b627580e8aff003ac0870c5bf5cc4270d;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git diff --git a/lib/CPANPLUS/Dist/Gentoo.pm b/lib/CPANPLUS/Dist/Gentoo.pm index 177c70f..b3032fd 100644 --- a/lib/CPANPLUS/Dist/Gentoo.pm +++ b/lib/CPANPLUS/Dist/Gentoo.pm @@ -64,12 +64,12 @@ my $main_portdir; my %forced; -sub _unquote { +my $unquote = sub { my $s = shift; $s =~ s/^["']*//; $s =~ s/["']*$//; return $s; -} +}; my $format_available; @@ -90,16 +90,16 @@ sub format_available { buffer => \$buffers; if ($success) { if ($buffers =~ /^PORTDIR_OVERLAY=(.*)$/m) { - $overlays = [ map abs_path($_), split ' ', _unquote($1) ]; + $overlays = [ map abs_path($_), split ' ', $unquote->($1) ]; } if ($buffers =~ /^ACCEPT_KEYWORDS=(.*)$/m) { - $default_keywords = [ split ' ', _unquote($1) ]; + $default_keywords = [ split ' ', $unquote->($1) ]; } if ($buffers =~ /^DISTDIR=(.*)$/m) { - $default_distdir = abs_path(_unquote($1)); + $default_distdir = abs_path($unquote->($1)); } if ($buffers =~ /^PORTDIR=(.*)$/m) { - $main_portdir = abs_path(_unquote($1)); + $main_portdir = abs_path($unquote->($1)); } } else { error $errmsg;