summaryrefslogtreecommitdiff
path: root/configpm
diff options
context:
space:
mode:
authorWinfried Koenig <win@in.rhein-main.de>1997-01-15 14:03:27 +0200
committerChip Salzenberg <chip@atlantic.net>1997-01-17 08:39:00 +1200
commit743c51bca697772277895eb80832bcfbd65530df (patch)
tree05b1acc55cc7d8cd5d156f273c2f11ce13ac8993 /configpm
parent0078ec44bac3092122b7d1fd6fd3e9ed89d01778 (diff)
downloadperl-743c51bca697772277895eb80832bcfbd65530df.tar.gz
documentation of configpm (perl5.003_20)
p5p-msgid: <m0vkU40-0004WAC@incom.rhein-main.de>
Diffstat (limited to 'configpm')
-rwxr-xr-xconfigpm28
1 files changed, 17 insertions, 11 deletions
diff --git a/configpm b/configpm
index 1fef6fe1b2..f1601773ea 100755
--- a/configpm
+++ b/configpm
@@ -6,7 +6,7 @@ $config_pm = $ARGV[0] || 'lib/Config.pm';
# list names to put first (and hence lookup fastest)
@fast = qw(archname osname osvers prefix libs libpth
dynamic_ext static_ext extensions dlsrc so
- sig_name cc ccflags cppflags
+ sig_name sig_num cc ccflags cppflags
privlibexp archlibexp installprivlib installarchlib
sharpbang startsh shsharp
);
@@ -245,17 +245,23 @@ See also C<-V:name> in L<perlrun/Switches>.
Here's a more sophisticated example of using %Config:
use Config;
+ use strict;
+
+ my %sig_num;
+ my @sig_name;
+ unless($Config{sig_name} && $Config{sig_num}) {
+ die "No sigs?";
+ } else {
+ my @names = split ' ', $Config{sig_name};
+ @sig_num{@names} = split ' ', $Config{sig_num};
+ foreach (@names) {
+ $sig_name[$sig_num{$_}] ||= $_;
+ }
+ }
- defined $Config{sig_name} || die "No sigs?";
- foreach $name (split(' ', $Config{sig_name})) {
- $signo{$name} = $i;
- $signame[$i] = $name;
- $i++;
- }
-
- print "signal #17 = $signame[17]\n";
- if ($signo{ALRM}) {
- print "SIGALRM is $signo{ALRM}\n";
+ print "signal #17 = $sig_name[17]\n";
+ if ($sig_num{ALRM}) {
+ print "SIGALRM is $sig_num{ALRM}\n";
}
=head1 WARNING