home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl501m.zip / patches / patch.1g < prev    next >
Text File  |  1995-05-31  |  66KB  |  2,450 lines

  1. # This is my patch  patch.1g for perl5.001.  See description below.
  2. #    Andy Dougherty        doughera@lafcol.lafayette.edu
  3. #
  4. # Please remove the following files before applying this patch.
  5. # (You can feed this patch to 'sh' to do so.)
  6. # These are now embedded in the appropriate .pm files.
  7. #
  8. rm -f pod/modpods/Abbrev.pod
  9. rm -f pod/modpods/AnyDBMFile.pod
  10. rm -f pod/modpods/AutoLoader.pod
  11. rm -f pod/modpods/AutoSplit.pod
  12. rm -f pod/modpods/Basename.pod
  13. rm -f pod/modpods/Benchmark.pod
  14. rm -f pod/modpods/Carp.pod
  15. rm -f pod/modpods/CheckTree.pod
  16. rm -f pod/modpods/Collate.pod
  17. rm -f pod/modpods/Config.pod
  18. rm -f pod/modpods/Cwd.pod
  19. rm -f pod/modpods/DB_File.pod
  20. rm -f pod/modpods/Dynaloader.pod
  21. rm -f pod/modpods/English.pod
  22. rm -f pod/modpods/Env.pod
  23. rm -f pod/modpods/Exporter.pod
  24. rm -f pod/modpods/Fcntl.pod
  25. rm -f pod/modpods/FileHandle.pod
  26. rm -f pod/modpods/Find.pod
  27. rm -f pod/modpods/Finddepth.pod
  28. rm -f pod/modpods/GetOptions.pod
  29. rm -f pod/modpods/Getopt.pod
  30. rm -f pod/modpods/MakeMaker.pod
  31. rm -f pod/modpods/Open2.pod
  32. rm -f pod/modpods/Open3.pod
  33. rm -f pod/modpods/POSIX.pod
  34. rm -f pod/modpods/Ping.pod
  35. rm -f pod/modpods/Socket.pod
  36. rm -f pod/modpods/integer.pod
  37. rm -f pod/modpods/less.pod
  38. rm -f pod/modpods/sigtrap.pod
  39. rm -f pod/modpods/strict.pod
  40. rm -f pod/modpods/subs.pod
  41.  
  42. # This directory should be empty now
  43. rmdir pod/modpods
  44. exit 0
  45.  
  46. This is my patch  patch.1g  for perl5.001.
  47.  
  48. This patch only includes updates to the lib/ directory and
  49. the removal of the pod/modpods.  The main things are the following:
  50.  
  51.     The modpods are now embedded in their corresponding .pm files.
  52.  
  53.     The Grand AutoLoader patch.
  54.  
  55.     Updates to lib/ExtUtils/xsubpp by Paul Marquess 
  56.     <pmarquess@bfsec.bt.co.uk>.
  57.  
  58.     Minor changes to a very few modules and pods.
  59.  
  60.  
  61. To apply, change to your perl directory, run the commands above, then
  62. apply with 
  63.     patch -p1 -N  < thispatch.
  64.  
  65. After you apply this patch, you should go on to apply patch.1h and
  66. patch.1i before reConfiguring and building.
  67.  
  68. Patch and enjoy,
  69.  
  70.     Andy Dougherty            doughera@lafcol.lafayette.edu
  71.     Dept. of Physics
  72.     Lafayette College, Easton PA
  73.  
  74. Here's the file-by-file description:
  75.  
  76. lib/AnyDBM_File.pm
  77.     Embedded pod.
  78.  
  79. lib/AutoLoader.pm
  80.     Grand AutoLoader patch.
  81.  
  82.     Embedded pod.
  83.  
  84. lib/AutoSplit.pm
  85.     Grand AutoLoader patch.
  86.  
  87.     Embedded pod.
  88.  
  89.     Skip pod sections when splitting .pm files.
  90.  
  91. lib/Benchmark.pm
  92. lib/Carp.pm
  93. lib/Cwd.pm
  94. lib/English.pm
  95.     Grand AutoLoader patch.
  96.  
  97.     Embedded pod.
  98.  
  99. lib/Exporter.pm
  100.     Grand AutoLoader patch.
  101.  
  102.     Embedded pod.
  103.  
  104.     Update comments to match behavior.
  105.  
  106. lib/ExtUtils/MakeMaker.pm
  107.     Include installation of .pod and .pm files.
  108.  
  109.     Space out documentation for better printing with pod2man.
  110.  
  111. lib/ExtUtils/xsubpp
  112.     Patches from Paul Marquess <pmarquess@bfsec.bt.co.uk>, 22 May 1995.
  113.     Now at version 1.4.
  114.  
  115. lib/File/Basename.pm
  116.     Embedded pod.
  117.  
  118. lib/File/CheckTree.pm
  119.     Embedded pod.
  120.  
  121. lib/File/Find.pm
  122.     Embedded pod.
  123.  
  124.     Included finddepth pod too.
  125.  
  126. lib/FileHandle.pm
  127.     Embedded pod.
  128.  
  129. lib/Getopt/Long.pm
  130.     Embedded pod.
  131.  
  132.     Fixed PERMUTE order bug.
  133.  
  134. lib/Getopt/Std.pm
  135.     Embedded pod.
  136.  
  137.     Caught accessing undefined element off end of @arg array.
  138.  
  139. lib/I18N/Collate.pm
  140. lib/IPC/Open2.pm
  141. lib/IPC/Open3.pm
  142. lib/Net/Ping.pm
  143.     Embedded pod.
  144.  
  145. lib/Term/Complete.pm
  146.     Embedded pod.
  147.  
  148.     Changed name from complete to Complete to match documentation and
  149.     exported name.
  150.  
  151. lib/Text/Abbrev.pm
  152.     Embedded pod.
  153.  
  154. lib/Text/Tabs.pm
  155.     Updated.
  156.  
  157. lib/integer.pm
  158. lib/less.pm
  159. lib/sigtrap.pm
  160. lib/strict.pm
  161. lib/subs.pm
  162.     Embedded pod.
  163.  
  164. Index: lib/AnyDBM_File.pm
  165. *** perl5.001f/lib/AnyDBM_File.pm    Tue Oct 18 12:34:25 1994
  166. --- perl5.001g/lib/AnyDBM_File.pm    Thu May 25 11:11:34 1995
  167. ***************
  168. *** 7,9 ****
  169. --- 7,92 ----
  170.   eval { require GDBM_File } ||
  171.   eval { require SDBM_File } ||
  172.   eval { require ODBM_File };
  173. + =head1 NAME
  174. + AnyDBM_File - provide framework for multiple DBMs
  175. + NDBM_File, ODBM_File, SDBM_File, GDBM_File - various DBM implementations
  176. + =head1 SYNOPSIS
  177. +     use AnyDBM_File;
  178. + =head1 DESCRIPTION
  179. + This module is a "pure virtual base class"--it has nothing of its own.
  180. + It's just there to inherit from one of the various DBM packages.  It
  181. + prefers ndbm for compatibility reasons with Perl 4, then Berkeley DB (See
  182. + L<DB_File>), GDBM, SDBM (which is always there--it comes with Perl), and
  183. + finally ODBM.   This way old programs that used to use NDBM via dbmopen()
  184. + can still do so, but new ones can reorder @ISA:
  185. +     @AnyDBM_File::ISA = qw(DB_File GDBM_File NDBM_File);
  186. + Note, however, that an explicit use overrides the specified order:
  187. +     use GDBM_File;
  188. +     @AnyDBM_File::ISA = qw(DB_File GDBM_File NDBM_File);
  189. + will only find GDBM_File.
  190. + Having multiple DBM implementations makes it trivial to copy database formats:
  191. +     use POSIX; use NDBM_File; use DB_File;
  192. +     tie %newhash,  DB_File, $new_filename, O_CREAT|O_RDWR;
  193. +     tie %oldhash,  NDBM_File, $old_filename, 1, 0;
  194. +     %newhash = %oldhash;
  195. + =head2 DBM Comparisons
  196. + Here's a partial table of features the different packages offer:
  197. +                          odbm    ndbm    sdbm    gdbm    bsd-db
  198. +              ----     ----    ----    ----    ------
  199. +  Linkage comes w/ perl   yes     yes     yes     yes     yes
  200. +  Src comes w/ perl       no      no      yes     no      no
  201. +  Comes w/ many unix os   yes     yes[0]  no      no      no
  202. +  Builds ok on !unix      ?       ?       yes     yes     ?
  203. +  Code Size               ?       ?       small   big     big
  204. +  Database Size           ?       ?       small   big?    ok[1]
  205. +  Speed                   ?       ?       slow    ok      fast
  206. +  FTPable                 no      no      yes     yes     yes
  207. +  Easy to build          N/A     N/A      yes     yes     ok[2]
  208. +  Size limits             1k      4k      1k[3]   none    none
  209. +  Byte-order independent  no      no      no      no      yes
  210. +  Licensing restrictions  ?       ?       no      yes     no
  211. + =over 4
  212. + =item [0] 
  213. + on mixed universe machines, may be in the bsd compat library,
  214. + which is often shunned.
  215. + =item [1] 
  216. + Can be trimmed if you compile for one access method.
  217. + =item [2] 
  218. + See L<DB_File>. 
  219. + Requires symbolic links.  
  220. + =item [3] 
  221. + By default, but can be redefined.
  222. + =back
  223. + =head1 SEE ALSO
  224. + dbm(3), ndbm(3), DB_File(3)
  225. + =cut
  226. Index: lib/AutoLoader.pm
  227. *** perl5.001f/lib/AutoLoader.pm    Fri Jan 13 16:43:36 1995
  228. --- perl5.001g/lib/AutoLoader.pm    Thu May 25 14:33:45 1995
  229. ***************
  230. *** 1,6 ****
  231. --- 1,24 ----
  232.   package AutoLoader;
  233.   use Carp;
  234.   
  235. + =head1 NAME
  236. + AutoLoader - load functions only on demand
  237. + =head1 SYNOPSIS
  238. +     package FOOBAR;
  239. +     use Exporter;
  240. +     use AutoLoader;
  241. +     @ISA = (Exporter, AutoLoader);
  242. + =head1 DESCRIPTION
  243. + This module tells its users that functions in the FOOBAR package are to be
  244. + autoloaded from F<auto/$AUTOLOAD.al>.  See L<perlsub/"Autoloading">.
  245. + =cut
  246.   AUTOLOAD {
  247.       my $name = "auto/$AUTOLOAD.al";
  248.       $name =~ s#::#/#g;
  249. ***************
  250. *** 23,28 ****
  251. --- 41,64 ----
  252.       }
  253.       }
  254.       goto &$AUTOLOAD;
  255. + }
  256. +                             
  257. + sub import
  258. + {
  259. +  my ($callclass, $callfile, $callline,$path,$callpack) = caller(0);
  260. +  ($callpack = $callclass) =~ s#::#/#;
  261. +  if (defined($path = $INC{$callpack . '.pm'}))
  262. +   {
  263. +    if ($path =~ s#^(.*)$callpack\.pm$#$1auto/$callpack/autosplit.ix# && -e $path) 
  264. +     {
  265. +      eval {require $path}; 
  266. +      carp $@ if ($@);  
  267. +     } 
  268. +    else 
  269. +     {
  270. +      croak "Have not loaded $callpack.pm";
  271. +     }
  272. +   }
  273.   }
  274.   
  275.   1;
  276. Index: lib/AutoSplit.pm
  277. *** perl5.001f/lib/AutoSplit.pm    Wed Feb  8 19:11:12 1995
  278. --- perl5.001g/lib/AutoSplit.pm    Thu May 25 14:55:47 1995
  279. ***************
  280. *** 10,15 ****
  281. --- 10,28 ----
  282.   @EXPORT = qw(&autosplit &autosplit_lib_modules);
  283.   @EXPORT_OK = qw($Verbose $Keep $Maxlen $CheckForAutoloader $CheckModTime);
  284.   
  285. + =head1 NAME
  286. + AutoSplit - split a package for autoloading
  287. + =head1 DESCRIPTION
  288. + This function will split up your program into files that the AutoLoader
  289. + module can handle.  Normally only used to build autoloading Perl library
  290. + modules, especially extensions (like POSIX).  You should look at how
  291. + they're built out for details.
  292. + =cut
  293.   # for portability warn about names longer than $maxlen
  294.   $Maxlen  = 8;    # 8 for dos, 11 (14-".al") for SYSVR3
  295.   $Verbose = 1;    # 0=none, 1=minimal, 2=list .al files
  296. ***************
  297. *** 83,89 ****
  298. --- 96,108 ----
  299.       open(IN, "<$filename") || die "AutoSplit: Can't open $filename: $!\n";
  300.       my($pm_mod_time) = (stat($filename))[9];
  301.       my($autoloader_seen) = 0;
  302. +     my($in_pod) = 0;
  303.       while (<IN>) {
  304. +     # Skip pod text.
  305. +     $in_pod = 1 if /^=/;
  306. +     $in_pod = 0 if /^=cut/;
  307. +     next if ($in_pod || /^=cut/);
  308.       # record last package name seen
  309.       $package = $1 if (m/^\s*package\s+([\w:]+)\s*;/);
  310.       ++$autoloader_seen if m/^\s*(use|require)\s+AutoLoader\b/;
  311. ***************
  312. *** 199,205 ****
  313.           next if $names{substr($subname,0,$maxflen-3)};
  314.           my($file) = "$autodir/$modpname/$_";
  315.           print "  deleting $file\n" if ($Verbose>=2);
  316. !         unlink $file or carp "Unable to delete $file: $!";
  317.       }
  318.       closedir(OUTDIR);
  319.       }
  320. --- 218,226 ----
  321.           next if $names{substr($subname,0,$maxflen-3)};
  322.           my($file) = "$autodir/$modpname/$_";
  323.           print "  deleting $file\n" if ($Verbose>=2);
  324. !         my($deleted,$thistime);  # catch all versions on VMS
  325. !         do { $deleted += ($thistime = unlink $file) } while ($thistime);
  326. !         carp "Unable to delete $file: $!" unless $deleted;
  327.       }
  328.       closedir(OUTDIR);
  329.       }
  330. ***************
  331. *** 207,213 ****
  332. --- 228,236 ----
  333.       open(TS,">$al_idx_file") or
  334.       carp "AutoSplit: unable to create timestamp file ($al_idx_file): $!";
  335.       print TS "# Index created by AutoSplit for $filename (file acts as timestamp)\n";
  336. +     print TS "package $package;\n";
  337.       print TS map("sub $_ ;\n", @subnames);
  338. +     print TS "1;\n";
  339.       close(TS);
  340.   
  341.       check_unique($package, $Maxlen, 1, @names);
  342. Index: lib/Benchmark.pm
  343. *** perl5.001f/lib/Benchmark.pm    Tue Oct 18 12:34:33 1994
  344. --- perl5.001g/lib/Benchmark.pm    Thu May 25 11:15:48 1995
  345. ***************
  346. *** 1,5 ****
  347. --- 1,166 ----
  348.   package Benchmark;
  349.   
  350. + =head1 NAME
  351. + Benchmark - benchmark running times of code
  352. + timethis - run a chunk of code several times
  353. + timethese - run several chunks of code several times
  354. + timeit - run a chunk of code and see how long it goes
  355. + =head1 SYNOPSIS
  356. +     timethis ($count, "code");
  357. +     timethese($count, {
  358. +     'Name1' => '...code1...',
  359. +     'Name2' => '...code2...',
  360. +     });
  361. +     $t = timeit($count, '...other code...')
  362. +     print "$count loops of other code took:",timestr($t),"\n";
  363. + =head1 DESCRIPTION
  364. + The Benchmark module encapsulates a number of routines to help you
  365. + figure out how long it takes to execute some code.
  366. + =head2 Methods
  367. + =over 10
  368. + =item new
  369. + Returns the current time.   Example:
  370. +     use Benchmark;
  371. +     $t0 = new Benchmark;
  372. +     # ... your code here ...
  373. +     $t1 = new Benchmark;
  374. +     $td = timediff($t1, $t0);
  375. +     print "the code took:",timestr($dt),"\n";
  376. + =item debug
  377. + Enables or disable debugging by setting the C<$Benchmark::Debug> flag:
  378. +     debug Benchmark 1; 
  379. +     $t = timeit(10, ' 5 ** $Global ');
  380. +     debug Benchmark 0; 
  381. + =back
  382. + =head2 Standard Exports
  383. + The following routines will be exported into your namespace 
  384. + if you use the Benchmark module:
  385. + =over 10
  386. + =item timeit(COUNT, CODE)
  387. + Arguments: COUNT is the number of time to run the loop, and 
  388. + the second is the code to run.  CODE may be a string containing the code,
  389. + a reference to the function to run, or a reference to a hash containing 
  390. + keys which are names and values which are more CODE specs.
  391. + Side-effects: prints out noise to standard out.
  392. + Returns: a Benchmark object.  
  393. + =item timethis
  394. + =item timethese
  395. + =item timediff
  396. + =item timestr
  397. + =back
  398. + =head2 Optional Exports
  399. + The following routines will be exported into your namespace
  400. + if you specifically ask that they be imported:
  401. + =over 10
  402. + clearcache
  403. + clearallcache
  404. + disablecache
  405. + enablecache
  406. + =back
  407. + =head1 NOTES
  408. + The data is stored as a list of values from the time and times
  409. + functions: 
  410. +       ($real, $user, $system, $children_user, $children_system)
  411. + in seconds for the whole loop (not divided by the number of rounds).
  412. + The timing is done using time(3) and times(3).
  413. + Code is executed in the caller's package.
  414. + Enable debugging by:  
  415. +     $Benchmark::debug = 1;
  416. + The time of the null loop (a loop with the same
  417. + number of rounds but empty loop body) is subtracted
  418. + from the time of the real loop.
  419. + The null loop times are cached, the key being the
  420. + number of rounds. The caching can be controlled using
  421. + calls like these:
  422. +     clearcache($key); 
  423. +     clearallcache();
  424. +     disablecache(); 
  425. +     enablecache();
  426. + =head1 INHERITANCE
  427. + Benchmark inherits from no other class, except of course
  428. + for Exporter.
  429. + =head1 CAVEATS
  430. + The real time timing is done using time(2) and
  431. + the granularity is therefore only one second.
  432. + Short tests may produce negative figures because perl
  433. + can appear to take longer to execute the empty loop 
  434. + than a short test; try: 
  435. +     timethis(100,'1');
  436. + The system time of the null loop might be slightly
  437. + more than the system time of the loop with the actual
  438. + code and therefore the difference might end up being < 0.
  439. + More documentation is needed :-( especially for styles and formats.
  440. + =head1 AUTHORS
  441. + Jarkko Hietaniemi <Jarkko.Hietaniemi@hut.fi>,
  442. + Tim Bunce <Tim.Bunce@ig.co.uk>
  443. + =head1 MODIFICATION HISTORY
  444. + September 8th, 1994; by Tim Bunce.
  445. + =cut
  446.   # Purpose: benchmark running times of code.
  447.   #
  448.   #
  449. Index: lib/Carp.pm
  450. *** perl5.001f/lib/Carp.pm    Sun Mar 12 21:41:15 1995
  451. --- perl5.001g/lib/Carp.pm    Thu May 25 11:16:07 1995
  452. ***************
  453. *** 1,5 ****
  454. --- 1,29 ----
  455.   package Carp;
  456.   
  457. + =head1 NAME
  458. + carp - warn of errors (from perspective of caller)
  459. + croak - die of errors (from perspective of caller)
  460. + confess - die of errors with stack backtrace
  461. + =head1 SYNOPSIS
  462. +     use Carp;
  463. +     croak "We're outta here!";
  464. + =head1 DESCRIPTION
  465. + The Carp routines are useful in your own modules because
  466. + they act like die() or warn(), but report where the error
  467. + was in the code they were called from.  Thus if you have a 
  468. + routine Foo() that has a carp() in it, then the carp() 
  469. + will report the error as occurring where Foo() was called, 
  470. + not where carp() was called.
  471. + =cut
  472.   # This package implements handy routines for modules that wish to throw
  473.   # exceptions outside of the current package.
  474.   
  475. Index: lib/Cwd.pm
  476. *** perl5.001f/lib/Cwd.pm    Mon Mar  6 22:19:33 1995
  477. --- perl5.001g/lib/Cwd.pm    Thu May 25 11:16:34 1995
  478. ***************
  479. *** 3,8 ****
  480. --- 3,37 ----
  481.   require Exporter;
  482.   use Config;
  483.   
  484. + =head1 NAME
  485. + getcwd - get pathname of current working directory
  486. + =head1 SYNOPSIS
  487. +     require Cwd;
  488. +     $dir = Cwd::getcwd();
  489. +     use Cwd;
  490. +     $dir = getcwd();
  491. +     use Cwd 'chdir';
  492. +     chdir "/tmp";
  493. +     print $ENV{'PWD'};
  494. + =head1 DESCRIPTION
  495. + The getcwd() function re-implements the getcwd(3) (or getwd(3)) functions
  496. + in Perl.  If you ask to override your chdir() built-in function, then your
  497. + PWD environment variable will be kept up to date.  (See
  498. + L<perlsub/Overriding builtin functions>.)
  499. + The fastgetcwd() function looks the same as getcwd(), but runs faster.
  500. + It's also more dangerous because you might conceivably chdir() out of a
  501. + directory that you can't chdir() back into.
  502. + =cut
  503.   @ISA = qw(Exporter);
  504.   @EXPORT = qw(getcwd fastcwd);
  505.   @EXPORT_OK = qw(chdir);
  506. Index: lib/English.pm
  507. *** perl5.001f/lib/English.pm    Tue Feb 21 19:39:05 1995
  508. --- perl5.001g/lib/English.pm    Thu May 25 11:17:06 1995
  509. ***************
  510. *** 3,8 ****
  511. --- 3,34 ----
  512.   require Exporter;
  513.   @ISA = (Exporter);
  514.   
  515. + =head1 NAME
  516. + English - use nice English (or awk) names for ugly punctuation variables
  517. + =head1 SYNOPSIS
  518. +     use English;
  519. +     ...
  520. +     if ($ERRNO =~ /denied/) { ... }
  521. + =head1 DESCRIPTION
  522. + This module provides aliases for the built-in variables whose
  523. + names no one seems to like to read.  Variables with side-effects
  524. + which get triggered just by accessing them (like $0) will still 
  525. + be affected.
  526. + For those variables that have an B<awk> version, both long
  527. + and short English alternatives are provided.  For example, 
  528. + the C<$/> variable can be referred to either $RS or 
  529. + $INPUT_RECORD_SEPARATOR if you are using the English module.
  530. + See L<perlvar> for a complete list of these.
  531. + =cut
  532.   local $^W = 0;
  533.   
  534.   # Grandfather $NAME import
  535. Index: lib/Exporter.pm
  536. *** perl5.001f/lib/Exporter.pm    Sun Mar 12 21:39:16 1995
  537. --- perl5.001g/lib/Exporter.pm    Thu May 25 11:17:47 1995
  538. ***************
  539. *** 2,32 ****
  540.   
  541.   =head1 Comments
  542.   
  543. ! If the first entry in an import list begins with /, ! or : then
  544. ! treat the list as a series of specifications which either add to
  545. ! or delete from the list of names to import. They are processed
  546. ! left to right. Specifications are in the form:
  547.   
  548. -     [!]/pattern/    All names in @EXPORT and @EXPORT_OK which match
  549.       [!]name         This name only
  550. -     [!]:tag         All names in $EXPORT_TAGS{":tag"}
  551.       [!]:DEFAULT     All names in @EXPORT
  552.   
  553. ! e.g., Foo.pm defines:
  554.   
  555.       @EXPORT      = qw(A1 A2 A3 A4 A5);
  556.       @EXPORT_OK   = qw(B1 B2 B3 B4 B5);
  557. !     %EXPORT_TAGS = (':T1' => [qw(A1 A2 B1 B2)], ':T2' => [qw(A1 A2 B3 B4)]);
  558.   
  559.       Note that you cannot use tags in @EXPORT or @EXPORT_OK.
  560.       Names in EXPORT_TAGS must also appear in @EXPORT or @EXPORT_OK.
  561.   
  562.   Application says:
  563.   
  564. !     use Module qw(:T2 !B3 A3);
  565.       use Socket qw(!/^[AP]F_/ !SOMAXCONN !SOL_SOCKET);
  566.       use POSIX  qw(/^S_/ acos asin atan /^E/ !/^EXIT/);
  567.   
  568.   =cut
  569.   
  570.   require 5.001;
  571. --- 2,41 ----
  572.   
  573.   =head1 Comments
  574.   
  575. ! If the first entry in an import list begins with !, : or / then the
  576. ! list is treated as a series of specifications which either add to or
  577. ! delete from the list of names to import. They are processed left to
  578. ! right. Specifications are in the form:
  579.   
  580.       [!]name         This name only
  581.       [!]:DEFAULT     All names in @EXPORT
  582. +     [!]:tag         All names in $EXPORT_TAGS{tag} anonymous list
  583. +     [!]/pattern/    All names in @EXPORT and @EXPORT_OK which match
  584.   
  585. ! A leading ! indicates that matching names should be deleted from the
  586. ! list of names to import.  If the first specification is a deletion it
  587. ! is treated as though preceded by :DEFAULT. If you just want to import
  588. ! extra names in addition to the default set you will still need to
  589. ! include :DEFAULT explicitly.
  590. ! e.g., Module.pm defines:
  591.   
  592.       @EXPORT      = qw(A1 A2 A3 A4 A5);
  593.       @EXPORT_OK   = qw(B1 B2 B3 B4 B5);
  594. !     %EXPORT_TAGS = (T1 => [qw(A1 A2 B1 B2)], T2 => [qw(A1 A2 B3 B4)]);
  595.   
  596.       Note that you cannot use tags in @EXPORT or @EXPORT_OK.
  597.       Names in EXPORT_TAGS must also appear in @EXPORT or @EXPORT_OK.
  598.   
  599.   Application says:
  600.   
  601. !     use Module qw(:DEFAULT :T2 !B3 A3);
  602.       use Socket qw(!/^[AP]F_/ !SOMAXCONN !SOL_SOCKET);
  603.       use POSIX  qw(/^S_/ acos asin atan /^E/ !/^EXIT/);
  604.   
  605. + You can set C<$Exporter::Verbose=1;> to see how the specifications are
  606. + being processed and what is actually being imported into modules.
  607.   =cut
  608.   
  609.   require 5.001;
  610. ***************
  611. *** 110,116 ****
  612.           }
  613.           }
  614.       }
  615. !     die "Can't continue with import errors.\n" if $oops;
  616.       }
  617.       else {
  618.       @imports = @exports;
  619. --- 119,125 ----
  620.           }
  621.           }
  622.       }
  623. !     Carp::croak("Can't continue with import errors.\n") if $oops;
  624.       }
  625.       else {
  626.       @imports = @exports;
  627. Index: lib/ExtUtils/MakeMaker.pm
  628. *** perl5.001f/lib/ExtUtils/MakeMaker.pm    Tue Apr 18 09:51:17 1995
  629. --- perl5.001g/lib/ExtUtils/MakeMaker.pm    Tue May 30 14:56:48 1995
  630. ***************
  631. *** 1,6 ****
  632.   package ExtUtils::MakeMaker;
  633.   
  634. ! $Version = 4.094; # Last edited 17 Apr 1995 by Andy Dougherty
  635.   
  636.   use Config;
  637.   use Carp;
  638. --- 1,6 ----
  639.   package ExtUtils::MakeMaker;
  640.   
  641. ! $Version = 4.095; # Last edited 17 Apr 1995 by Andy Dougherty
  642.   
  643.   use Config;
  644.   use Carp;
  645. ***************
  646. *** 835,841 ****
  647.   }
  648.   
  649.   
  650. ! sub init_dirscan {    # --- File and Directory Lists (.xs .pm etc)
  651.   
  652.       my($name, %dir, %xs, %c, %h, %ignore, %pl_files);
  653.       local(%pm); #the sub in find() has to see this hash
  654. --- 835,841 ----
  655.   }
  656.   
  657.   
  658. ! sub init_dirscan {    # --- File and Directory Lists (.xs .pm .pod etc)
  659.   
  660.       my($name, %dir, %xs, %c, %h, %ignore, %pl_files);
  661.       local(%pm); #the sub in find() has to see this hash
  662. ***************
  663. *** 853,859 ****
  664.           $c{$name} = 1;
  665.       } elsif ($name =~ /\.h$/){
  666.           $h{$name} = 1;
  667. !     } elsif ($name =~ /\.p[ml]$/){
  668.           $pm{$name} = "\$(INST_LIBDIR)/$name";
  669.       } elsif ($name =~ /\.PL$/ && $name ne "Makefile.PL") {
  670.           ($pl_files{$name} = $name) =~ s/\.PL$// ;
  671. --- 853,859 ----
  672.           $c{$name} = 1;
  673.       } elsif ($name =~ /\.h$/){
  674.           $h{$name} = 1;
  675. !     } elsif ($name =~ /\.(p[ml]|pod)$/){
  676.           $pm{$name} = "\$(INST_LIBDIR)/$name";
  677.       } elsif ($name =~ /\.PL$/ && $name ne "Makefile.PL") {
  678.           ($pl_files{$name} = $name) =~ s/\.PL$// ;
  679. ***************
  680. *** 2336,2362 ****
  681. --- 2336,2384 ----
  682.   =head1 MODIFICATION HISTORY
  683.   
  684.   v1, August 1994; by Andreas Koenig. Based on Andy Dougherty's Makefile.SH.
  685.   v2, September 1994 by Tim Bunce.
  686.   v3.0 October  1994 by Tim Bunce.
  687.   v3.1 November 11th 1994 by Tim Bunce.
  688.   v3.2 November 18th 1994 by Tim Bunce.
  689.   v3.3 November 27th 1994 by Andreas Koenig.
  690.   v3.4 December  7th 1994 by Andreas Koenig and Tim Bunce.
  691.   v3.5 December 15th 1994 by Tim Bunce.
  692.   v3.6 December 15th 1994 by Tim Bunce.
  693.   v3.7 December 30th 1994 By Tim Bunce
  694.   v3.8 January  17th 1995 By Andreas Koenig and Tim Bunce
  695.   v3.9 January 19th 1995 By Tim Bunce
  696.   v3.10 January 23rd 1995 By Tim Bunce
  697.   v3.11 January 24th 1995 By Andreas Koenig
  698.   v4.00 January 24th 1995 By Tim Bunce
  699.   v4.01 January 25th 1995 By Tim Bunce
  700.   v4.02 January 29th 1995 By Andreas Koenig
  701.   v4.03 January 30th 1995 By Andreas Koenig
  702.   v4.04 Februeary 5th 1995 By Andreas Koenig
  703.   v4.05 February 8th 1995 By Andreas Koenig
  704.   v4.06 February 10th 1995 By Andreas Koenig
  705.   v4.061 February 12th 1995 By Andreas Koenig
  706.   v4.08 - 4.085  February 14th-21st 1995 by Andreas Koenig
  707.   
  708.   Introduces EXE_FILES and INST_EXE for installing executable scripts 
  709. ***************
  710. *** 2384,2390 ****
  711.   old_extliblist() code deleted, new_extliblist() renamed to extliblist().
  712.   
  713.   Improved algorithm in extliblist, that returns ('','','') if no
  714. ! library has been found, even if a -L directory has been found.
  715.   
  716.   Fixed a bug that didn't allow lib/ directory work as documented.
  717.   
  718. --- 2406,2412 ----
  719.   old_extliblist() code deleted, new_extliblist() renamed to extliblist().
  720.   
  721.   Improved algorithm in extliblist, that returns ('','','') if no
  722. ! library has been found, even if a C<-L> directory has been found.
  723.   
  724.   Fixed a bug that didn't allow lib/ directory work as documented.
  725.   
  726. ***************
  727. *** 2436,2442 ****
  728.   
  729.   Another attempt to fix writedoc() from Dean Roehrich.
  730.   
  731. ! v4.092 April 11 1994 by Andreas Koenig
  732.   
  733.   Fixed a docu bug in hint file description. Added printing of a warning
  734.   from eval in the hintfile section if the eval has errors.  Moved
  735. --- 2458,2464 ----
  736.   
  737.   Another attempt to fix writedoc() from Dean Roehrich.
  738.   
  739. ! v4.092 April 11 1995 by Andreas Koenig
  740.   
  741.   Fixed a docu bug in hint file description. Added printing of a warning
  742.   from eval in the hintfile section if the eval has errors.  Moved
  743. ***************
  744. *** 2456,2462 ****
  745.   
  746.   Minor cosmetics.
  747.   
  748. ! v4.093 April 12 1994 by Andy Dougherty
  749.   
  750.   Rename distclean target to plain dist.  Insert a dummy distclean
  751.   target that's the same as realclean.  This is more consistent with the
  752. --- 2478,2484 ----
  753.   
  754.   Minor cosmetics.
  755.   
  756. ! v4.093 April 12 1995 by Andy Dougherty
  757.   
  758.   Rename distclean target to plain dist.  Insert a dummy distclean
  759.   target that's the same as realclean.  This is more consistent with the
  760. ***************
  761. *** 2468,2476 ****
  762.   Include Tim's suggestions about $verbose and more careful substitution
  763.   of $(CC) for $Config{'cc'}.
  764.   
  765. ! v4.094 April 12 1994 by Andy Dougherty
  766.   
  767.   Include Andreas' improvement of $(CC) detection.
  768.   
  769.   =head1 NOTES
  770.   
  771. --- 2490,2504 ----
  772.   Include Tim's suggestions about $verbose and more careful substitution
  773.   of $(CC) for $Config{'cc'}.
  774.   
  775. ! v4.094 April 12 1995 by Andy Dougherty
  776.   
  777.   Include Andreas' improvement of $(CC) detection.
  778. + v4.095 May 30 1995 by Andy Dougherty
  779. + Include installation of .pod and .pm files.
  780. + Space out documentation for better printing with pod2man.
  781.   
  782.   =head1 NOTES
  783.   
  784. Index: lib/ExtUtils/xsubpp
  785. *** perl5.001f/lib/ExtUtils/xsubpp    Mon Mar  6 19:59:27 1995
  786. --- perl5.001g/lib/ExtUtils/xsubpp    Fri May 26 15:24:22 1995
  787. ***************
  788. *** 50,61 ****
  789. --- 50,146 ----
  790.   
  791.   Larry Wall
  792.   
  793. + =head1 MODIFICATION HISTORY
  794. + =head2 1.0
  795. + I<xsubpp> as released with Perl 5.000
  796. + =head2 1.1
  797. + I<xsubpp> as released with Perl 5.001
  798. + =head2 1.2 
  799. + Changes by Paul Marquess <pmarquess@bfsec.bt.co.uk>, 22 May 1995.
  800. + =over 5
  801. + =item 1.
  802. + Added I<xsubpp> version number for the first time. As previous releases
  803. + of I<xsubpp> did not have a formal version number, a numbering scheme
  804. + has been applied retrospectively.
  805. + =item 2.
  806. + If OUTPUT: is being used to specify output parameters and RETVAL is
  807. + also to be returned, it is now no longer necessary for the user to
  808. + ensure that RETVAL is specified last.
  809. + =item 3.
  810. + The I<xsubpp> version number, the .xs filename and a time stamp are
  811. + written to the generated .c file as a comment.
  812. + =item 4.
  813. + When I<xsubpp> is parsing the definition of both the input parameters
  814. + and the OUTPUT parameters, any duplicate definitions will be noted and
  815. + ignored.
  816. + =item 5.
  817. + I<xsubpp> is slightly more forgiving with extra whitespace.
  818. + =back
  819. + =head2 1.3 
  820. + Changes by Paul Marquess <pmarquess@bfsec.bt.co.uk>, 23 May 1995.
  821. + =over 5
  822. + =item 1.
  823. + More whitespace restrictions have been relaxed. In particular some
  824. + cases where a tab character was used to delimit fields has been
  825. + removed. In these cases any whitespace will now suffice.
  826. + The specific places where changes have been made are in the TYPEMAP
  827. + section of a typemap file and the input and OUTPUT: parameter
  828. + declarations sections in a .xs file.
  829. + =item 2.
  830. + More error checking added.
  831. + Before processing each typemap file I<xsubpp> now checks that it is a
  832. + text file. If not an warning will be displayed. In addition, a warning
  833. + will be displayed if it is not possible to open the typemap file.
  834. + In the TYPEMAP section of a typemap file, an error will be raised if
  835. + the line does not have 2 columns.
  836. + When parsing input parameter declarations check that there is at least
  837. + a type and name pair.
  838. + =back
  839. + =head2 1.4 
  840. + When parsing the OUTPUT arguments check that they are all present in
  841. + the corresponding input argument definitions.
  842.   =head1 SEE ALSO
  843.   
  844.   perl(1)
  845.   
  846.   =cut
  847.   
  848. + # Global Constants
  849. + $XSUBPP_version = "1.4" ;
  850.   $usage = "Usage: xsubpp [-C++] [-except] [-typemap typemap] file.xs\n";
  851.   
  852.   SWITCH: while ($ARGV[0] =~ s/^-//) {
  853. ***************
  854. *** 75,80 ****
  855. --- 160,186 ----
  856.       or ($dir, $filename) = ('.', $ARGV[0]);
  857.   chdir($dir);
  858.   
  859. + sub TrimWhitespace
  860. + {
  861. +     $_[0] =~ s/^\s+|\s+$//go ;
  862. + }
  863. + sub TidyType
  864. + {
  865. +     local ($_) = @_ ;
  866. +     # rationalise any '*' by joining them into bunches and removing whitespace
  867. +     s#\s*(\*+)\s*#$1#g;
  868. +     # change multiple whitespace into a single space
  869. +     s/\s+/ /g ;
  870. +     
  871. +     # trim leading & trailing whitespace
  872. +     TrimWhitespace($_) ;
  873. +     $_ ;
  874. + }
  875.   $typemap = shift @ARGV;
  876.   foreach $typemap (@tm) {
  877.       die "Can't find $typemap in $pwd\n" unless -r $typemap;
  878. ***************
  879. *** 83,89 ****
  880.                   ../../lib/ExtUtils/typemap ../../../typemap ../../typemap
  881.                   ../typemap typemap);
  882.   foreach $typemap (@tm) {
  883. !     open(TYPEMAP, $typemap) || next;
  884.       $mode = Typemap;
  885.       $current = \$junk;
  886.       while (<TYPEMAP>) {
  887. --- 189,200 ----
  888.                   ../../lib/ExtUtils/typemap ../../../typemap ../../typemap
  889.                   ../typemap typemap);
  890.   foreach $typemap (@tm) {
  891. !     next unless -e $typemap ;
  892. !     # skip directories, binary files etc.
  893. !     warn("Warning: ignoring non-text typemap file '$typemap'\n"), next 
  894. !     unless -T $typemap ;
  895. !     open(TYPEMAP, $typemap) 
  896. !     or warn ("Warning: could not open typemap file '$typemap': $!\n"), next;
  897.       $mode = Typemap;
  898.       $current = \$junk;
  899.       while (<TYPEMAP>) {
  900. ***************
  901. *** 93,100 ****
  902.       if (/^TYPEMAP\s*$/) { $mode = Typemap, next }
  903.       if ($mode eq Typemap) {
  904.           chop;
  905. !         ($typename, $kind) = split(/\t+/, $_, 2);
  906. !         $type_kind{$typename} = $kind if $kind ne '';
  907.       }
  908.       elsif ($mode eq Input) {
  909.           if (/^\s/) {
  910. --- 204,219 ----
  911.       if (/^TYPEMAP\s*$/) { $mode = Typemap, next }
  912.       if ($mode eq Typemap) {
  913.           chop;
  914. !         my $line = $_ ;
  915. !             TrimWhitespace($_) ;
  916. !         # skip blank lines and comment lines
  917. !         next if /^$/ or /^#/ ;
  918. !         my @words = split (' ') ;
  919. !         blurt("Error: File '$typemap' Line $. '$line' TYPEMAP entry needs 2 columns\n"), next 
  920. !         unless @words >= 2 ;
  921. !         my $kind = pop @words ;
  922. !             TrimWhitespace($kind) ;
  923. !         $type_kind{TidyType("@words")} = $kind ;
  924.       }
  925.       elsif ($mode eq Input) {
  926.           if (/^\s/) {
  927. ***************
  928. *** 132,138 ****
  929.       $text;
  930.   }
  931.   
  932. ! open(F, $filename) || die "cannot open $filename\n";
  933.   
  934.   while (<F>) {
  935.       last if ($Module, $foo, $Package, $foo1, $Prefix) =
  936. --- 251,269 ----
  937.       $text;
  938.   }
  939.   
  940. ! # Identify the version of xsubpp used
  941. ! $TimeStamp = localtime ;
  942. ! print <<EOM ;
  943. ! /* 
  944. !  * This file was generated automatically by xsubpp version $XSUBPP_version
  945. !  * from $filename on $TimeStamp
  946. !  *
  947. !  */
  948. !  
  949. ! EOM
  950. !  
  951. ! open(F, $filename) or die "cannot open $filename: $!\n";
  952.   
  953.   while (<F>) {
  954.       last if ($Module, $foo, $Package, $foo1, $Prefix) =
  955. ***************
  956. *** 196,204 ****
  957.       undef($class);
  958.       undef($static);
  959.       undef($elipsis);
  960.   
  961.       # extract return type, function name and arguments
  962. !     $ret_type = shift(@line);
  963.       if ($ret_type =~ /^BOOT:/) {
  964.           push (@BootCode, @line, "", "") ;
  965.           next ;
  966. --- 327,337 ----
  967.       undef($class);
  968.       undef($static);
  969.       undef($elipsis);
  970. +     undef($wantRETVAL) ;
  971. +     undef(%arg_list) ;
  972.   
  973.       # extract return type, function name and arguments
  974. !     $ret_type = TidyType(shift(@line));
  975.       if ($ret_type =~ /^BOOT:/) {
  976.           push (@BootCode, @line, "", "") ;
  977.           next ;
  978. ***************
  979. *** 325,335 ****
  980.           $_ = shift(@line);
  981.           last if /^\s*NOT_IMPLEMENTED_YET/;
  982.           last if /^\s*(PPCODE|CODE|OUTPUT|CLEANUP|CASE)\s*:/;
  983. !         ($var_type, $var_name, $var_init) =
  984. !             /\s*([^\t]+)\s*([^\s=]+)\s*(=.*)?/;
  985. !         # Catch common errors. More error checking required here.
  986. !         blurt("Error: no tab in $pname argument declaration '$_'\n")
  987. !             unless (m/\S+\s*\t\s*\S+/);
  988.           # catch C style argument declaration (this could be made alowable syntax)
  989.           warn("Warning: ignored semicolon in $pname argument declaration '$_'\n")
  990.               if ($var_name =~ s/;//g); # eg SV *<tab>name;
  991. --- 458,477 ----
  992.           $_ = shift(@line);
  993.           last if /^\s*NOT_IMPLEMENTED_YET/;
  994.           last if /^\s*(PPCODE|CODE|OUTPUT|CLEANUP|CASE)\s*:/;
  995. !                 TrimWhitespace($_) ;
  996. !                 # skip blank lines 
  997. !                 next if /^$/ ;
  998. !         my $line = $_ ;
  999. !           # check for optional initialisation code
  1000. !         my $var_init = $1 if s/\s*(=.*)$// ;
  1001. !                 my @words = split (' ') ;
  1002. !                 blurt("Error: invalid argument declaration '$line'"), next
  1003. !                     unless @words >= 2 ;
  1004. !                 my $var_name = pop @words ;
  1005. !         my $var_type = "@words" ;
  1006.           # catch C style argument declaration (this could be made alowable syntax)
  1007.           warn("Warning: ignored semicolon in $pname argument declaration '$_'\n")
  1008.               if ($var_name =~ s/;//g); # eg SV *<tab>name;
  1009. ***************
  1010. *** 340,345 ****
  1011. --- 482,492 ----
  1012.               $var_name =~ s/^&//;
  1013.               $var_addr{$var_name} = 1;
  1014.           }
  1015. +             # Check for duplicate definitions
  1016. +             blurt ("Error: duplicate definition of argument '$var_name' ignored"), next
  1017. +             if $arg_list{$var_name} ++  ;
  1018.           $thisdone |= $var_name eq "THIS";
  1019.           $retvaldone |= $var_name eq "RETVAL";
  1020.           $var_types{$var_name} = $var_type;
  1021. ***************
  1022. *** 425,453 ****
  1023.                   $func_name = $2;
  1024.               }
  1025.               print "$func_name($func_args);\n";
  1026. !             &generate_output($ret_type, 0, "RETVAL")
  1027. !                 unless $ret_type eq "void";
  1028.           }
  1029.       }
  1030.   
  1031.       # do output variables
  1032.       if (/^\s*OUTPUT\s*:/) {
  1033.           while (@line) {
  1034.               $_ = shift(@line);
  1035.               last if /^\s*CLEANUP\s*:/;
  1036. !             s/^\s+//;
  1037. !             ($outarg, $outcode) = split(/\t+/);
  1038.               if ($outcode) {
  1039.                   print "\t$outcode\n";
  1040.               } else {
  1041. -                 die "$outarg not an argument"
  1042. -                     unless defined($args_match{$outarg});
  1043.                   $var_num = $args_match{$outarg};
  1044.                   &generate_output($var_types{$outarg}, $var_num,
  1045.                       $outarg); 
  1046.               }
  1047.           }
  1048.       }
  1049.       # do cleanup
  1050.       if (/^\s*CLEANUP\s*:/) {
  1051.           while (@line) {
  1052. --- 572,619 ----
  1053.                   $func_name = $2;
  1054.               }
  1055.               print "$func_name($func_args);\n";
  1056. !             $wantRETVAL = 1 
  1057. !                     unless $ret_type eq "void";
  1058.           }
  1059.       }
  1060.   
  1061.       # do output variables
  1062.       if (/^\s*OUTPUT\s*:/) {
  1063. +         my $gotRETVAL ;
  1064. +         my %outargs ;
  1065.           while (@line) {
  1066.               $_ = shift(@line);
  1067.               last if /^\s*CLEANUP\s*:/;
  1068. !             TrimWhitespace($_) ;
  1069. !             next if /^$/ ;
  1070. !             my ($outarg, $outcode) = /^(\S+)\s*(.*)/ ;
  1071. !             if (!$gotRETVAL and $outarg eq 'RETVAL') {
  1072. !                 # deal with RETVAL last
  1073. !                 push(@line, $_) ;
  1074. !                 $gotRETVAL = 1 ;
  1075. !                 undef ($wantRETVAL) ;
  1076. !                 next ;
  1077. !             }
  1078. !             blurt ("Error: duplicate OUTPUT argument '$outarg' ignored"), next
  1079. !                 if $outargs{$outarg} ++ ;
  1080. !             blurt ("Error: OUTPUT $outarg not an argument"), next
  1081. !                 unless defined($args_match{$outarg});
  1082. !             blurt("Error: No input definition for OUTPUT argument '$outarg' - ignored"), next
  1083. !                 unless defined $var_types{$outarg} ;
  1084.               if ($outcode) {
  1085.                   print "\t$outcode\n";
  1086.               } else {
  1087.                   $var_num = $args_match{$outarg};
  1088.                   &generate_output($var_types{$outarg}, $var_num,
  1089.                       $outarg); 
  1090.               }
  1091.           }
  1092.       }
  1093. +     # all OUTPUT done, so now push the return value on the stack
  1094. +     &generate_output($ret_type, 0, "RETVAL")
  1095. +          if $wantRETVAL ;
  1096.       # do cleanup
  1097.       if (/^\s*CLEANUP\s*:/) {
  1098.           while (@line) {
  1099. ***************
  1100. *** 533,539 ****
  1101.       local($ntype);
  1102.       local($tk);
  1103.   
  1104. !     blurt("'$type' not in typemap"), return unless defined($type_kind{$type});
  1105.       ($ntype = $type) =~ s/\s*\*/Ptr/g;
  1106.       $subtype = $ntype;
  1107.       $subtype =~ s/Ptr$//;
  1108. --- 699,706 ----
  1109.       local($ntype);
  1110.       local($tk);
  1111.   
  1112. !     $type = TidyType($type) ;
  1113. !     blurt("Error: '$type' not in typemap"), return unless defined($type_kind{$type});
  1114.       ($ntype = $type) =~ s/\s*\*/Ptr/g;
  1115.       $subtype = $ntype;
  1116.       $subtype =~ s/Ptr$//;
  1117. ***************
  1118. *** 570,579 ****
  1119.       local($argoff) = $num - 1;
  1120.       local($ntype);
  1121.   
  1122.       if ($type =~ /^array\(([^,]*),(.*)\)/) {
  1123.           print "\tsv_setpvn($arg, (char *)$var, $2 * sizeof($1)), XFree((char *)$var);\n";
  1124.       } else {
  1125. !         blurt("'$type' not in typemap"), return
  1126.           unless defined($type_kind{$type});
  1127.           ($ntype = $type) =~ s/\s*\*/Ptr/g;
  1128.           $ntype =~ s/\(\)//g;
  1129. --- 737,747 ----
  1130.       local($argoff) = $num - 1;
  1131.       local($ntype);
  1132.   
  1133. +     $type = TidyType($type) ;
  1134.       if ($type =~ /^array\(([^,]*),(.*)\)/) {
  1135.           print "\tsv_setpvn($arg, (char *)$var, $2 * sizeof($1)), XFree((char *)$var);\n";
  1136.       } else {
  1137. !         blurt("Error: '$type' not in typemap"), return
  1138.           unless defined($type_kind{$type});
  1139.           ($ntype = $type) =~ s/\s*\*/Ptr/g;
  1140.           $ntype =~ s/\(\)//g;
  1141. Index: lib/File/Basename.pm
  1142. *** perl5.001f/lib/File/Basename.pm    Sun Mar 12 03:14:03 1995
  1143. --- perl5.001g/lib/File/Basename.pm    Thu May 25 15:10:28 1995
  1144. ***************
  1145. *** 1,5 ****
  1146. --- 1,116 ----
  1147.   package File::Basename;
  1148.   
  1149. + =head1 NAME
  1150. + Basename - parse file specifications
  1151. + fileparse - split a pathname into pieces
  1152. + basename - extract just the filename from a path
  1153. + dirname - extract just the directory from a path
  1154. + =head1 SYNOPSIS
  1155. +     use File::Basename;
  1156. +     ($name,$path,$suffix) = fileparse($fullname,@suffixlist)
  1157. +     fileparse_set_fstype($os_string);
  1158. +     $basename = basename($fullname,@suffixlist);
  1159. +     $dirname = dirname($fullname);
  1160. +     ($name,$path,$suffix) = fileparse("lib/File/Basename.pm","\.pm");
  1161. +     fileparse_set_fstype("VMS");
  1162. +     $basename = basename("lib/File/Basename.pm",".pm");
  1163. +     $dirname = dirname("lib/File/Basename.pm");
  1164. + =head1 DESCRIPTION
  1165. + These routines allow you to parse file specifications into useful
  1166. + pieces using the syntax of different operating systems.
  1167. + =over 4
  1168. + =item fileparse_set_fstype
  1169. + You select the syntax via the routine fileparse_set_fstype().
  1170. + If the argument passed to it contains one of the substrings
  1171. + "VMS", "MSDOS", or "MacOS", the file specification syntax of that
  1172. + operating system is used in future calls to fileparse(),
  1173. + basename(), and dirname().  If it contains none of these
  1174. + substrings, UNIX syntax is used.  This pattern matching is
  1175. + case-insensitive.  If you've selected VMS syntax, and the file
  1176. + specification you pass to one of these routines contains a "/",
  1177. + they assume you are using UNIX emulation and apply the UNIX syntax
  1178. + rules instead, for that function call only.
  1179. + If you haven't called fileparse_set_fstype(), the syntax is chosen
  1180. + by examining the "osname" entry from the C<Config> package
  1181. + according to these rules.
  1182. + =item fileparse
  1183. + The fileparse() routine divides a file specification into three
  1184. + parts: a leading B<path>, a file B<name>, and a B<suffix>.  The
  1185. + B<path> contains everything up to and including the last directory
  1186. + separator in the input file specification.  The remainder of the input
  1187. + file specification is then divided into B<name> and B<suffix> based on
  1188. + the optional patterns you specify in C<@suffixlist>.  Each element of
  1189. + this list is interpreted as a regular expression, and is matched
  1190. + against the end of B<name>.  If this succeeds, the matching portion of
  1191. + B<name> is removed and prepended to B<suffix>.  By proper use of
  1192. + C<@suffixlist>, you can remove file types or versions for examination.
  1193. + You are guaranteed that if you concatenate B<path>, B<name>, and
  1194. + B<suffix> together in that order, the result will be identical to the
  1195. + input file specification.
  1196. + =back
  1197. + =head1 EXAMPLES
  1198. + Using UNIX file syntax:
  1199. +     ($base,$path,$type) = fileparse('/virgil/aeneid/draft.book7', 
  1200. +                     '\.book\d+');
  1201. + would yield
  1202. +     $base eq 'draft'
  1203. +     $path eq '/virgil/aeneid',
  1204. +     $tail eq '.book7'
  1205. + Similarly, using VMS syntax:
  1206. +     ($name,$dir,$type) = fileparse('Doc_Root:[Help]Rhetoric.Rnh',
  1207. +                    '\..*');
  1208. + would yield
  1209. +     $name eq 'Rhetoric'
  1210. +     $dir  eq 'Doc_Root:[Help]'
  1211. +     $type eq '.Rnh'
  1212. + =item C<basename>
  1213. + The basename() routine returns the first element of the list produced
  1214. + by calling fileparse() with the same arguments.  It is provided for
  1215. + compatibility with the UNIX shell command basename(1).
  1216. + =item C<dirname>
  1217. + The dirname() routine returns the directory portion of the input file
  1218. + specification.  When using VMS or MacOS syntax, this is identical to the
  1219. + second element of the list produced by calling fileparse() with the same
  1220. + input file specification.  When using UNIX or MSDOS syntax, the return
  1221. + value conforms to the behavior of the UNIX shell command dirname(1).  This
  1222. + is usually the same as the behavior of fileparse(), but differs in some
  1223. + cases.  For example, for the input file specification F<lib/>, fileparse()
  1224. + considers the directory name to be F<lib/>, while dirname() considers the
  1225. + directory name to be F<.>).
  1226. + =cut
  1227.   require 5.000;
  1228.   use Config;
  1229.   require Exporter;
  1230. ***************
  1231. *** 62,68 ****
  1232.   sub fileparse {
  1233.     my($fullname,@suffices) = @_;
  1234.     my($fstype) = $Fileparse_fstype;
  1235. !   my($dirpath,$tail,$suffix,$idx);
  1236.   
  1237.     if ($fstype =~ /^VMS/i) {
  1238.       if ($fullname =~ m#/#) { $fstype = '' }  # We're doing Unix emulation
  1239. --- 173,179 ----
  1240.   sub fileparse {
  1241.     my($fullname,@suffices) = @_;
  1242.     my($fstype) = $Fileparse_fstype;
  1243. !   my($dirpath,$tail,$suffix);
  1244.   
  1245.     if ($fstype =~ /^VMS/i) {
  1246.       if ($fullname =~ m#/#) { $fstype = '' }  # We're doing Unix emulation
  1247. ***************
  1248. *** 84,89 ****
  1249. --- 195,201 ----
  1250.     }
  1251.   
  1252.     if (@suffices) {
  1253. +     $tail = '';
  1254.       foreach $suffix (@suffices) {
  1255.         if ($basename =~ /($suffix)$/) {
  1256.           $tail = $1 . $tail;
  1257. Index: lib/File/CheckTree.pm
  1258. *** perl5.001f/lib/File/CheckTree.pm    Mon Jan 16 23:41:00 1995
  1259. --- perl5.001g/lib/File/CheckTree.pm    Thu May 25 11:23:32 1995
  1260. ***************
  1261. *** 2,7 ****
  1262. --- 2,46 ----
  1263.   require 5.000;
  1264.   require Exporter;
  1265.   
  1266. + =head1 NAME
  1267. + validate - run many filetest checks on a tree
  1268. + =head1 SYNOPSIS
  1269. +     use File::CheckTree;
  1270. +     $warnings += validate( q{
  1271. +     /vmunix                 -e || die
  1272. +     /boot                   -e || die
  1273. +     /bin                    cd
  1274. +         csh                 -ex
  1275. +         csh                 !-ug
  1276. +         sh                  -ex
  1277. +         sh                  !-ug
  1278. +     /usr                    -d || warn "What happened to $file?\n"
  1279. +     });
  1280. + =head1 DESCRIPTION
  1281. + The validate() routine takes a single multiline string consisting of
  1282. + lines containing a filename plus a file test to try on it.  (The
  1283. + file test may also be a "cd", causing subsequent relative filenames
  1284. + to be interpreted relative to that directory.)  After the file test
  1285. + you may put C<|| die> to make it a fatal error if the file test fails.
  1286. + The default is C<|| warn>.  The file test may optionally have a "!' prepended
  1287. + to test for the opposite condition.  If you do a cd and then list some
  1288. + relative filenames, you may want to indent them slightly for readability.
  1289. + If you supply your own die() or warn() message, you can use $file to
  1290. + interpolate the filename.
  1291. + Filetests may be bunched:  "-rwx" tests for all of C<-r>, C<-w>, and C<-x>.
  1292. + Only the first failed test of the bunch will produce a warning.
  1293. + The routine returns the number of warnings issued.
  1294. + =cut
  1295.   @ISA = qw(Exporter);
  1296.   @EXPORT = qw(validate);
  1297.   
  1298. Index: lib/File/Find.pm
  1299. *** perl5.001f/lib/File/Find.pm    Tue Mar  7 11:34:41 1995
  1300. --- perl5.001g/lib/File/Find.pm    Thu May 25 11:28:40 1995
  1301. ***************
  1302. *** 5,10 ****
  1303. --- 5,65 ----
  1304.   use Cwd;
  1305.   use File::Basename;
  1306.   
  1307. + =head1 NAME
  1308. + find - traverse a file tree
  1309. + finddepth - traverse a directory structure depth-first
  1310. + =head1 SYNOPSIS
  1311. +     use File::Find;
  1312. +     find(\&wanted, '/foo','/bar');
  1313. +     sub wanted { ... }
  1314. +     
  1315. +     use File::Find;
  1316. +     finddepth(\&wanted, '/foo','/bar');
  1317. +     sub wanted { ... }
  1318. + =head1 DESCRIPTION
  1319. + The wanted() function does whatever verifications you want.  $dir contains
  1320. + the current directory name, and $_ the current filename within that
  1321. + directory.  $name contains C<"$dir/$_">.  You are chdir()'d to $dir when
  1322. + the function is called.  The function may set $prune to prune the tree.
  1323. + This library is primarily for the C<find2perl> tool, which when fed, 
  1324. +     find2perl / -name .nfs\* -mtime +7 \
  1325. +     -exec rm -f {} \; -o -fstype nfs -prune
  1326. + produces something like:
  1327. +     sub wanted {
  1328. +         /^\.nfs.*$/ &&
  1329. +         (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) &&
  1330. +         int(-M _) > 7 &&
  1331. +         unlink($_)
  1332. +         ||
  1333. +         ($nlink || (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_))) &&
  1334. +         $dev < 0 &&
  1335. +         ($prune = 1);
  1336. +     }
  1337. + Set the variable $dont_use_nlink if you're using AFS, since AFS cheats.
  1338. + C<finddepth> is just like C<find>, except that it does a depth-first
  1339. + search.
  1340. + Here's another interesting wanted function.  It will find all symlinks
  1341. + that don't resolve:
  1342. +     sub wanted {
  1343. +     -l && !-e && print "bogus link: $name\n";
  1344. +     } 
  1345. + =cut
  1346.   @ISA = qw(Exporter);
  1347.   @EXPORT = qw(find finddepth $name $dir);
  1348.   
  1349. Index: lib/FileHandle.pm
  1350. *** perl5.001f/lib/FileHandle.pm    Tue Oct 18 12:34:50 1994
  1351. --- perl5.001g/lib/FileHandle.pm    Thu May 25 11:18:20 1995
  1352. ***************
  1353. *** 2,7 ****
  1354. --- 2,56 ----
  1355.   
  1356.   # Note that some additional FileHandle methods are defined in POSIX.pm.
  1357.   
  1358. + =head1 NAME 
  1359. + FileHandle - supply object methods for filehandles
  1360. + cacheout - keep more files open than the system permits
  1361. + =head1 SYNOPSIS
  1362. +     use FileHandle;
  1363. +     autoflush STDOUT 1;
  1364. +     cacheout($path);
  1365. +     print $path @data;
  1366. + =head1 DESCRIPTION
  1367. + See L<perlvar> for complete descriptions of each of the following supported C<FileHandle> 
  1368. + methods:
  1369. +     print
  1370. +     autoflush
  1371. +     output_field_separator
  1372. +     output_record_separator
  1373. +     input_record_separator
  1374. +     input_line_number
  1375. +     format_page_number
  1376. +     format_lines_per_page
  1377. +     format_lines_left
  1378. +     format_name
  1379. +     format_top_name
  1380. +     format_line_break_characters
  1381. +     format_formfeed
  1382. + The cacheout() function will make sure that there's a filehandle
  1383. + open for writing available as the pathname you give it.  It automatically
  1384. + closes and re-opens files if you exceed your system file descriptor maximum.
  1385. + =head1 BUGS
  1386. + F<sys/param.h> lies with its C<NOFILE> define on some systems,
  1387. + so you may have to set $cacheout::maxopen yourself.
  1388. + Due to backwards compatibility, all filehandles resemble objects
  1389. + of class C<FileHandle>, or actually classes derived from that class.
  1390. + They actually aren't.  Which means you can't derive your own 
  1391. + class from C<FileHandle> and inherit those methods.
  1392. + =cut
  1393.   require 5.000;
  1394.   use English;
  1395.   use Exporter;
  1396. Index: lib/Getopt/Long.pm
  1397. Prereq:     1.14
  1398.  
  1399. *** perl5.001f/lib/Getopt/Long.pm    Wed Feb  8 19:11:39 1995
  1400. --- perl5.001g/lib/Getopt/Long.pm    Thu May 25 11:55:14 1995
  1401. ***************
  1402. *** 5,10 ****
  1403. --- 5,148 ----
  1404.   @ISA = qw(Exporter);
  1405.   @EXPORT = qw(GetOptions);
  1406.   
  1407. + =head1 NAME
  1408. + GetOptions - extended getopt processing
  1409. + =head1 SYNOPSIS
  1410. +     use Getopt::Long;
  1411. +     $result = GetOptions (...option-descriptions...);
  1412. + =head1 DESCRIPTION
  1413. + The Getopt::Long module implements an extended getopt function called
  1414. + GetOptions(). This function adheres to the new syntax (long option names,
  1415. + no bundling).  It tries to implement the better functionality of
  1416. + traditional, GNU and POSIX getopt() functions.
  1417. + Each description should designate a valid Perl identifier, optionally
  1418. + followed by an argument specifier.
  1419. + Values for argument specifiers are:
  1420. +   <none>   option does not take an argument
  1421. +   !        option does not take an argument and may be negated
  1422. +   =s :s    option takes a mandatory (=) or optional (:) string argument
  1423. +   =i :i    option takes a mandatory (=) or optional (:) integer argument
  1424. +   =f :f    option takes a mandatory (=) or optional (:) real number argument
  1425. + If option "name" is set, it will cause the Perl variable $opt_name to
  1426. + be set to the specified value. The calling program can use this
  1427. + variable to detect whether the option has been set. Options that do
  1428. + not take an argument will be set to 1 (one).
  1429. + Options that take an optional argument will be defined, but set to ''
  1430. + if no actual argument has been supplied.
  1431. + If an "@" sign is appended to the argument specifier, the option is
  1432. + treated as an array.  Value(s) are not set, but pushed into array
  1433. + @opt_name.
  1434. + Options that do not take a value may have an "!" argument specifier to
  1435. + indicate that they may be negated. E.g. "foo!" will allow B<-foo> (which
  1436. + sets $opt_foo to 1) and B<-nofoo> (which will set $opt_foo to 0).
  1437. + The option name may actually be a list of option names, separated by
  1438. + '|'s, e.g. B<"foo|bar|blech=s". In this example, options 'bar' and
  1439. + 'blech' will set $opt_foo instead.
  1440. + Option names may be abbreviated to uniqueness, depending on
  1441. + configuration variable $autoabbrev.
  1442. + Dashes in option names are allowed (e.g. pcc-struct-return) and will
  1443. + be translated to underscores in the corresponding Perl variable (e.g.
  1444. + $opt_pcc_struct_return).  Note that a lone dash "-" is considered an
  1445. + option, corresponding Perl identifier is $opt_ .
  1446. + A double dash "--" signals end of the options list.
  1447. + If the first option of the list consists of non-alphanumeric
  1448. + characters only, it is interpreted as a generic option starter.
  1449. + Everything starting with one of the characters from the starter will
  1450. + be considered an option.
  1451. + The default values for the option starters are "-" (traditional), "--"
  1452. + (POSIX) and "+" (GNU, being phased out).
  1453. + Options that start with "--" may have an argument appended, separated
  1454. + with an "=", e.g. "--foo=bar".
  1455. + If configuration variable $getopt_compat is set to a non-zero value,
  1456. + options that start with "+" may also include their arguments,
  1457. + e.g. "+foo=bar".
  1458. + A return status of 0 (false) indicates that the function detected
  1459. + one or more errors.
  1460. + =head1 EXAMPLES
  1461. + If option "one:i" (i.e. takes an optional integer argument), then
  1462. + the following situations are handled:
  1463. +    -one -two        -> $opt_one = '', -two is next option
  1464. +    -one -2        -> $opt_one = -2
  1465. + Also, assume "foo=s" and "bar:s" :
  1466. +    -bar -xxx        -> $opt_bar = '', '-xxx' is next option
  1467. +    -foo -bar        -> $opt_foo = '-bar'
  1468. +    -foo --        -> $opt_foo = '--'
  1469. + In GNU or POSIX format, option names and values can be combined:
  1470. +    +foo=blech        -> $opt_foo = 'blech'
  1471. +    --bar=        -> $opt_bar = ''
  1472. +    --bar=--        -> $opt_bar = '--'
  1473. + =over 12
  1474. + =item $autoabbrev      
  1475. + Allow option names to be abbreviated to uniqueness.
  1476. + Default is 1 unless environment variable
  1477. + POSIXLY_CORRECT has been set.
  1478. + =item $getopt_compat   
  1479. + Allow '+' to start options.
  1480. + Default is 1 unless environment variable
  1481. + POSIXLY_CORRECT has been set.
  1482. + =item $option_start    
  1483. + Regexp with option starters.
  1484. + Default is (--|-) if environment variable
  1485. + POSIXLY_CORRECT has been set, (--|-|\+) otherwise.
  1486. + =item $order           
  1487. + Whether non-options are allowed to be mixed with
  1488. + options.
  1489. + Default is $REQUIRE_ORDER if environment variable
  1490. + POSIXLY_CORRECT has been set, $PERMUTE otherwise.
  1491. + =item $ignorecase      
  1492. + Ignore case when matching options. Default is 1.
  1493. + =item $debug           
  1494. + Enable debugging output. Default is 0.
  1495. + =back
  1496. + =head1 NOTE
  1497. + Does not yet use the Exporter--or even packages!!
  1498. + Thus, it's not a real module.
  1499. + =cut
  1500.   
  1501.   # newgetopt.pl -- new options parsing
  1502.   
  1503. ***************
  1504. *** 316,322 ****
  1505.   
  1506.       # Double dash is option list terminator.
  1507.       if ( $opt eq $argend ) {
  1508. !         unshift (@ret, @ARGV) if $order == $PERMUTE;
  1509.           return ($error == 0);
  1510.       }
  1511.       elsif ( $opt =~ /^$genprefix/ ) {
  1512. --- 454,460 ----
  1513.   
  1514.       # Double dash is option list terminator.
  1515.       if ( $opt eq $argend ) {
  1516. !         unshift (@ARGV, @ret) if $order == $PERMUTE;
  1517.           return ($error == 0);
  1518.       }
  1519.       elsif ( $opt =~ /^$genprefix/ ) {
  1520. Index: lib/Getopt/Std.pm
  1521. *** perl5.001f/lib/Getopt/Std.pm    Tue Oct 18 12:37:55 1994
  1522. --- perl5.001g/lib/Getopt/Std.pm    Thu May 25 11:55:27 1995
  1523. ***************
  1524. *** 2,7 ****
  1525. --- 2,31 ----
  1526.   require 5.000;
  1527.   require Exporter;
  1528.   
  1529. + =head1 NAME
  1530. + getopt - Process single-character switches with switch clustering
  1531. + getopts - Process single-character switches with switch clustering
  1532. + =head1 SYNOPSIS
  1533. +     use Getopt::Std;
  1534. +     getopt('oDI');  # -o, -D & -I take arg.  Sets opt_* as a side effect.
  1535. +     getopts('oif:');  # -o & -i are boolean flags, -f takes an argument
  1536. +               # Sets opt_* as a side effect.
  1537. + =head1 DESCRIPTION
  1538. + The getopt() functions processes single-character switches with switch
  1539. + clustering.  Pass one argument which is a string containing all switches
  1540. + that take an argument.  For each switch found, sets $opt_x (where x is the
  1541. + switch name) to the value of the argument, or 1 if no argument.  Switches
  1542. + which take an argument don't care whether there is a space between the
  1543. + switch and the argument.
  1544. + =cut
  1545.   @ISA = qw(Exporter);
  1546.   @EXPORT = qw(getopt getopts);
  1547.   
  1548. ***************
  1549. *** 64,70 ****
  1550.       ($first,$rest) = ($1,$2);
  1551.       $pos = index($argumentative,$first);
  1552.       if($pos >= 0) {
  1553. !         if($args[$pos+1] eq ':') {
  1554.           shift(@ARGV);
  1555.           if($rest eq '') {
  1556.               ++$errs unless @ARGV;
  1557. --- 88,94 ----
  1558.       ($first,$rest) = ($1,$2);
  1559.       $pos = index($argumentative,$first);
  1560.       if($pos >= 0) {
  1561. !         if(defined($args[$pos+1]) and ($args[$pos+1] eq ':')) {
  1562.           shift(@ARGV);
  1563.           if($rest eq '') {
  1564.               ++$errs unless @ARGV;
  1565. Index: lib/I18N/Collate.pm
  1566. *** perl5.001f/lib/I18N/Collate.pm    Tue Oct 18 12:37:58 1994
  1567. --- perl5.001g/lib/I18N/Collate.pm    Thu May 25 11:30:29 1995
  1568. ***************
  1569. *** 1,5 ****
  1570. --- 1,39 ----
  1571.   package I18N::Collate;
  1572.   
  1573. + =head1 NAME
  1574. + Collate - compare 8-bit scalar data according to the current locale
  1575. + =head1 SYNOPSIS
  1576. +     use Collate;
  1577. +     setlocale(LC_COLLATE, 'locale-of-your-choice'); 
  1578. +     $s1 = new Collate "scalar_data_1";
  1579. +     $s2 = new Collate "scalar_data_2";
  1580. + =head1 DESCRIPTION
  1581. + This module provides you with objects that will collate 
  1582. + according to your national character set, providing the 
  1583. + POSIX setlocale() function should be supported on your system.
  1584. + You can compare $s1 and $s2 above with
  1585. +     $s1 le $s2
  1586. + to extract the data itself, you'll need a dereference: $$s1
  1587. + This uses POSIX::setlocale The basic collation conversion is done by
  1588. + strxfrm() which terminates at NUL characters being a decent C routine.
  1589. + collate_xfrm() handles embedded NUL characters gracefully.  Due to C<cmp>
  1590. + and overload magic, C<lt>, C<le>, C<eq>, C<ge>, and C<gt> work also.  The
  1591. + available locales depend on your operating system; try whether C<locale
  1592. + -a> shows them or the more direct approach C<ls /usr/lib/nls/loc> or C<ls
  1593. + /usr/lib/nls>.  The locale names are probably something like
  1594. + "xx_XX.(ISO)?8859-N".
  1595. + =cut
  1596.   # Collate.pm
  1597.   #
  1598.   # Author:    Jarkko Hietaniemi <Jarkko.Hietaniemi@hut.fi>
  1599. Index: lib/IPC/Open2.pm
  1600. *** perl5.001f/lib/IPC/Open2.pm    Tue Oct 18 12:38:01 1994
  1601. --- perl5.001g/lib/IPC/Open2.pm    Thu May 25 11:31:07 1995
  1602. ***************
  1603. *** 3,8 ****
  1604. --- 3,53 ----
  1605.   require Exporter;
  1606.   use Carp;
  1607.   
  1608. + =head1 NAME
  1609. + IPC::Open2, open2 - open a process for both reading and writing
  1610. + =head1 SYNOPSIS
  1611. +     use IPC::Open2;
  1612. +     $pid = open2('rdr', 'wtr', 'some cmd and args');
  1613. +       # or
  1614. +     $pid = open2('rdr', 'wtr', 'some', 'cmd', 'and', 'args');
  1615. + =head1 DESCRIPTION
  1616. + The open2() function spawns the given $cmd and connects $rdr for
  1617. + reading and $wtr for writing.  It's what you think should work 
  1618. + when you try
  1619. +     open(HANDLE, "|cmd args");
  1620. + open2() returns the process ID of the child process.  It doesn't return on
  1621. + failure: it just raises an exception matching C</^open2:/>.
  1622. + =head1 WARNING 
  1623. + It will not create these file handles for you.  You have to do this yourself.
  1624. + So don't pass it empty variables expecting them to get filled in for you.
  1625. + Additionally, this is very dangerous as you may block forever.
  1626. + It assumes it's going to talk to something like B<bc>, both writing to
  1627. + it and reading from it.  This is presumably safe because you "know"
  1628. + that commands like B<bc> will read a line at a time and output a line at
  1629. + a time.  Programs like B<sort> that read their entire input stream first,
  1630. + however, are quite apt to cause deadlock.  
  1631. + The big problem with this approach is that if you don't have control 
  1632. + over source code being run in the the child process, you can't control what it does 
  1633. + with pipe buffering.  Thus you can't just open a pipe to "cat -v" and continually
  1634. + read and write a line from it.
  1635. + =head1 SEE ALSO
  1636. + See L<open3> for an alternative that handles STDERR as well.
  1637. + =cut
  1638.   @ISA = qw(Exporter);
  1639.   @EXPORT = qw(open2);
  1640.   
  1641. Index: lib/IPC/Open3.pm
  1642. Prereq:  1.1 
  1643. *** perl5.001f/lib/IPC/Open3.pm    Tue Oct 18 12:38:04 1994
  1644. --- perl5.001g/lib/IPC/Open3.pm    Thu May 25 11:31:25 1995
  1645. ***************
  1646. *** 3,8 ****
  1647. --- 3,33 ----
  1648.   require Exporter;
  1649.   use Carp;
  1650.   
  1651. + =head1 NAME
  1652. + IPC::Open3, open3 - open a process for reading, writing, and error handling
  1653. + =head1 SYNOPSIS
  1654. +     $pid = open3('WTRFH', 'RDRFH', 'ERRFH' 
  1655. +             'some cmd and args', 'optarg', ...);
  1656. + =head1 DESCRIPTION
  1657. + Extremely similar to open2(), open3() spawns the given $cmd and
  1658. + connects RDRFH for reading, WTRFH for writing, and ERRFH for errors.  If
  1659. + ERRFH is '', or the same as RDRFH, then STDOUT and STDERR of the child are
  1660. + on the same file handle.
  1661. + If WTRFH begins with ">&", then WTRFH will be closed in the parent, and
  1662. + the child will read from it directly.  if RDRFH or ERRFH begins with
  1663. + ">&", then the child will send output directly to that file handle.  In both
  1664. + cases, there will be a dup(2) instead of a pipe(2) made.
  1665. + All caveats from open2() continue to apply.  See L<open2> for details.
  1666. + =cut
  1667.   @ISA = qw(Exporter);
  1668.   @EXPORT = qw(open3);
  1669.   
  1670. Index: lib/Net/Ping.pm
  1671. *** perl5.001f/lib/Net/Ping.pm    Tue Oct 18 12:38:18 1994
  1672. --- perl5.001g/lib/Net/Ping.pm    Thu May 25 11:33:14 1995
  1673. ***************
  1674. *** 1,5 ****
  1675. --- 1,44 ----
  1676.   package Net::Ping;
  1677.   
  1678. + =head1 NAME
  1679. + Net::Ping, pingecho - check a host for upness
  1680. + =head1 SYNOPSIS
  1681. +     use Net::Ping;
  1682. +     print "'jimmy' is alive and kicking\n" if pingecho('jimmy', 10) ;
  1683. + =head1 DESCRIPTION
  1684. + This module contains routines to test for the reachability of remote hosts.
  1685. + Currently the only routine implemented is pingecho(). 
  1686. + pingecho() uses a TCP echo (I<not> an ICMP one) to determine if the
  1687. + remote host is reachable. This is usually adequate to tell that a remote
  1688. + host is available to rsh(1), ftp(1), or telnet(1) onto.
  1689. + =head2 Parameters
  1690. + =over 5
  1691. + =item hostname
  1692. + The remote host to check, specified either as a hostname or as an IP address.
  1693. + =item timeout
  1694. + The timeout in seconds. If not specified it will default to 5 seconds.
  1695. + =back
  1696. + =head1 WARNING
  1697. + pingecho() uses alarm to implement the timeout, so don't set another alarm
  1698. + while you are using it.
  1699. + =cut
  1700.   # Authors: karrer@bernina.ethz.ch (Andreas Karrer)
  1701.   #          pmarquess@bfsec.bt.co.uk (Paul Marquess)
  1702.   
  1703. Index: lib/Term/Complete.pm
  1704. *** perl5.001f/lib/Term/Complete.pm    Tue Oct 18 12:38:32 1994
  1705. --- perl5.001g/lib/Term/Complete.pm    Wed May 24 12:09:48 1995
  1706. ***************
  1707. *** 37,43 ****
  1708.       $erase2 =   "\010";
  1709.   }
  1710.   
  1711. ! sub complete {
  1712.       $prompt = shift;
  1713.       if (ref $_[0] || $_[0] =~ /^\*/) {
  1714.       @cmp_lst = sort @{$_[0]};
  1715. --- 37,43 ----
  1716.       $erase2 =   "\010";
  1717.   }
  1718.   
  1719. ! sub Complete {
  1720.       $prompt = shift;
  1721.       if (ref $_[0] || $_[0] =~ /^\*/) {
  1722.       @cmp_lst = sort @{$_[0]};
  1723. Index: lib/Text/Abbrev.pm
  1724. *** perl5.001f/lib/Text/Abbrev.pm    Tue Oct 18 12:38:38 1994
  1725. --- perl5.001g/lib/Text/Abbrev.pm    Thu May 25 11:34:02 1995
  1726. ***************
  1727. *** 2,7 ****
  1728. --- 2,29 ----
  1729.   require 5.000;
  1730.   require Exporter;
  1731.   
  1732. + =head1 NAME
  1733. + abbrev - create an abbreviation table from a list
  1734. + =head1 SYNOPSIS
  1735. +     use Abbrev;
  1736. +     abbrev *HASH, LIST
  1737. + =head1 DESCRIPTION
  1738. + Stores all unambiguous truncations of each element of LIST
  1739. + as keys key in the associative array indicated by C<*hash>.
  1740. + The values are the original list elements.
  1741. + =head1 EXAMPLE
  1742. +     abbrev(*hash,qw("list edit send abort gripe"));
  1743. + =cut
  1744.   @ISA = qw(Exporter);
  1745.   @EXPORT = qw(abbrev);
  1746.   
  1747. Index: lib/Text/Tabs.pm
  1748. *** perl5.001f/lib/Text/Tabs.pm    Wed Feb  8 19:11:42 1995
  1749. --- perl5.001g/lib/Text/Tabs.pm    Wed May 24 14:29:04 1995
  1750. ***************
  1751. *** 2,11 ****
  1752.   # expand and unexpand tabs as per the unix expand and 
  1753.   # unexpand programs.
  1754.   #
  1755. ! # expand and unexpand operate on arrays of lines.  Do not
  1756. ! # feed strings that contain newlines to them.
  1757.   #
  1758.   # David Muir Sharnoff <muir@idiom.com>
  1759.   # 
  1760.   
  1761.   package Text::Tabs;
  1762. --- 2,11 ----
  1763.   # expand and unexpand tabs as per the unix expand and 
  1764.   # unexpand programs.
  1765.   #
  1766. ! # expand and unexpand operate on arrays of lines.  
  1767.   #
  1768.   # David Muir Sharnoff <muir@idiom.com>
  1769. + # Version: 4/19/95
  1770.   # 
  1771.   
  1772.   package Text::Tabs;
  1773. ***************
  1774. *** 19,47 ****
  1775.   
  1776.   sub expand
  1777.   {
  1778. !     my @l = @_;
  1779. !     for $_ (@l) {
  1780. !         1 while s/^([^\t]*)(\t+)/
  1781. !             $1 . (" " x 
  1782. !                 ($tabstop * length($2)
  1783. !                 - (length($1) % $tabstop)))
  1784. !             /e;
  1785.       }
  1786. !     return @l;
  1787.   }
  1788.   
  1789.   sub unexpand
  1790.   {
  1791. !     my @l = &expand(@_);
  1792.       my @e;
  1793. !     for $x (@l) {
  1794. !         @e = split(/(.{$tabstop})/,$x);
  1795. !         for $_ (@e) {
  1796. !             s/  +$/\t/;
  1797.           }
  1798. !         $x = join('',@e);
  1799.       }
  1800. !     return @l;
  1801.   }
  1802.   
  1803.   1;
  1804. --- 19,63 ----
  1805.   
  1806.   sub expand
  1807.   {
  1808. !     my (@l) = @_;
  1809. !     my $l, @k;
  1810. !     my $nl;
  1811. !     for $l (@l) {
  1812. !         $nl = $/ if chomp($l);
  1813. !         @k = split($/,$l);
  1814. !         for $_ (@k) {
  1815. !             1 while s/^([^\t]*)(\t+)/
  1816. !                 $1 . (" " x 
  1817. !                     ($tabstop * length($2)
  1818. !                     - (length($1) % $tabstop)))
  1819. !                 /e;
  1820. !         }
  1821. !         $l = join("\n",@k).$nl;
  1822.       }
  1823. !     return @l if $#l > 0;
  1824. !     return $l[0];
  1825.   }
  1826.   
  1827.   sub unexpand
  1828.   {
  1829. !     my (@l) = &expand(@_);
  1830.       my @e;
  1831. !     my $k, @k;
  1832. !     my $nl;
  1833. !     for $k (@l) {
  1834. !         $nl = $/ if chomp($k);
  1835. !         @k = split($/,$k);
  1836. !         for $x (@k) {
  1837. !             @e = split(/(.{$tabstop})/,$x);
  1838. !             for $_ (@e) {
  1839. !                 s/  +$/\t/;
  1840. !             }
  1841. !             $x = join('',@e);
  1842.           }
  1843. !         $k = join("\n",@k).$nl;
  1844.       }
  1845. !     return @l if $#l > 0;
  1846. !     return $l[0];
  1847.   }
  1848.   
  1849.   1;
  1850. Index: lib/integer.pm
  1851. *** perl5.001f/lib/integer.pm    Tue Oct 18 12:36:34 1994
  1852. --- perl5.001g/lib/integer.pm    Thu May 25 11:19:41 1995
  1853. ***************
  1854. *** 1,5 ****
  1855. --- 1,26 ----
  1856.   package integer;
  1857.   
  1858. + =head1 NAME
  1859. + integer - Perl pragma to compute arithmetic in integer instead of double
  1860. + =head1 SYNOPSIS
  1861. +     use integer;
  1862. +     $x = 10/3;
  1863. +     # $x is now 3, not 3.33333333333333333
  1864. + =head1 DESCRIPTION
  1865. + This tells the compiler that it's okay to use integer operations
  1866. + from here to the end of the enclosing BLOCK.  On many machines, 
  1867. + this doesn't matter a great deal for most computations, but on those 
  1868. + without floating point hardware, it can make a big difference.
  1869. + See L<perlmod/Pragmatic Modules>.
  1870. + =cut
  1871.   sub import {
  1872.       $^H |= 1;
  1873.   }
  1874. Index: lib/less.pm
  1875. *** perl5.001f/lib/less.pm    Tue Oct 18 12:36:36 1994
  1876. --- perl5.001g/lib/less.pm    Thu May 25 11:19:59 1995
  1877. ***************
  1878. *** 1,2 ****
  1879. --- 1,19 ----
  1880.   package less;
  1881. + =head1 NAME
  1882. + less - Perl pragma to request less of something from the compiler
  1883. + =head1 DESCRIPTION
  1884. + Currently unimplemented, this may someday be a compiler directive
  1885. + to make certain trade-offs, such as perhaps
  1886. +     use less 'memory';
  1887. +     use less 'CPU';
  1888. +     use less 'fat';
  1889. + =cut
  1890.   1;
  1891. Index: lib/sigtrap.pm
  1892. *** perl5.001f/lib/sigtrap.pm    Tue Oct 18 12:36:58 1994
  1893. --- perl5.001g/lib/sigtrap.pm    Thu May 25 11:20:13 1995
  1894. ***************
  1895. *** 1,5 ****
  1896. --- 1,27 ----
  1897.   package sigtrap;
  1898.   
  1899. + =head1 NAME
  1900. + sigtrap - Perl pragma to enable stack backtrace on unexpected signals
  1901. + =head1 SYNOPSIS
  1902. +     use sigtrap;
  1903. +     use sigtrap qw(BUS SEGV PIPE SYS ABRT TRAP);
  1904. + =head1 DESCRIPTION
  1905. + The C<sigtrap> pragma initializes some default signal handlers that print
  1906. + a stack dump of your Perl program, then sends itself a SIGABRT.  This
  1907. + provides a nice starting point if something horrible goes wrong.
  1908. + By default, handlers are installed for the ABRT, BUS, EMT, FPE, ILL, PIPE,
  1909. + QUIT, SEGV, SYS, TERM, and TRAP signals.
  1910. + See L<perlmod/Pragmatic Modules>.
  1911. + =cut
  1912.   require Carp;
  1913.   
  1914.   sub import {
  1915. Index: lib/strict.pm
  1916. *** perl5.001f/lib/strict.pm    Tue Oct 18 12:37:06 1994
  1917. --- perl5.001g/lib/strict.pm    Thu May 25 11:20:27 1995
  1918. ***************
  1919. *** 1,5 ****
  1920. --- 1,73 ----
  1921.   package strict;
  1922.   
  1923. + =head1 NAME
  1924. + strict - Perl pragma to restrict unsafe constructs
  1925. + =head1 SYNOPSIS
  1926. +     use strict;
  1927. +     use strict "vars";
  1928. +     use strict "refs";
  1929. +     use strict "subs";
  1930. +     use strict;
  1931. +     no strict "vars";
  1932. + =head1 DESCRIPTION
  1933. + If no import list is supplied, all possible restrictions are assumed.
  1934. + (This is the safest mode to operate in, but is sometimes too strict for
  1935. + casual programming.)  Currently, there are three possible things to be
  1936. + strict about:  "subs", "vars", and "refs".
  1937. + =over 6
  1938. + =item C<strict refs>
  1939. + This generates a runtime error if you 
  1940. + use symbolic references (see L<perlref>).
  1941. +     use strict 'refs';
  1942. +     $ref = \$foo;
  1943. +     print $$ref;    # ok
  1944. +     $ref = "foo";
  1945. +     print $$ref;    # runtime error; normally ok
  1946. + =item C<strict vars>
  1947. + This generates a compile-time error if you access a variable that wasn't
  1948. + localized via C<my()> or wasn't fully qualified.  Because this is to avoid
  1949. + variable suicide problems and subtle dynamic scoping issues, a merely
  1950. + local() variable isn't good enough.  See L<perlfunc/my> and
  1951. + L<perlfunc/local>.
  1952. +     use strict 'vars';
  1953. +     $X::foo = 1;     # ok, fully qualified
  1954. +     my $foo = 10;     # ok, my() var
  1955. +     local $foo = 9;     # blows up
  1956. + The local() generated a compile-time error because you just touched a global
  1957. + name without fully qualifying it.
  1958. + =item C<strict subs>
  1959. + This disables the poetry optimization,
  1960. + generating a compile-time error if you 
  1961. + try to use a bareword identifier that's not a subroutine.
  1962. +     use strict 'subs';
  1963. +     $SIG{PIPE} = Plumber;       # blows up
  1964. +     $SIG{"PIPE"} = "Plumber";     # just fine
  1965. + =back
  1966. + See L<perlmod/Pragmatic Modules>.
  1967. + =cut
  1968.   sub bits {
  1969.       my $bits = 0;
  1970.       foreach $sememe (@_) {
  1971. Index: lib/subs.pm
  1972. *** perl5.001f/lib/subs.pm    Tue Oct 18 12:37:09 1994
  1973. --- perl5.001g/lib/subs.pm    Thu May 25 11:20:45 1995
  1974. ***************
  1975. *** 1,5 ****
  1976. --- 1,23 ----
  1977.   package subs;
  1978.   
  1979. + =head1 NAME
  1980. + subs - Perl pragma to predeclare sub names
  1981. + =head1 SYNOPSIS
  1982. +     use subs qw(frob);
  1983. +     frob 3..10;
  1984. + =head1 DESCRIPTION
  1985. + This will predeclare all the subroutine whose names are 
  1986. + in the list, allowing you to use them without parentheses
  1987. + even before they're declared.
  1988. + See L<perlmod/Pragmatic Modules> and L<strict/subs>.
  1989. + =cut
  1990.   require 5.000;
  1991.   
  1992.   $ExportLevel = 0;
  1993.  
  1994.  
  1995. End of patch.
  1996.