home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / Share / Editores / Perl5 / perl / lib / Config.pm < prev    next >
Encoding:
Perl POD Document  |  1997-08-10  |  15.6 KB  |  723 lines

  1. package Config;
  2. use Exporter ();
  3. @ISA = (Exporter);
  4. @EXPORT = qw(%Config);
  5. @EXPORT_OK = qw(myconfig config_sh config_vars);
  6.  
  7. $] == 5.00402
  8.   or die "Perl lib version (5.00402) doesn't match executable version ($])";
  9.  
  10. # This file was created by configpm when Perl was built. Any changes
  11. # made to this file will be lost the next time perl is built.
  12.  
  13. ##
  14. ### This file was hand coded and a lot of information is invalid
  15. ##
  16. ### Configured by: gsar@pujyam
  17. ### Target system: WIN32 
  18. ##
  19. #
  20.  
  21. my $config_sh = <<'!END!';
  22. archlibexp='c:\perl\lib'
  23. archname='MSWin32'
  24. cc='bcc32'
  25. ccflags='-D_RTLDLL -DWIN32'
  26. cppflags='-DWIN32'
  27. dlsrc='dl_win32.xs'
  28. dynamic_ext='Fcntl IO Opcode SDBM_File Socket'
  29. extensions='Fcntl IO Opcode SDBM_File Socket'
  30. installarchlib='c:\perl\lib'
  31. installprivlib='c:\perl\lib'
  32. libpth='D:\bc5\lib'
  33. libs='import32.lib cw32mti.lib odbc32.lib odbccp32.lib'
  34. osname='MSWin32'
  35. osvers='4.0'
  36. prefix='c:'
  37. privlibexp='c:\perl\lib'
  38. sharpbang='#!'
  39. shsharp='true'
  40. sig_name='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM USR1 USR2 CHLD PWR WINCH URG IO STOP TSTP CONT TTIN TTOU VTALRM PROF XCPU XFSZ WAITING LWP FREEZE THAW RTMIN NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 RTMAX IOT CLD POLL'
  41. so='dll'
  42. startsh='#!/bin/sh'
  43. static_ext=' '
  44. sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 6 18 22'
  45. Author=''
  46. CONFIG='true'
  47. Date='$Date'
  48. Header=''
  49. Id='$Id'
  50. Locker=''
  51. Log='$Log'
  52. Mcc='Mcc'
  53. PATCHLEVEL='4'
  54. POSIX_cflags='ccflags="$ccflags -DSTRUCT_TM_HASZONE"'
  55. RCSfile='$RCSfile'
  56. Revision='$Revision'
  57. SUBVERSION='02'
  58. Source=''
  59. State=''
  60. afs='false'
  61. alignbytes='8'
  62. aphostname=''
  63. ar='tlib /P128'
  64. archlib='c:\perl\lib'
  65. archobjs=''
  66. awk='awk'
  67. baserev='5.0'
  68. bash=''
  69. bin='c:\perl\bin'
  70. binexp='c:\perl\bin'
  71. bison=''
  72. byacc='byacc'
  73. byteorder='1234'
  74. c=''
  75. castflags='0'
  76. cat='type'
  77. cccdlflags=''
  78. ccdlflags=' '
  79. cf_by='gsar'
  80. cf_email='gsar@pujyam'
  81. cf_time='Thu Apr 11 06:20:49 PDT 1996'
  82. chgrp=''
  83. chmod=''
  84. chown=''
  85. clocktype='clock_t'
  86. comm=''
  87. compress=''
  88. contains='grep'
  89. cp='copy'
  90. cpio=''
  91. cpp='cpp32'
  92. cpp_stuff='42'
  93. cpplast=''
  94. cppminus=''
  95. cpprun=''
  96. cppstdin=''
  97. cryptlib=''
  98. csh='undef'
  99. d_Gconvert='gcvt((x),(n),(b))'
  100. d_access='define'
  101. d_alarm='undef'
  102. d_archlib='define'
  103. d_attribut='undef'
  104. d_bcmp='undef'
  105. d_bcopy='undef'
  106. d_bincompat3='undef'
  107. d_bsd='define'
  108. d_bsdgetpgrp='undef'
  109. d_bsdpgrp='undef'
  110. d_bsdsetpgrp='undef'
  111. d_bzero='undef'
  112. d_casti32='define'
  113. d_castneg='define'
  114. d_charvspr='undef'
  115. d_chown='undef'
  116. d_chroot='undef'
  117. d_chsize='define'
  118. d_closedir='define'
  119. d_const='define'
  120. d_crypt='undef'
  121. d_csh='undef'
  122. d_cuserid='undef'
  123. d_dbl_dig='define'
  124. d_difftime='define'
  125. d_dirnamlen='define'
  126. d_dlerror='define'
  127. d_dlopen='define'
  128. d_dlsymun='undef'
  129. d_dosuid='undef'
  130. d_dup2='define'
  131. d_eofnblk='define'
  132. d_eunice='undef'
  133. d_fchmod='undef'
  134. d_fchown='undef'
  135. d_fcntl='undef'
  136. d_fd_macros='define'
  137. d_fd_set='define'
  138. d_fds_bits='define'
  139. d_fgetpos='define'
  140. d_flexfnam='define'
  141. d_flock='define'
  142. d_fork='undef'
  143. d_fpathconf='undef'
  144. d_fsetpos='define'
  145. d_getgrps='undef'
  146. d_gethent='undef'
  147. d_gethname='undef'
  148. d_getlogin='undef'
  149. d_getpgid='undef'
  150. d_getpgrp2='undef'
  151. d_getpgrp='undef'
  152. d_getppid='undef'
  153. d_getprior='undef'
  154. d_gettimeod='undef'
  155. d_htonl='define'
  156. d_index='undef'
  157. d_inetaton='undef'
  158. d_isascii='define'
  159. d_killpg='undef'
  160. d_link='undef'
  161. d_locconv='define'
  162. d_lockf='undef'
  163. d_lstat='undef'
  164. d_mblen='define'
  165. d_mbstowcs='define'
  166. d_mbtowc='define'
  167. d_memcmp='define'
  168. d_memcpy='define'
  169. d_memmove='define'
  170. d_memset='define'
  171. d_mkdir='define'
  172. d_mkfifo='undef'
  173. d_mktime='define'
  174. d_msg='undef'
  175. d_msgctl='define'
  176. d_msgget='define'
  177. d_msgrcv='define'
  178. d_msgsnd='define'
  179. d_mymalloc='undef'
  180. d_nice='undef'
  181. d_oldarchlib='undef'
  182. d_oldsock='undef'
  183. d_open3='undef'
  184. d_pathconf='undef'
  185. d_pause='define'
  186. d_phostname='undef'
  187. d_pipe='define'
  188. d_poll='undef'
  189. d_portable='define'
  190. d_pwage='undef'
  191. d_pwchange='undef'
  192. d_pwclass='undef'
  193. d_pwcomment='undef'
  194. d_pwexpire='undef'
  195. d_pwquota='undef'
  196. d_readdir='define'
  197. d_readlink='undef'
  198. d_rename='define'
  199. d_rewinddir='define'
  200. d_rmdir='define'
  201. d_safebcpy='undef'
  202. d_safemcpy='undef'
  203. d_sanemcmp='define'
  204. d_seekdir='define'
  205. d_select='define'
  206. d_sem='undef'
  207. d_semctl='define'
  208. d_semget='define'
  209. d_semop='define'
  210. d_setegid='undef'
  211. d_seteuid='undef'
  212. d_setgrps='undef'
  213. d_setlinebuf='undef'
  214. d_setlocale='define'
  215. d_setpgid='undef'
  216. d_setpgrp2='undef'
  217. d_setpgrp='undef'
  218. d_setprior='undef'
  219. d_setregid='undef'
  220. d_setresgid='undef'
  221. d_setresuid='undef'
  222. d_setreuid='undef'
  223. d_setrgid='undef'
  224. d_setruid='undef'
  225. d_setsid='undef'
  226. d_sfio='undef'
  227. d_shm='undef'
  228. d_shmat='undef'
  229. d_shmatprototype='undef'
  230. d_shmctl='define'
  231. d_shmdt='define'
  232. d_shmget='define'
  233. d_shrplib='undef'
  234. d_sigaction='undef'
  235. d_sigintrp=''
  236. d_sigsetjmp='undef'
  237. d_sigvec='define'
  238. d_sigvectr='undef'
  239. d_socket='define'
  240. d_sockpair='undef'
  241. d_statblks='undef'
  242. d_stdio_cnt_lval='define'
  243. d_stdio_ptr_lval='define'
  244. d_stdiobase='define'
  245. d_stdstdio='define'
  246. d_strchr='define'
  247. d_strcoll='define'
  248. d_strctcpy='define'
  249. d_strerrm='strerror(e)'
  250. d_strerror='define'
  251. d_strtod='define'
  252. d_strtol='define'
  253. d_strtoul='define'
  254. d_strxfrm='define'
  255. d_suidsafe='undef'
  256. d_symlink='undef'
  257. d_syscall='undef'
  258. d_sysconf='undef'
  259. d_sysernlst=''
  260. d_syserrlst='define'
  261. d_system='define'
  262. d_tcgetpgrp='undef'
  263. d_tcsetpgrp='undef'
  264. d_telldir='define'
  265. d_time='define'
  266. d_times='define'
  267. d_truncate='undef'
  268. d_tzname='define'
  269. d_umask='define'
  270. d_uname='undef'
  271. d_vfork='undef'
  272. d_void_closedir='undef'
  273. d_voidsig='define'
  274. d_voidtty=''
  275. d_volatile='define'
  276. d_vprintf='define'
  277. d_wait4='undef'
  278. d_waitpid='undef'
  279. d_wcstombs='define'
  280. d_wctomb='define'
  281. d_xenix='undef'
  282. date='date'
  283. db_hashtype='int'
  284. db_prefixtype='int'
  285. defvoidused='15'
  286. direntrytype='struct direct'
  287. dlext='dll'
  288. eagain='EAGAIN'
  289. echo='echo'
  290. egrep='egrep'
  291. emacs=''
  292. eunicefix=':'
  293. exe_ext='.exe'
  294. expr='expr'
  295. find='find'
  296. firstmakefile='makefile'
  297. flex=''
  298. fpostype='fpos_t'
  299. freetype='void'
  300. full_csh=''
  301. full_sed=''
  302. gcc=''
  303. gccversion=''
  304. gidtype='gid_t'
  305. glibpth='/usr/shlib  /lib/pa1.1 /usr/lib/large /lib /usr/lib /usr/lib/386 /lib/386 /lib/large /usr/lib/small /lib/small /usr/ccs/lib /usr/ucblib /usr/shlib '
  306. grep='grep'
  307. groupcat=''
  308. groupstype='gid_t'
  309. h_fcntl='false'
  310. h_sysfile='true'
  311. hint='recommended'
  312. hostcat='ypcat hosts'
  313. huge=''
  314. i_bsdioctl=''
  315. i_db='undef'
  316. i_dbm='undef'
  317. i_dirent='define'
  318. i_dld='undef'
  319. i_dlfcn='define'
  320. i_fcntl='define'
  321. i_float='define'
  322. i_gdbm='define'
  323. i_grp='define'
  324. i_limits='define'
  325. i_locale='define'
  326. i_malloc='define'
  327. i_math='define'
  328. i_memory='undef'
  329. i_ndbm='undef'
  330. i_neterrno='undef'
  331. i_niin='undef'
  332. i_pwd='undef'
  333. i_rpcsvcdbm='define'
  334. i_sfio='undef'
  335. i_sgtty='undef'
  336. i_stdarg='define'
  337. i_stddef='define'
  338. i_stdlib='define'
  339. i_string='define'
  340. i_sysdir='undef'
  341. i_sysfile='undef'
  342. i_sysfilio='define'
  343. i_sysin='undef'
  344. i_sysioctl='undef'
  345. i_sysndir='undef'
  346. i_sysparam='undef'
  347. i_sysresrc='undef'
  348. i_sysselct='undef'
  349. i_syssockio=''
  350. i_sysstat='define'
  351. i_systime='undef'
  352. i_systimek='undef'
  353. i_systimes='undef'
  354. i_systypes='define'
  355. i_sysun='undef'
  356. i_syswait='undef'
  357. i_termio='undef'
  358. i_termios='undef'
  359. i_time='define'
  360. i_unistd='undef'
  361. i_utime='define'
  362. i_values='undef'
  363. i_varargs='undef'
  364. i_varhdr='varargs.h'
  365. i_vfork='undef'
  366. incpath='D:\bc5\include'
  367. inews=''
  368. installbin='c:\perl\bin'
  369. installman1dir='c:\perl\man\man1'
  370. installman3dir='c:\perl\man\man3'
  371. installscript='c:\perl\bin'
  372. installsitearch='c:\perl\lib\site'
  373. installsitelib='c:\perl\lib\site'
  374. intsize='4'
  375. known_extensions='DB_File Fcntl GDBM_File NDBM_File ODBM_File Opcode POSIX SDBM_File Socket'
  376. ksh=''
  377. large=''
  378. ld='tlink32'
  379. lddlflags='-Tpd'
  380. ldflags=''
  381. less='less'
  382. lib_ext='.lib'
  383. libc='cw32mti.lib'
  384. libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m c cposix posix ndir dir crypt ucb bsd BSD PW x'
  385. line='line'
  386. lint=''
  387. lkflags=''
  388. ln=''
  389. lns='copy'
  390. locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include'
  391. loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib'
  392. longsize='4'
  393. lp=''
  394. lpr=''
  395. ls='dir'
  396. lseektype='off_t'
  397. mail=''
  398. mailx=''
  399. make='dmake'
  400. mallocobj='malloc.o'
  401. mallocsrc='malloc.c'
  402. malloctype='void *'
  403. man1dir='c:\perl\man\man1'
  404. man1direxp='c:\perl\man\man1'
  405. man1ext='1'
  406. man3dir='c:\perl\man\man3'
  407. man3direxp='c:\perl\man\man3'
  408. man3ext='3'
  409. medium=''
  410. mips=''
  411. mips_type=''
  412. mkdir='mkdir'
  413. models='none'
  414. modetype='mode_t'
  415. more='more /e'
  416. mv=''
  417. myarchname='MSWin32'
  418. mydomain=''
  419. myhostname=''
  420. myuname=''
  421. n='-n'
  422. nm_opt=''
  423. nm_so_opt=''
  424. nroff=''
  425. o_nonblock='O_NONBLOCK'
  426. obj_ext='.obj'
  427. oldarchlib=''
  428. oldarchlibexp=''
  429. optimize='-O'
  430. orderlib='false'
  431. package='perl5'
  432. pager='more /e'
  433. passcat=''
  434. patchlevel='2'
  435. path_sep=';'
  436. perl='perl'
  437. perladmin=''
  438. perlpath='c:\perl\bin\perl.exe'
  439. pg=''
  440. phostname='hostname'
  441. plibpth=''
  442. pmake=''
  443. pr=''
  444. prefixexp='c:'
  445. privlib='c:\perl\lib'
  446. prototype='define'
  447. randbits='15'
  448. ranlib=''
  449. rd_nodata='-1'
  450. rm='del'
  451. rmail=''
  452. runnm='true'
  453. scriptdir='c:\perl\bin'
  454. scriptdirexp='c:\perl\bin'
  455. sed='sed'
  456. selecttype='int *'
  457. sendmail='blat'
  458. sh='cmd /x /c'
  459. shar=''
  460. shmattype='void *'
  461. shortsize='2'
  462. shrpdir='none'
  463. signal_t='void'
  464. sitearch='c:\perl\lib\site'
  465. sitearchexp='c:\perl\lib\site'
  466. sitelib='c:\perl\lib\site'
  467. sitelibexp='c:\perl\lib\site'
  468. sizetype='size_t'
  469. sleep=''
  470. smail=''
  471. small=''
  472. sockethdr=''
  473. socketlib=''
  474. sort='sort'
  475. spackage='Perl5'
  476. spitshell=''
  477. split=''
  478. ssizetype='int'
  479. startperl='#perl'
  480. stdchar='unsigned char'
  481. stdio_base='((fp)->buffer)'
  482. stdio_bufsiz='((fp)->level + (fp)->curp - (fp)->buffer)'
  483. stdio_cnt='((fp)->level)'
  484. stdio_ptr='((fp)->curp)'
  485. strings='/usr/include/string.h'
  486. submit=''
  487. sysman='/usr/man/man1'
  488. tail=''
  489. tar=''
  490. tbl=''
  491. test=''
  492. timeincl='/usr/include/sys/time.h '
  493. timetype='time_t'
  494. touch='touch'
  495. tr=''
  496. troff=''
  497. uidtype='uid_t'
  498. uname='uname'
  499. uniq='uniq'
  500. usedl='define'
  501. usemymalloc='n'
  502. usenm='false'
  503. useperlio='undef'
  504. useposix='true'
  505. usesafe='true'
  506. usevfork='false'
  507. usrinc='/usr/include'
  508. uuname=''
  509. vi=''
  510. voidflags='15'
  511. xlibpth='/usr/lib/386 /lib/386'
  512. zcat=''
  513. !END!
  514.  
  515. my $summary = <<'!END!';
  516. Summary of my $package ($baserev patchlevel $PATCHLEVEL subversion $SUBVERSION) configuration:
  517.   Platform:
  518.     osname=$osname, osvers=$osvers, archname=$archname
  519.     uname='$myuname'
  520.     hint=$hint, useposix=$useposix, d_sigaction=$d_sigaction
  521.     bincompat3=$bincompat3 useperlio=$useperlio d_sfio=$d_sfio
  522.   Compiler:
  523.     cc='$cc', optimize='$optimize', gccversion=$gccversion
  524.     cppflags='$cppflags'
  525.     ccflags ='$ccflags'
  526.     stdchar='$stdchar', d_stdstdio=$d_stdstdio, usevfork=$usevfork
  527.     voidflags=$voidflags, castflags=$castflags, d_casti32=$d_casti32, d_castneg=$d_castneg
  528.     intsize=$intsize, alignbytes=$alignbytes, usemymalloc=$usemymalloc, randbits=$randbits
  529.   Linker and Libraries:
  530.     ld='$ld', ldflags ='$ldflags'
  531.     libpth=$libpth
  532.     libs=$libs
  533.     libc=$libc, so=$so
  534.     useshrplib=$useshrplib, libperl=$libperl
  535.   Dynamic Linking:
  536.     dlsrc=$dlsrc, dlext=$dlext, d_dlsymun=$d_dlsymun, ccdlflags='$ccdlflags'
  537.     cccdlflags='$cccdlflags', lddlflags='$lddlflags'
  538.  
  539. !END!
  540. my $summary_expanded = 0;
  541.  
  542. sub myconfig {
  543.     return $summary if $summary_expanded;
  544.     $summary =~ s{\$(\w+)}
  545.              { my $c = $Config{$1}; defined($c) ? $c : 'undef' }ge;
  546.     $summary_expanded = 1;
  547.     $summary;
  548. }
  549.  
  550. sub FETCH { 
  551.     # check for cached value (which may be undef so we use exists not defined)
  552.     return $_[0]->{$_[1]} if (exists $_[0]->{$_[1]});
  553.  
  554.     # Search for it in the big string 
  555.     my($value, $start, $marker);
  556.     $marker = "$_[1]='";
  557.     # return undef unless (($value) = $config_sh =~ m/^$_[1]='(.*)'\s*$/m);
  558.     $start = index($config_sh, "\n$marker");
  559.     return undef if ( ($start == -1) &&  # in case it's first 
  560.         (substr($config_sh, 0, length($marker)) ne $marker) );
  561.     if ($start == -1) { $start = length($marker) } 
  562.         else { $start += length($marker) + 1 }
  563.     $value = substr($config_sh, $start, 
  564.         index($config_sh, qq('\n), $start) - $start);
  565.  
  566.     $value = undef if $value eq 'undef'; # So we can say "if $Config{'foo'}".
  567.     $_[0]->{$_[1]} = $value; # cache it
  568.     return $value;
  569. }
  570.  
  571. my $prevpos = 0;
  572.  
  573. sub FIRSTKEY {
  574.     $prevpos = 0;
  575.     # my($key) = $config_sh =~ m/^(.*?)=/;
  576.     substr($config_sh, 0, index($config_sh, '=') );
  577.     # $key;
  578. }
  579.  
  580. sub NEXTKEY {
  581.     my $pos = index($config_sh, qq('\n), $prevpos) + 2;
  582.     my $len = index($config_sh, "=", $pos) - $pos;
  583.     $prevpos = $pos;
  584.     $len > 0 ? substr($config_sh, $pos, $len) : undef;
  585. }
  586.  
  587. sub EXISTS { 
  588.     # exists($_[0]->{$_[1]})  or  $config_sh =~ m/^$_[1]=/m;
  589.     exists($_[0]->{$_[1]}) or
  590.     index($config_sh, "\n$_[1]='") != -1 or
  591.     substr($config_sh, 0, length($_[1])+2) eq "$_[1]='";
  592. }
  593.  
  594. sub STORE  { die "\%Config::Config is read-only\n" }
  595. sub DELETE { &STORE }
  596. sub CLEAR  { &STORE }
  597.  
  598.  
  599. sub config_sh {
  600.     $config_sh
  601. }
  602.  
  603. sub config_re {
  604.     my $re = shift;
  605.     my @matches = ($config_sh =~ /^$re=.*\n/mg);
  606.     @matches ? (print @matches) : print "$re: not found\n";
  607. }
  608.  
  609. sub config_vars {
  610.     foreach(@_){
  611.     config_re($_), next if /\W/;
  612.     my $v=(exists $Config{$_}) ? $Config{$_} : 'UNKNOWN';
  613.     $v='undef' unless defined $v;
  614.     print "$_='$v';\n";
  615.     }
  616. }
  617.  
  618. sub TIEHASH { bless {} }
  619.  
  620. tie %Config, 'Config';
  621.  
  622. 1;
  623. __END__
  624.  
  625. =head1 NAME
  626.  
  627. Config - access Perl configuration information
  628.  
  629. =head1 SYNOPSIS
  630.  
  631.     use Config;
  632.     if ($Config{'cc'} =~ /gcc/) {
  633.     print "built by gcc\n";
  634.     } 
  635.  
  636.     use Config qw(myconfig config_sh config_vars);
  637.  
  638.     print myconfig();
  639.  
  640.     print config_sh();
  641.  
  642.     config_vars(qw(osname archname));
  643.  
  644.  
  645. =head1 DESCRIPTION
  646.  
  647. The Config module contains all the information that was available to
  648. the C<Configure> program at Perl build time (over 900 values).
  649.  
  650. Shell variables from the F<config.sh> file (written by Configure) are
  651. stored in the readonly-variable C<%Config>, indexed by their names.
  652.  
  653. Values stored in config.sh as 'undef' are returned as undefined
  654. values.  The perl C<exists> function can be used to check if a
  655. named variable exists.
  656.  
  657. =over 4
  658.  
  659. =item myconfig()
  660.  
  661. Returns a textual summary of the major perl configuration values.
  662. See also C<-V> in L<perlrun/Switches>.
  663.  
  664. =item config_sh()
  665.  
  666. Returns the entire perl configuration information in the form of the
  667. original config.sh shell variable assignment script.
  668.  
  669. =item config_vars(@names)
  670.  
  671. Prints to STDOUT the values of the named configuration variable. Each is
  672. printed on a separate line in the form:
  673.  
  674.   name='value';
  675.  
  676. Names which are unknown are output as C<name='UNKNOWN';>.
  677. See also C<-V:name> in L<perlrun/Switches>.
  678.  
  679. =back
  680.  
  681. =head1 EXAMPLE
  682.  
  683. Here's a more sophisticated example of using %Config:
  684.  
  685.     use Config;
  686.     use strict;
  687.  
  688.     my %sig_num;
  689.     my @sig_name;
  690.     unless($Config{sig_name} && $Config{sig_num}) {
  691.     die "No sigs?";
  692.     } else {
  693.     my @names = split ' ', $Config{sig_name};
  694.     @sig_num{@names} = split ' ', $Config{sig_num};
  695.     foreach (@names) {
  696.         $sig_name[$sig_num{$_}] ||= $_;
  697.     }   
  698.     }
  699.  
  700.     print "signal #17 = $sig_name[17]\n";
  701.     if ($sig_num{ALRM}) { 
  702.     print "SIGALRM is $sig_num{ALRM}\n";
  703.     }   
  704.  
  705. =head1 WARNING
  706.  
  707. Because this information is not stored within the perl executable
  708. itself it is possible (but unlikely) that the information does not
  709. relate to the actual perl binary which is being used to access it.
  710.  
  711. The Config module is installed into the architecture and version
  712. specific library directory ($Config{installarchlib}) and it checks the
  713. perl version number when loaded.
  714.  
  715. =head1 NOTE
  716.  
  717. This module contains a good example of how to use tie to implement a
  718. cache and an example of how to make a tied variable readonly to those
  719. outside of it.
  720.  
  721. =cut
  722.  
  723.