diff options
author | Jim Cromie <jcromie@cpan.org> | 2004-05-10 18:15:46 -0600 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-05-11 16:35:49 +0000 |
commit | 4a305f6a9139c383ac61b8e258cf614236af6a28 (patch) | |
tree | 51c85c7ce3d6934b5b9c1531e808747ce916e93f /pod/perlrun.pod | |
parent | 2dac93e463589fb2cea1827e5c5565faf3fdf9af (diff) | |
download | perl-4a305f6a9139c383ac61b8e258cf614236af6a28.tar.gz |
various -V: searches [PATCH]
Message-ID: <40A06F92.1070607@divsol.com>
p4raw-id: //depot/perl@22810
Diffstat (limited to 'pod/perlrun.pod')
-rw-r--r-- | pod/perlrun.pod | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/pod/perlrun.pod b/pod/perlrun.pod index a6b90daa13..b386498c2c 100644 --- a/pod/perlrun.pod +++ b/pod/perlrun.pod @@ -829,13 +829,41 @@ values of @INC. =item B<-V:>I<name> -Prints to STDOUT the value of the named configuration variable. +Prints to STDOUT the value of the named configuration variable(s), +with multiples when your query looks like a regex. For example, - $ perl -V:man.dir - -will provide strong clues about what your MANPATH variable should -be set to in order to access the Perl documentation. + $ perl -V:lib. + libs='-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc'; + libc='/lib/libc-2.2.4.so'; + $ perl -V:lib.* + libpth='/usr/local/lib /lib /usr/lib'; + libs='-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc'; + lib_ext='.a'; + libc='/lib/libc-2.2.4.so'; + libperl='libperl.a'; + .... + +Additionally, extra colons can be used to control formatting. A +trailing colon suppresses the linefeed and terminator ';', allowing +you to embed queries into shell commands. (mnemonic: PATH separator +':'.) + + $ echo "compression-vars: " `perl -V:z.*: ` " are here !" + compression-vars: zcat='' zip='zip' are here ! + +A leading colon removes the 'name=' part of the response, this allows +you to map to the name you need. + + $ echo "goodvfork="`./perl -Ilib -V::usevfork` + goodvfork=false; + +Leading and trailing colons can be used together if you need +positional parameter values without the names. Note that in the case +below, the PERL_API params are returned in alphabetical order. + + $ echo building_on `perl -V::osname: -V::PERL_API_.*:` now + building_on 'linux' '5' '1' '9' now =item B<-w> |