From: Vincent Pit Date: Sat, 15 Aug 2009 08:54:51 +0000 (+0200) Subject: Make _unquote() into a private sub X-Git-Tag: v0.08~19 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git;a=commitdiff_plain;h=2a0cfb8393cbfdcbf07bc72b046e1046da752c5b Make _unquote() into a private sub --- 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;