my %forced;
-sub _unquote {
+my $unquote = sub {
my $s = shift;
$s =~ s/^["']*//;
$s =~ s/["']*$//;
return $s;
-}
+};
my $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;