summaryrefslogtreecommitdiff
path: root/configpm
diff options
context:
space:
mode:
authorJim Cromie <jcromie@cpan.org>2004-08-02 03:15:23 -0600
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-08-03 09:39:35 +0000
commit307dc11379fefa6850036a968c505ca34e0fccb8 (patch)
treefde9dcfb56d1d8c8a311d45304ee69413e26bfa1 /configpm
parent59c9df153f318eb57e9c2dabb5d780ea5b7073fa (diff)
downloadperl-307dc11379fefa6850036a968c505ca34e0fccb8.tar.gz
additional -V:foo tests
Message-ID: <410E5A8B.9030307@divsol.com> p4raw-id: //depot/perl@23185
Diffstat (limited to 'configpm')
-rwxr-xr-xconfigpm8
1 files changed, 6 insertions, 2 deletions
diff --git a/configpm b/configpm
index e5f2c08849..edd0844265 100755
--- a/configpm
+++ b/configpm
@@ -368,11 +368,15 @@ sub config_re {
}
sub config_vars {
+ # implements -V:cfgvar option (see perlrun -V:)
foreach (@_) {
+ # find optional leading, trailing colons; and query-spec
my ($notag,$qry,$lncont) = m/^(:)?(.*?)(:)?$/; # flags fore and aft,
- my $prfx = $notag ? '': "$qry="; # prefix for print
- my $lnend = $lncont ? ' ' : ";\n"; # ending for print
+ # map colon-flags to print decorations
+ my $prfx = $notag ? '': "$qry="; # tag-prefix for print
+ my $lnend = $lncont ? ' ' : ";\n"; # line ending for print
+ # all config-vars are by definition \w only, any \W means regex
if ($qry =~ /\W/) {
my @matches = config_re($qry);
print map "$_$lnend", @matches ? @matches : "$qry: not found" if !$notag;