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

  1. # This is my patch  patch.1j for perl5.001.  See description below.
  2. #    Andy Dougherty        doughera@lafcol.lafayette.edu
  3. #
  4. exit 0   # In case someone runs sh on this patch.
  5.  
  6. This is my patch  patch.1j  for perl5.001.
  7.  
  8. To apply, change to your perl directory and apply with
  9.     patch -p1 -N  < thispatch.
  10.  
  11. After you apply this patch, I would recommend:
  12.     rm config.sh
  13.     sh Configure [whatever options you use]
  14.     make depend
  15.     make 
  16.     make test
  17.  
  18. Here are the highlights:
  19.     Linux fixes:  Now correctly sets & uses stdio _ptr and _cnt
  20.     tricks only when feasible (Configure, config_h.SH, config_H,
  21.     doio.c, sv.c x2p/str.c)
  22.  
  23.     #!path-to-perl fixed to use $binexp instead of $bin.  This should
  24.     really be fixed to do the correct perl start-up stuff.  Volunteers?
  25.     (c2ph.SH, h2ph.SH, h2xs.SH, makeaperl.SH, perldoc.SH,
  26.     pod/pod2*.SH, x2p/find2perl.SH, x2p/s2p.SH)
  27.  
  28.     hint updates:  hints/apollo.sh, hints/linux.sh, hints/freebsd.sh,
  29.     hints/sco_3.sh.
  30.  
  31.     xsubpp version 1.7.  (includes CASE support)
  32.  
  33.     pod/perlbot updates.
  34.  
  35.     my lib/AutoLoader patch (to use @INC).
  36.  
  37.     [ON]DBM_File/Makefile.PL now have a few hint files.
  38.  
  39.     Other sundry small things.
  40.  
  41. Patch and enjoy,
  42.  
  43.     Andy Dougherty        doughera@lafcol.lafayette.edu
  44.     Dept. of Physics
  45.     Lafayette College    Easton, PA  18042
  46.  
  47. Here's the file-by-file breakdown of what's included:
  48.  
  49. Configure
  50.     Checks if File_ptr(fp) and File_cnt(fp) can be assigned to.
  51.  
  52.     Fix typo:  s/sytem/system/
  53.  
  54. MANIFEST
  55.     Include new extension hint files.
  56.  
  57. README
  58.     Some clarifications, thanks to John Stoeffel.  Tell users how to
  59.     not use dynamic loading.
  60.  
  61. c2ph.SH
  62.     Use $binexp instead of $bin.
  63.  
  64. config_H
  65.     Updated to match config_h.SH.
  66.  
  67. config_h.SH
  68.     Include defines for whether File_ptr(fp) and File_cnt(fp)
  69.     can be assigned to.
  70.  
  71. doio.c
  72.     Use defines for whether File_ptr(fp) and File_cnt(fp) can be assigned to.
  73.  
  74. ext/DynaLoader/DynaLoader.pm
  75.     Improve error messages and a little documentation.
  76.  
  77. ext/NDBM_File/hints/solaris.pl
  78.     New hint file.
  79.  
  80. ext/ODBM_File/Makefile.PL
  81.     Removed -ldbm.nfs, since it's now in the sco hint file.
  82.  
  83. ext/ODBM_File/hints/sco.pl
  84. ext/ODBM_File/hints/solaris.pl
  85. ext/ODBM_File/hints/svr4.pl
  86.     New hint files.
  87.  
  88. h2ph.SH
  89. h2xs.SH
  90.     Use $binexp instead of $bin.
  91.  
  92. hints/apollo.sh
  93. hints/freebsd.sh
  94. hints/linux.sh
  95. hints/sco_3.sh
  96.     Updated.
  97.  
  98. lib/AutoLoader.pm
  99.     Eliminate else clause in sub import.
  100.  
  101.     Handle case where @INC contains relative paths.
  102.  
  103. lib/ExtUtils/xsubpp
  104.     Update to version 1.7.  This includes CASE support.
  105.  
  106. lib/I18N/Collate.pm
  107.     Updated documentation.
  108.  
  109. lib/ftp.pl
  110.     Look for socket.ph or sys/socket.ph
  111.  
  112. lib/getcwd.pl
  113.     Use defined().
  114.    
  115. makeaperl.SH
  116.     Use $binexp instead of $bin.
  117.  
  118. perl.c
  119.     fputs("\tUnofficial patchlevel 1j.\n",stdout);
  120.       
  121. perldoc.SH
  122.     Use $binexp instead of $bin.
  123.  
  124.     Turn off debugging messages.
  125.  
  126. pod/perlbot.pod
  127.     Updated.
  128.  
  129. pod/pod2html.SH
  130. pod/pod2latex.SH
  131. pod/pod2man.SH
  132.     Use $binexp instead of $bin.
  133.  
  134. sv.c
  135.     Use defines for whether File_ptr(fp) and File_cnt(fp) can be assigned to.
  136.  
  137. toke.c
  138.     Fix spelling of ambiguous.
  139.  
  140. x2p/find2perl.SH
  141. x2p/s2p.SH
  142.     Use $binexp instead of $bin.
  143.  
  144. x2p/str.c
  145.     Use defines for whether File_ptr(fp) and File_cnt(fp) can be assigned to.
  146.  
  147. Index: Configure
  148. Prereq:  3.0.1.7 
  149. *** perl5.001i/Configure    Wed May 31 09:19:09 1995
  150. --- perl5.001j/Configure    Mon Jun  5 12:23:03 1995
  151. ***************
  152. *** 20,26 ****
  153.   
  154.   # $Id: Head.U,v 3.0.1.7 1995/03/21 08:46:15 ram Exp $
  155.   #
  156. ! # Generated on Wed May 31 09:14:05 EDT 1995 [metaconfig 3.0 PL55]
  157.   
  158.   cat >/tmp/c1$$ <<EOF
  159.   ARGGGHHHH!!!!!
  160. --- 20,26 ----
  161.   
  162.   # $Id: Head.U,v 3.0.1.7 1995/03/21 08:46:15 ram Exp $
  163.   #
  164. ! # Generated on Mon Jun  5 12:18:53 EDT 1995 [metaconfig 3.0 PL55]
  165.   
  166.   cat >/tmp/c1$$ <<EOF
  167.   ARGGGHHHH!!!!!
  168. ***************
  169. *** 349,354 ****
  170. --- 349,356 ----
  171.   sockethdr=''
  172.   socketlib=''
  173.   d_statblks=''
  174. + d_stdio_cnt_lval=''
  175. + d_stdio_ptr_lval=''
  176.   d_stdiobase=''
  177.   d_stdstdio=''
  178.   stdio_base=''
  179. ***************
  180. *** 5610,5632 ****
  181.   if $contains '_IO_fpos_t' `./findhdr stdio.h` >/dev/null 2>&1 ; then
  182.       echo "(Looks like you have stdio.h from Linux.)"
  183.       case "$stdio_ptr" in
  184. !     '') stdio_ptr='((fp)->_IO_read_ptr)';;
  185.       esac
  186.       case "$stdio_cnt" in
  187. !     '') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)';;
  188.       esac
  189.       case "$stdio_base" in
  190.       '') stdio_base='((fp)->_IO_read_base)';;
  191.       esac
  192.       case "$stdio_bufsiz" in
  193. !     '') stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base))';;
  194.       esac
  195.   else
  196.       case "$stdio_ptr" in
  197. !     '') stdio_ptr='((fp)->_ptr)';;
  198.       esac
  199.       case "$stdio_cnt" in
  200. !     '') stdio_cnt='((fp)->_cnt)';;
  201.       esac
  202.       case "$stdio_base" in
  203.       '') stdio_base='((fp)->_base)';;
  204. --- 5612,5642 ----
  205.   if $contains '_IO_fpos_t' `./findhdr stdio.h` >/dev/null 2>&1 ; then
  206.       echo "(Looks like you have stdio.h from Linux.)"
  207.       case "$stdio_ptr" in
  208. !     '') stdio_ptr='((fp)->_IO_read_ptr)'
  209. !         ptr_lval=$define
  210. !         ;;
  211.       esac
  212.       case "$stdio_cnt" in
  213. !     '') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
  214. !         cnt_lval=$undef
  215. !         ;;
  216.       esac
  217.       case "$stdio_base" in
  218.       '') stdio_base='((fp)->_IO_read_base)';;
  219.       esac
  220.       case "$stdio_bufsiz" in
  221. !     '') stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)';;
  222.       esac
  223.   else
  224.       case "$stdio_ptr" in
  225. !     '') stdio_ptr='((fp)->_ptr)'
  226. !         ptr_lval=$define
  227. !         ;;
  228.       esac
  229.       case "$stdio_cnt" in
  230. !     '') stdio_cnt='((fp)->_cnt)'
  231. !         cnt_lval=$define
  232. !         ;;
  233.       esac
  234.       case "$stdio_base" in
  235.       '') stdio_base='((fp)->_base)';;
  236. ***************
  237. *** 5667,5672 ****
  238. --- 5677,5702 ----
  239.   set d_stdstdio
  240.   eval $setvar
  241.   
  242. + : Can _ptr be used as an lvalue.  Only makes sense if we
  243. + : have a known stdio implementation.
  244. + case "$d_stdstdio" in
  245. + $define) val=$ptr_lval ;;
  246. + *) val=$undef ;;
  247. + esac
  248. + set d_stdio_ptr_lval
  249. + eval $setvar
  250. + : Can _cnt be used as an lvalue.  Only makes sense if we
  251. + : have a known stdio implementation.
  252. + case "$d_stdstdio" in
  253. + $define) val=$cnt_lval ;;
  254. + *) val=$undef ;;
  255. + esac
  256. + set d_stdio_cnt_lval
  257. + eval $setvar
  258.   : see if _base is also standard
  259.   val="$undef"
  260.   case "$d_stdstdio" in
  261. ***************
  262. *** 5834,5840 ****
  263.       eval $typedef
  264.       dflt="$clocktype"
  265.       echo " "
  266. !     rp="What type is returned by times() on this sytem?"
  267.       . ./myread
  268.       clocktype="$ans"
  269.   else
  270. --- 5864,5870 ----
  271.       eval $typedef
  272.       dflt="$clocktype"
  273.       echo " "
  274. !     rp="What type is returned by times() on this system?"
  275.       . ./myread
  276.       clocktype="$ans"
  277.   else
  278. ***************
  279. *** 7472,7478 ****
  280.       eval $typedef
  281.       dflt="$timetype"
  282.       echo " "
  283. !     rp="What type is returned by time() on this sytem?"
  284.       . ./myread
  285.       timetype="$ans"
  286.   else
  287. --- 7502,7508 ----
  288.       eval $typedef
  289.       dflt="$timetype"
  290.       echo " "
  291. !     rp="What type is returned by time() on this system?"
  292.       . ./myread
  293.       timetype="$ans"
  294.   else
  295. ***************
  296. *** 8174,8179 ****
  297. --- 8204,8211 ----
  298.   d_socket='$d_socket'
  299.   d_sockpair='$d_sockpair'
  300.   d_statblks='$d_statblks'
  301. + d_stdio_cnt_lval='$d_stdio_cnt_lval'
  302. + d_stdio_ptr_lval='$d_stdio_ptr_lval'
  303.   d_stdiobase='$d_stdiobase'
  304.   d_stdstdio='$d_stdstdio'
  305.   d_strchr='$d_strchr'
  306. Index: MANIFEST
  307. *** perl5.001i/MANIFEST    Tue May 30 13:45:16 1995
  308. --- perl5.001j/MANIFEST    Mon Jun  5 14:14:23 1995
  309. ***************
  310. *** 107,116 ****
  311. --- 107,120 ----
  312.   ext/NDBM_File/Makefile.PL    NDBM extension makefile writer
  313.   ext/NDBM_File/NDBM_File.pm    NDBM extension Perl module
  314.   ext/NDBM_File/NDBM_File.xs    NDBM extension external subroutines
  315. + ext/NDBM_File/hints/solaris.pl    Hint for NDBM_File for named architecture
  316.   ext/NDBM_File/typemap        NDBM extension interface types
  317.   ext/ODBM_File/Makefile.PL    ODBM extension makefile writer
  318.   ext/ODBM_File/ODBM_File.pm    ODBM extension Perl module
  319.   ext/ODBM_File/ODBM_File.xs    ODBM extension external subroutines
  320. + ext/ODBM_File/hints/sco.pl    Hint for ODBM_File for named architecture
  321. + ext/ODBM_File/hints/solaris.pl    Hint for ODBM_File for named architecture
  322. + ext/ODBM_File/hints/svr4.pl    Hint for ODBM_File for named architecture
  323.   ext/ODBM_File/typemap        ODBM extension interface types
  324.   ext/POSIX/Makefile.PL        POSIX extension makefile writer
  325.   ext/POSIX/POSIX.pm        POSIX extension Perl module
  326. Index: README
  327. *** perl5.001i/README    Tue May 30 16:00:51 1995
  328. --- perl5.001j/README    Fri Jun  2 11:38:22 1995
  329. ***************
  330. *** 68,92 ****
  331.       run ok, the defaults will usually be right.  It will then proceed to
  332.       make config.h, config.sh, and Makefile.  You may have to explicitly
  333.       say     sh Configure    to ensure that Configure is run under sh.
  334. !     If you're a hotshot, run Configure -d to take all the defaults,
  335. !     edit config.sh to patch up any flaws, and then run Configure -S.
  336.   
  337.       Configure supports a number of useful options.  Run Configure -h 
  338.       to get a listing.  To compile with gcc, for example, you can run 
  339.       Configure -Dcc=gcc, or answer 'gcc' at the cc prompt.  
  340.       
  341. !     If you wish to use gcc (or another alternative compiler))
  342.       you should use  Configure -Dcc=gcc.  That way, the the hints
  343.       files can set appropriate defaults.
  344.       
  345.       If you change compilers or make other significant changes, you should
  346.       probably _not_ re-use your old config.sh.  Simply remove it or
  347. !     rename it, e.g. mv config.sh config.sh.old.
  348. !     
  349. !     By default, perl will be installed in /usr/local/{bin, lib, man}.
  350. !     You can specify a different prefix for the default installation
  351. !     directory, when Configure prompts you or by using something like
  352. !     Configure -Dprefix=/whatever.
  353.   
  354.       You can also supply a file config.over to over-ride Configure's
  355.       guesses.  It will get loaded up at the very end, just before
  356. --- 68,101 ----
  357.       run ok, the defaults will usually be right.  It will then proceed to
  358.       make config.h, config.sh, and Makefile.  You may have to explicitly
  359.       say     sh Configure    to ensure that Configure is run under sh.
  360. !     If you're a hotshot, run Configure -d to take all the defaults
  361. !     and edit config.sh to patch up any flaws.
  362. !     If you later make any changes to config.sh, you should propagate
  363. !     them to all the .SH files by running  Configure -S.
  364.   
  365.       Configure supports a number of useful options.  Run Configure -h 
  366.       to get a listing.  To compile with gcc, for example, you can run 
  367.       Configure -Dcc=gcc, or answer 'gcc' at the cc prompt.  
  368.       
  369. !     If you wish to use gcc (or another alternative compiler)
  370.       you should use  Configure -Dcc=gcc.  That way, the the hints
  371.       files can set appropriate defaults.
  372. +     By default, perl will be installed in /usr/local/{bin, lib, man}.
  373. +     You can specify a different 'prefix' for the default installation
  374. +     directory, when Configure prompts you or by using the Configure
  375. +     command line option -Dprefix='/some/directory'.
  376.       
  377. +     By default, perl will use dynamic extensions if your system
  378. +     supports it.  If you want to force perl to be compiled statically,
  379. +     you can either choose this when Configure prompts you or by using
  380. +     the Configure command line option -Uusedl
  381.       If you change compilers or make other significant changes, you should
  382.       probably _not_ re-use your old config.sh.  Simply remove it or
  383. !     rename it, e.g. mv config.sh config.sh.old.  Then rerun Configure
  384. !     with the options you want to use.
  385.   
  386.       You can also supply a file config.over to over-ride Configure's
  387.       guesses.  It will get loaded up at the very end, just before
  388. ***************
  389. *** 106,112 ****
  390.       can be done in cflags.SH.  For instance, to turn off the optimizer
  391.       on toke.c, find the line in the switch structure for toke.c and
  392.       put the command optimize='-g' before the ;;.  To change the C flags
  393. !     for all the files, edit config.sh and change either $ccflags or $optimize.
  394.   
  395.   3)  make depend
  396.   
  397. --- 115,123 ----
  398.       can be done in cflags.SH.  For instance, to turn off the optimizer
  399.       on toke.c, find the line in the switch structure for toke.c and
  400.       put the command optimize='-g' before the ;;.  To change the C flags
  401. !     for all the files, edit config.sh and change either $ccflags or $optimize,
  402. !     and then re-run  Configure -S ; make depend.
  403.   
  404.   3)  make depend
  405.   
  406. Index: c2ph.SH
  407. *** perl5.001i/c2ph.SH    Tue Oct 18 12:18:34 1994
  408. --- perl5.001j/c2ph.SH    Thu Jun  1 11:20:10 1995
  409. ***************
  410. *** 21,27 ****
  411.   : by putting a backslash in front.  You may delete these comments.
  412.   rm -f c2ph
  413.   $spitshell >c2ph <<!GROK!THIS!
  414. ! #!$bin/perl
  415.   #
  416.   !GROK!THIS!
  417.   
  418. --- 21,27 ----
  419.   : by putting a backslash in front.  You may delete these comments.
  420.   rm -f c2ph
  421.   $spitshell >c2ph <<!GROK!THIS!
  422. ! #!$binexp/perl
  423.   #
  424.   !GROK!THIS!
  425.   
  426. Index: config_H
  427. Prereq:  3.0.1.3 
  428. *** perl5.001i/config_H    Tue May 30 16:01:51 1995
  429. --- perl5.001j/config_H    Mon Jun  5 12:19:31 1995
  430. ***************
  431. *** 14,20 ****
  432.    * $Id: Config_h.U,v 3.0.1.3 1995/01/30 14:25:39 ram Exp $
  433.    */
  434.   
  435. ! /* Configuration time: Tue May 30 13:05:37 EDT 1995
  436.    * Configured by: andy
  437.    * Target system: crystal crystal 3.2 2 i386 
  438.    */
  439. --- 14,20 ----
  440.    * $Id: Config_h.U,v 3.0.1.3 1995/01/30 14:25:39 ram Exp $
  441.    */
  442.   
  443. ! /* Configuration time: Fri Jun  2 14:50:10 EDT 1995
  444.    * Configured by: andy
  445.    * Target system: crystal crystal 3.2 2 i386 
  446.    */
  447. ***************
  448. *** 758,771 ****
  449. --- 758,781 ----
  450.    *    FILE structure pointed to by its argument. This macro will always be
  451.    *    defined if USE_STDIO_PTR is defined.
  452.    */
  453. + /* STDIO_PTR_LVALUE:
  454. +  *    This symbol is defined if the FILE_ptr macro can be used as an
  455. +  *    lvalue.
  456. +  */
  457.   /* FILE_cnt:
  458.    *    This macro is used to access the _cnt field (or equivalent) of the
  459.    *    FILE structure pointed to by its argument. This macro will always be
  460.    *    defined if USE_STDIO_PTR is defined.
  461.    */
  462. + /* STDIO_CNT_LVALUE:
  463. +  *    This symbol is defined if the FILE_cnt macro can be used as an
  464. +  *    lvalue.
  465. +  */
  466.   #ifdef USE_STDIO_PTR
  467.   #define FILE_ptr(fp)    ((fp)->_ptr)
  468. + #define STDIO_PTR_LVALUE
  469.   #define FILE_cnt(fp)    ((fp)->_cnt)
  470. + #define STDIO_CNT_LVALUE
  471.   #endif
  472.   
  473.   /* FILE_base:
  474. Index: config_h.SH
  475. Prereq:  3.0.1.3 
  476. *** perl5.001i/config_h.SH    Wed May 31 09:19:09 1995
  477. --- perl5.001j/config_h.SH    Mon Jun  5 12:23:03 1995
  478. ***************
  479. *** 772,785 ****
  480. --- 772,795 ----
  481.    *    FILE structure pointed to by its argument. This macro will always be
  482.    *    defined if USE_STDIO_PTR is defined.
  483.    */
  484. + /* STDIO_PTR_LVALUE:
  485. +  *    This symbol is defined if the FILE_ptr macro can be used as an
  486. +  *    lvalue.
  487. +  */
  488.   /* FILE_cnt:
  489.    *    This macro is used to access the _cnt field (or equivalent) of the
  490.    *    FILE structure pointed to by its argument. This macro will always be
  491.    *    defined if USE_STDIO_PTR is defined.
  492.    */
  493. + /* STDIO_CNT_LVALUE:
  494. +  *    This symbol is defined if the FILE_cnt macro can be used as an
  495. +  *    lvalue.
  496. +  */
  497.   #ifdef USE_STDIO_PTR
  498.   #define FILE_ptr(fp)    $stdio_ptr
  499. + #$d_stdio_ptr_lval STDIO_PTR_LVALUE
  500.   #define FILE_cnt(fp)    $stdio_cnt
  501. + #$d_stdio_cnt_lval STDIO_CNT_LVALUE
  502.   #endif
  503.   
  504.   /* FILE_base:
  505. Index: doio.c
  506. *** perl5.001i/doio.c    Thu May 18 15:31:16 1995
  507. --- perl5.001j/doio.c    Fri Jun  2 12:00:23 1995
  508. ***************
  509. *** 577,583 ****
  510.           (void)ungetc(ch, IoIFP(io));
  511.           return FALSE;
  512.       }
  513. ! #ifdef USE_STDIO_PTR
  514.       if (FILE_cnt(IoIFP(io)) < -1)
  515.           FILE_cnt(IoIFP(io)) = -1;
  516.   #endif
  517. --- 577,583 ----
  518.           (void)ungetc(ch, IoIFP(io));
  519.           return FALSE;
  520.       }
  521. ! #if defined(USE_STDIO_PTR) && defined(STDIO_CNT_LVALUE)
  522.       if (FILE_cnt(IoIFP(io)) < -1)
  523.           FILE_cnt(IoIFP(io)) = -1;
  524.   #endif
  525. Index: ext/DynaLoader/DynaLoader.pm
  526. *** perl5.001i/ext/DynaLoader/DynaLoader.pm    Thu May 25 11:45:15 1995
  527. --- perl5.001j/ext/DynaLoader/DynaLoader.pm    Fri Jun  2 13:59:28 1995
  528. ***************
  529. *** 9,33 ****
  530.   =head1 SYNOPSIS
  531.   
  532.       require DynaLoader;
  533. !     push (@ISA, 'DynaLoader');
  534.   
  535.   
  536.   =head1 DESCRIPTION
  537.   
  538. ! This specification defines a standard generic interface to the dynamic
  539.   linking mechanisms available on many platforms.  Its primary purpose is
  540.   to implement automatic dynamic loading of Perl modules.
  541.   
  542.   The DynaLoader is designed to be a very simple high-level
  543.   interface that is sufficiently general to cover the requirements
  544.   of SunOS, HP-UX, NeXT, Linux, VMS and other platforms.
  545.   
  546. ! It is also hoped that the interface will cover the needs of OS/2,
  547. ! NT etc and allow pseudo-dynamic linking (using C<ld -A> at runtime).
  548. ! This document serves as both a specification for anyone wishing to
  549. ! implement the DynaLoader for a new platform and as a guide for
  550. ! anyone wishing to use the DynaLoader directly in an application.
  551.   
  552.   It must be stressed that the DynaLoader, by itself, is practically
  553.   useless for accessing non-Perl libraries because it provides almost no
  554. --- 9,33 ----
  555.   =head1 SYNOPSIS
  556.   
  557.       require DynaLoader;
  558. !     @ISA = qw(... DynaLoader ...);
  559.   
  560.   
  561.   =head1 DESCRIPTION
  562.   
  563. ! This document defines a standard generic interface to the dynamic
  564.   linking mechanisms available on many platforms.  Its primary purpose is
  565.   to implement automatic dynamic loading of Perl modules.
  566.   
  567. + This document serves as both a specification for anyone wishing to
  568. + implement the DynaLoader for a new platform and as a guide for
  569. + anyone wishing to use the DynaLoader directly in an application.
  570.   The DynaLoader is designed to be a very simple high-level
  571.   interface that is sufficiently general to cover the requirements
  572.   of SunOS, HP-UX, NeXT, Linux, VMS and other platforms.
  573.   
  574. ! It is also hoped that the interface will cover the needs of OS/2, NT
  575. ! etc and also allow pseudo-dynamic linking (using C<ld -A> at runtime).
  576.   
  577.   It must be stressed that the DynaLoader, by itself, is practically
  578.   useless for accessing non-Perl libraries because it provides almost no
  579. ***************
  580. *** 153,160 ****
  581.   and "$name".
  582.   
  583.   If any directories are included in @names they are searched before
  584. ! @dl_library_path.  Directories may be specified as B<-Ldir>.  Any other names
  585. ! are treated as filenames to be searched for.
  586.   
  587.   Using arguments of the form C<-Ldir> and C<-lname> is recommended.
  588.   
  589. --- 153,160 ----
  590.   and "$name".
  591.   
  592.   If any directories are included in @names they are searched before
  593. ! @dl_library_path.  Directories may be specified as B<-Ldir>.  Any other
  594. ! names are treated as filenames to be searched for.
  595.   
  596.   Using arguments of the form C<-Ldir> and C<-lname> is recommended.
  597.   
  598. ***************
  599. *** 174,181 ****
  600.   
  601.   To support these systems a dl_expandspec() function can be implemented
  602.   either in the F<dl_*.xs> file or code can be added to the autoloadable
  603. ! dl_expandspec(0 function in F<DynaLoader.pm>).  See F<DynaLoader.pm> for more
  604. ! information.
  605.   
  606.   =item dl_load_file()
  607.   
  608. --- 174,181 ----
  609.   
  610.   To support these systems a dl_expandspec() function can be implemented
  611.   either in the F<dl_*.xs> file or code can be added to the autoloadable
  612. ! dl_expandspec() function in F<DynaLoader.pm>.  See F<DynaLoader.pm> for
  613. ! more information.
  614.   
  615.   =item dl_load_file()
  616.   
  617. ***************
  618. *** 232,238 ****
  619.   
  620.   Return a list of symbol names which remain undefined after load_file().
  621.   Returns C<()> if not known.  Don't worry if your platform does not provide
  622. ! a mechanism for this.  Most do not need it and hence do not provide it.
  623.   
  624.   
  625.   =item dl_install_xsub()
  626. --- 232,239 ----
  627.   
  628.   Return a list of symbol names which remain undefined after load_file().
  629.   Returns C<()> if not known.  Don't worry if your platform does not provide
  630. ! a mechanism for this.  Most do not need it and hence do not provide it,
  631. ! they just return an empty list.
  632.   
  633.   
  634.   =item dl_install_xsub()
  635. ***************
  636. *** 308,322 ****
  637.   
  638.   =head1 AUTHOR
  639.   
  640.   This interface is based on the work and comments of (in no particular
  641.   order): Larry Wall, Robert Sanders, Dean Roehrich, Jeff Okamoto, Anno
  642. ! Siegel, Thomas Neumann, Paul Marquess, Charles Bailey, and others.
  643.   
  644.   Larry Wall designed the elegant inherited bootstrap mechanism and
  645.   implemented the first Perl 5 dynamic loader using it.
  646.   
  647. - Tim Bunce, 11 August 1994.
  648.   =cut
  649.   
  650.   #
  651. --- 309,323 ----
  652.   
  653.   =head1 AUTHOR
  654.   
  655. + Tim Bunce, 11 August 1994.
  656.   This interface is based on the work and comments of (in no particular
  657.   order): Larry Wall, Robert Sanders, Dean Roehrich, Jeff Okamoto, Anno
  658. ! Siegel, Thomas Neumann, Paul Marquess, Charles Bailey, myself and others.
  659.   
  660.   Larry Wall designed the elegant inherited bootstrap mechanism and
  661.   implemented the first Perl 5 dynamic loader using it.
  662.   
  663.   =cut
  664.   
  665.   #
  666. ***************
  667. *** 328,335 ****
  668.   
  669.   # Quote from Tolkien sugested by Anno Siegel.
  670.   #
  671. ! # Read ext/DynaLoader/README and DynaLoader.doc for
  672. ! # detailed information.
  673.   #
  674.   # Tim.Bunce@ig.co.uk, August 1994
  675.   
  676. --- 329,335 ----
  677.   
  678.   # Quote from Tolkien sugested by Anno Siegel.
  679.   #
  680. ! # Read ext/DynaLoader/README for detailed information.
  681.   #
  682.   # Tim.Bunce@ig.co.uk, August 1994
  683.   
  684. ***************
  685. *** 394,403 ****
  686.       local($module) = $args[0];
  687.       local(@dirs, $file);
  688.   
  689. !     croak "Usage: DynaLoader::bootstrap(module)"
  690. !     unless ($module);
  691.   
  692. !     croak "Can't load module $module, dynamic loading not available in this perl"
  693.       unless defined(&dl_load_file);
  694.   
  695.       print STDERR "DynaLoader::bootstrap($module)\n" if $dl_debug;
  696. --- 394,406 ----
  697.       local($module) = $args[0];
  698.       local(@dirs, $file);
  699.   
  700. !     confess "Usage: DynaLoader::bootstrap(module)" unless $module;
  701.   
  702. !     # A common error on platforms which don't support dynamic loading.
  703. !     # Since it's fatal and potentially confusing we give a detailed message.
  704. !     croak("Can't load module $module, dynamic loading not available in this perl.\n".
  705. !     "  (You may need to build a new perl executable which either supports\n".
  706. !     "  dynamic loading or has the $module module statically linked into it.)\n")
  707.       unless defined(&dl_load_file);
  708.   
  709.       print STDERR "DynaLoader::bootstrap($module)\n" if $dl_debug;
  710. ***************
  711. *** 496,504 ****
  712. --- 499,509 ----
  713.           # Deal with directories first:
  714.           #  Using a -L prefix is the preferred option (faster and more robust)
  715.           if (m:^-L:){ s/^-L//; push(@dirs, $_); next; }
  716.           #  Otherwise we try to try to spot directories by a heuristic
  717.           #  (this is a more complicated issue than it first appears)
  718.           if (m:/: && -d $_){   push(@dirs, $_); next; }
  719.           # VMS: we may be using native VMS directry syntax instead of
  720.           # Unix emulation, so check this as well
  721.           if ($vms && /[:>\]]/ && -d $_){   push(@dirs, $_); next; }
  722. Index: ext/NDBM_File/hints/solaris.pl
  723. *** /dev/null    Mon Jun  5 14:53:25 1995
  724. --- perl5.001j/ext/NDBM_File/hints/solaris.pl    Mon Jun  5 14:11:03 1995
  725. ***************
  726. *** 0 ****
  727. --- 1,3 ----
  728. + # -lucb has been reported to be fatal for perl5 on Solaris.
  729. + # Thus we deliberately don't include it here.
  730. + $att{LIBS} = ["-L/usr/local/lib -lndbm", "-ldbm"];
  731. Index: ext/ODBM_File/Makefile.PL
  732. *** perl5.001i/ext/ODBM_File/Makefile.PL    Wed Feb  8 19:43:08 1995
  733. --- perl5.001j/ext/ODBM_File/Makefile.PL    Mon Jun  5 15:03:44 1995
  734. ***************
  735. *** 1,2 ****
  736.   use ExtUtils::MakeMaker;
  737. ! WriteMakefile(LIBS => ["-ldbm.nfs", "-ldbm -lucb"]);
  738. --- 1,2 ----
  739.   use ExtUtils::MakeMaker;
  740. ! WriteMakefile(LIBS => ["-ldbm -lucb"]);
  741. Index: ext/ODBM_File/hints/sco.pl
  742. *** /dev/null    Mon Jun  5 14:53:25 1995
  743. --- perl5.001j/ext/ODBM_File/hints/sco.pl    Mon Jun  5 14:09:18 1995
  744. ***************
  745. *** 0 ****
  746. --- 1,4 ----
  747. + # Some versions of SCO contain a broken -ldbm library that is missing
  748. + # dbmclose.  Some of those might have a fixed library installed as
  749. + # -ldbm.nfs.
  750. + $att{LIBS} = ['-ldbm.nfs', '-ldbm'];
  751. Index: ext/ODBM_File/hints/solaris.pl
  752. *** /dev/null    Mon Jun  5 14:53:25 1995
  753. --- perl5.001j/ext/ODBM_File/hints/solaris.pl    Mon Jun  5 14:09:18 1995
  754. ***************
  755. *** 0 ****
  756. --- 1,3 ----
  757. + # -lucb has been reported to be fatal for perl5 on Solaris.
  758. + # Thus we deliberately don't include it here.
  759. + $att{LIBS} = ['-ldbm'];
  760. Index: ext/ODBM_File/hints/svr4.pl
  761. *** /dev/null    Mon Jun  5 14:53:25 1995
  762. --- perl5.001j/ext/ODBM_File/hints/svr4.pl    Mon Jun  5 14:09:18 1995
  763. ***************
  764. *** 0 ****
  765. --- 1,4 ----
  766. + # Some SVR4 systems may need to link against routines in -lucb for
  767. + # odbm.  Some may also need to link against -lc to pick up things like
  768. + # ecvt.
  769. + $att{LIBS} = ['-ldbm -lucb -lc'];
  770. Index: h2ph.SH
  771. *** perl5.001i/h2ph.SH    Sun Mar 12 01:49:00 1995
  772. --- perl5.001j/h2ph.SH    Thu Jun  1 11:20:39 1995
  773. ***************
  774. *** 21,27 ****
  775.   : by putting a backslash in front.  You may delete these comments.
  776.   rm -f h2ph
  777.   $spitshell >h2ph <<!GROK!THIS!
  778. ! #!$bin/perl
  779.   'di ';
  780.   'ds 00 \"';
  781.   'ig 00 ';
  782. --- 21,27 ----
  783.   : by putting a backslash in front.  You may delete these comments.
  784.   rm -f h2ph
  785.   $spitshell >h2ph <<!GROK!THIS!
  786. ! #!$binexp/perl
  787.   'di ';
  788.   'ds 00 \"';
  789.   'ig 00 ';
  790. Index: h2xs.SH
  791. *** perl5.001i/h2xs.SH    Wed Feb 22 14:36:55 1995
  792. --- perl5.001j/h2xs.SH    Thu Jun  1 11:20:46 1995
  793. ***************
  794. *** 18,24 ****
  795.   esac
  796.   echo "Extracting h2xs (with variable substitutions)"
  797.   $spitshell >h2xs <<!GROK!THIS!
  798. ! #!$bin/perl
  799.   !GROK!THIS!
  800.   
  801.   $spitshell >>h2xs <<'!NO!SUBS!'
  802. --- 18,24 ----
  803.   esac
  804.   echo "Extracting h2xs (with variable substitutions)"
  805.   $spitshell >h2xs <<!GROK!THIS!
  806. ! #!$binexp/perl
  807.   !GROK!THIS!
  808.   
  809.   $spitshell >>h2xs <<'!NO!SUBS!'
  810. Index: hints/apollo.sh
  811. *** perl5.001i/hints/apollo.sh    Tue Oct 18 12:32:32 1994
  812. --- perl5.001j/hints/apollo.sh    Fri Jun  2 11:29:54 1995
  813. ***************
  814. *** 1,6 ****
  815. ! optimize=''
  816. ! ccflags='-A cpu,mathchip -W0,-opt,2'
  817.   
  818.   cat <<'EOF'
  819.   Some tests may fail unless you use 'chacl -B'.  Also, op/stat
  820.   test 2 may fail occasionally because Apollo doesn't guarantee
  821. --- 1,20 ----
  822. ! # Info from Johann Klasek <jk@auto.tuwien.ac.at>
  823. ! # Merged by Andy Dougherty  <doughera@lafcol.lafayette.edu>
  824. ! # Last revised    Fri Jun  2 11:21:27 EDT 1995
  825.   
  826. + # uname -a looks like
  827. + # DomainOS newton 10.4.1 bsd4.3 425t
  828. + # We want to use both BSD includes and some of the features from the
  829. + # /sys5 includes.
  830. + ccflags="$ccflags -A cpu,mathchip -I/usr/include -I/sys5/usr/include"
  831. + # These adjustments are necessary (why?) to compile malloc.c.
  832. + freetype='void'
  833. + i_malloc='undef'
  834. + malloctype='void *'
  835. + # This info is left over from perl4.  
  836.   cat <<'EOF'
  837.   Some tests may fail unless you use 'chacl -B'.  Also, op/stat
  838.   test 2 may fail occasionally because Apollo doesn't guarantee
  839. ***************
  840. *** 8,13 ****
  841. --- 22,29 ----
  842.   file.  Finally, the sleep test will sometimes fail.  See the
  843.   sleep(3) man page to learn why.
  844.   
  845. + See hints/apollo.sh for hints on running h2ph.
  846.   And a note on ccflags:
  847.   
  848.       Lastly, while -A cpu,mathchip generates optimal code for your DN3500
  849. ***************
  850. *** 18,20 ****
  851. --- 34,51 ----
  852.                           -- Steve Vinoski
  853.   
  854.   EOF
  855. + # Running h2ph, on the other hand, presents a challenge. 
  856. + #The perl header files have to be generated with following commands
  857. + #sed 's|/usr/include|/sys5/usr/include|g' h2ph >h2ph.new && chmod +x h2ph.new
  858. + #(set cdir=`pwd`; cd /sys5/usr/include; $cdir/h2ph.new sys/* )
  859. + #(set cdir=`pwd`; cd /usr/include; $cdir/h2ph * sys/* machine/*)
  860. + #The SYS5 headers (only sys) are overlayed by the BSD headers.  It  seems
  861. + #all ok, but once I am going into details,  a  lot  of  limitations  from
  862. + #'h2ph' are coming up. Lines like "#define NODEV (dev_t)(-1)"  result  in
  863. + #syntax errors as converted by h2ph. 
  864. + # Generally, h2ph might need a lot of help.
  865. Index: hints/freebsd.sh
  866. *** perl5.001i/hints/freebsd.sh    Mon May 22 14:23:20 1995
  867. --- perl5.001j/hints/freebsd.sh    Fri Jun  2 10:58:00 1995
  868. ***************
  869. *** 33,39 ****
  870.       ;;
  871.   1.1*)    d_dlopen="$define"
  872.       cccdlflags='-DPIC -fpic'
  873. !     lddlflags='-Bshareable $lddlflags'
  874.       malloctype='void *'
  875.       groupstype='int'
  876.       d_setregid='undef'
  877. --- 33,39 ----
  878.       ;;
  879.   1.1*)    d_dlopen="$define"
  880.       cccdlflags='-DPIC -fpic'
  881. !     lddlflags="-Bshareable $lddlflags"
  882.       malloctype='void *'
  883.       groupstype='int'
  884.       d_setregid='undef'
  885. ***************
  886. *** 44,50 ****
  887.   2.0-RELEASE*)
  888.       d_dlopen="$define"
  889.       cccdlflags='-DPIC -fpic'
  890. !     lddlflags='-Bshareable $lddlflags'
  891.       d_setregid='undef'
  892.       d_setreuid='undef'
  893.       d_setrgid='undef'
  894. --- 44,50 ----
  895.   2.0-RELEASE*)
  896.       d_dlopen="$define"
  897.       cccdlflags='-DPIC -fpic'
  898. !     lddlflags="-Bshareable $lddlflags"
  899.       d_setregid='undef'
  900.       d_setreuid='undef'
  901.       d_setrgid='undef'
  902. ***************
  903. *** 58,64 ****
  904.   2.0.5*|2.0-BUILD|2.1*)
  905.       d_dlopen="$define"
  906.       cccdlflags='-DPIC -fpic'
  907. !     lddlflags='-Bshareable $lddlflags'
  908.       # Are these defines necessary?  Doesn't Configure find them
  909.       # correctly?
  910.       d_setregid='define'
  911. --- 58,64 ----
  912.   2.0.5*|2.0-BUILD|2.1*)
  913.       d_dlopen="$define"
  914.       cccdlflags='-DPIC -fpic'
  915. !     lddlflags="-Bshareable $lddlflags"
  916.       # Are these defines necessary?  Doesn't Configure find them
  917.       # correctly?
  918.       d_setregid='define'
  919. Index: hints/linux.sh
  920. *** perl5.001i/hints/linux.sh    Tue May 30 14:28:25 1995
  921. --- perl5.001j/hints/linux.sh    Fri Jun  2 10:20:55 1995
  922. ***************
  923. *** 80,87 ****
  924.   You don't have an ELF gcc.  I will use dld if possible.  If you are
  925.   using a version of DLD earlier than 3.2.6, or don't have it at all, you
  926.   should probably upgrade. If you are forced to use 3.2.4, you should
  927. ! uncomment a couple of lines in hints/linux.sh and rerun Configure to
  928. ! disallow shared libraries.
  929.   
  930.   EOM
  931.       lddlflags="-r $lddlflags"
  932. --- 80,87 ----
  933.   You don't have an ELF gcc.  I will use dld if possible.  If you are
  934.   using a version of DLD earlier than 3.2.6, or don't have it at all, you
  935.   should probably upgrade. If you are forced to use 3.2.4, you should
  936. ! uncomment a couple of lines in hints/linux.sh and restart Configure so
  937. ! that shared libraries will be disallowed.
  938.   
  939.   EOM
  940.       lddlflags="-r $lddlflags"
  941. ***************
  942. *** 96,118 ****
  943.       #ldflags="-static"
  944.       #so='none'
  945.   fi
  946. - rm -rf try.c a.out
  947.   
  948. ! case "$BASH_VERSION" in
  949. ! 1.14.3*)
  950. !     cat <<'EOM'
  951. ! If you get failure of op/exec test #5 during the test phase, you probably
  952. ! have a buggy version of bash. Upgrading to a recent version (1.14.4 or
  953. ! later) should fix the problem.
  954.   
  955.   EOM
  956. ! ;;
  957. ! esac
  958.   
  959.   # In addition, on some systems there is a problem with perl and NDBM, which
  960.   # causes AnyDBM and NDBM_File to lock up. This is evidenced in the tests as
  961.   # AnyDBM just freezing.  Currently we disable NDBM for all linux systems.
  962.   # If someone can suggest a more robust test, that would be appreciated.
  963.   d_dbm_open=undef
  964.   
  965. --- 96,123 ----
  966.       #ldflags="-static"
  967.       #so='none'
  968.   fi
  969.   
  970. ! rm -f try.c a.out
  971. ! if /bin/bash -c exit; then
  972. !   echo You appear to have a working bash. Good.
  973. ! else
  974. !   cat << 'EOM'
  975. ! Warning: it would appear you have a defective bash shell installed. This is
  976. ! likely to give you a failure of op/exec test #5 during the test phase of the
  977. ! build, Upgrading to a recent version (1.14.4 or later) should fix the
  978. ! problem.
  979.   
  980.   EOM
  981. ! fi
  982.   
  983.   # In addition, on some systems there is a problem with perl and NDBM, which
  984.   # causes AnyDBM and NDBM_File to lock up. This is evidenced in the tests as
  985.   # AnyDBM just freezing.  Currently we disable NDBM for all linux systems.
  986.   # If someone can suggest a more robust test, that would be appreciated.
  987. + # This will generate a harmless message:
  988. + # Hmm...You had some extra variables I don't know about...I'll try to keep 'em.
  989. + #    Propagating recommended variable d_dbm_open
  990.   d_dbm_open=undef
  991.   
  992. Index: hints/sco_3.sh
  993. *** perl5.001i/hints/sco_3.sh    Tue Apr 11 16:14:41 1995
  994. --- perl5.001j/hints/sco_3.sh    Mon Jun  5 11:50:11 1995
  995. ***************
  996. *** 39,41 ****
  997. --- 39,45 ----
  998.   # If you want to use nm, you'll probably have to use nm -p.  The
  999.   # following does that for you:
  1000.   nm_opt='-p'
  1001. + # I have received one report that you can't include utime.h in
  1002. + # pp_sys.c.  Uncomment the following line if that happens to you:
  1003. + # i_utime=undef
  1004. Index: lib/AutoLoader.pm
  1005. *** perl5.001i/lib/AutoLoader.pm    Thu May 25 14:33:45 1995
  1006. --- perl5.001j/lib/AutoLoader.pm    Mon Jun  5 14:47:15 1995
  1007. ***************
  1008. *** 43,64 ****
  1009.       goto &$AUTOLOAD;
  1010.   }
  1011.                               
  1012. ! sub import
  1013. ! {
  1014. !  my ($callclass, $callfile, $callline,$path,$callpack) = caller(0);
  1015. !  ($callpack = $callclass) =~ s#::#/#;
  1016. !  if (defined($path = $INC{$callpack . '.pm'}))
  1017. !   {
  1018. !    if ($path =~ s#^(.*)$callpack\.pm$#$1auto/$callpack/autosplit.ix# && -e $path) 
  1019. !     {
  1020. !      eval {require $path}; 
  1021. !      carp $@ if ($@);  
  1022.       } 
  1023. -    else 
  1024. -     {
  1025. -      croak "Have not loaded $callpack.pm";
  1026. -     }
  1027. -   }
  1028.   }
  1029.   
  1030.   1;
  1031. --- 43,72 ----
  1032.       goto &$AUTOLOAD;
  1033.   }
  1034.                               
  1035. ! sub import {
  1036. !     my ($callclass, $callfile, $callline,$path,$callpack) = caller(0);
  1037. !     ($callpack = $callclass) =~ s#::#/#;
  1038. !     # Try to find the autosplit index file.  Eg., if the call package
  1039. !     # is POSIX, then $INC{POSIX.pm} is something like
  1040. !     # '/usr/local/lib/perl5/POSIX.pm', and the autosplit index file is in
  1041. !     # '/usr/local/lib/perl5/auto/POSIX/autosplit.ix', so we require that.
  1042. !     #
  1043. !     # However, if @INC is a relative path, this might not work.  If,
  1044. !     # for example, @INC = ('lib'), then
  1045. !     # $INC{POSIX.pm} is 'lib/POSIX.pm', and we want to require
  1046. !     # 'auto/POSIX/autosplit.ix' (without the leading 'lib').
  1047. !     #
  1048. !     if (defined($path = $INC{$callpack . '.pm'})) {
  1049. !     # Try absolute path name.
  1050. !     $path =~ s#^(.*)$callpack\.pm$#$1auto/$callpack/autosplit.ix#;
  1051. !     eval { require $path; };
  1052. !     # If that failed, try relative path with normal @INC searching.
  1053. !     if ($@) {
  1054. !         $path ="auto/$callpack/autosplit.ix";
  1055. !         eval { require $path; };
  1056. !     }
  1057. !     carp $@ if ($@);  
  1058.       } 
  1059.   }
  1060.   
  1061.   1;
  1062. Index: lib/ExtUtils/xsubpp
  1063. *** perl5.001i/lib/ExtUtils/xsubpp    Fri May 26 15:24:22 1995
  1064. --- perl5.001j/lib/ExtUtils/xsubpp    Mon Jun  5 12:10:44 1995
  1065. ***************
  1066. *** 132,145 ****
  1067.   When parsing the OUTPUT arguments check that they are all present in
  1068.   the corresponding input argument definitions.
  1069.   
  1070.   =head1 SEE ALSO
  1071.   
  1072.   perl(1)
  1073.   
  1074.   =cut
  1075.   
  1076.   # Global Constants
  1077. ! $XSUBPP_version = "1.4" ;
  1078.   
  1079.   $usage = "Usage: xsubpp [-C++] [-except] [-typemap typemap] file.xs\n";
  1080.   
  1081. --- 132,171 ----
  1082.   When parsing the OUTPUT arguments check that they are all present in
  1083.   the corresponding input argument definitions.
  1084.   
  1085. + =head2 1.5 
  1086. + Changes by Paul Marquess <pmarquess@bfsec.bt.co.uk>, 1 June 1995.
  1087. + Started tidy up to allow clean run using C<-w> flag. 
  1088. + Added some more error checking.
  1089. + The CASE: functionality now works.
  1090. + =head2 1.6 
  1091. + Changes by Paul Marquess <pmarquess@bfsec.bt.co.uk>, 3 June 1995.
  1092. + Added some more error checking.
  1093. + =head2 1.7 
  1094. + Changes by Paul Marquess <pmarquess@bfsec.bt.co.uk>, 5 June 1995.
  1095. + When an error or warning message is printed C<xsubpp> will now attempt
  1096. + to identify the exact line in the C<.xs> file where the fault occurs.
  1097. + This can be achieved in the majority of cases.
  1098.   =head1 SEE ALSO
  1099.   
  1100.   perl(1)
  1101.   
  1102.   =cut
  1103.   
  1104. + use FileHandle ;
  1105.   # Global Constants
  1106. ! $XSUBPP_version = "1.7" ;
  1107.   
  1108.   $usage = "Usage: xsubpp [-C++] [-except] [-typemap typemap] file.xs\n";
  1109.   
  1110. ***************
  1111. *** 155,162 ****
  1112.   chop($pwd = `pwd`);
  1113.   # Check for error message from VMS
  1114.   if ($pwd =~ /unrecognized command verb/) { $Is_VMS = 1; $pwd = $ENV{DEFAULT} }
  1115. ! ($dir, $filename) = @ARGV[0] =~ m#(.*)/(.*)#
  1116. !     or ($dir, $filename) = @ARGV[0] =~ m#(.*[>\]])(.*)#
  1117.       or ($dir, $filename) = ('.', $ARGV[0]);
  1118.   chdir($dir);
  1119.   
  1120. --- 181,188 ----
  1121.   chop($pwd = `pwd`);
  1122.   # Check for error message from VMS
  1123.   if ($pwd =~ /unrecognized command verb/) { $Is_VMS = 1; $pwd = $ENV{DEFAULT} }
  1124. ! ($dir, $filename) = $ARGV[0] =~ m#(.*)/(.*)#
  1125. !     or ($dir, $filename) = $ARGV[0] =~ m#(.*[>\]])(.*)#
  1126.       or ($dir, $filename) = ('.', $ARGV[0]);
  1127.   chdir($dir);
  1128.   
  1129. ***************
  1130. *** 196,201 ****
  1131. --- 222,228 ----
  1132.       open(TYPEMAP, $typemap) 
  1133.       or warn ("Warning: could not open typemap file '$typemap': $!\n"), next;
  1134.       $mode = Typemap;
  1135. +     $junk = "" ;
  1136.       $current = \$junk;
  1137.       while (<TYPEMAP>) {
  1138.       next if /^#/;
  1139. ***************
  1140. *** 209,215 ****
  1141.           # skip blank lines and comment lines
  1142.           next if /^$/ or /^#/ ;
  1143.           my @words = split (' ') ;
  1144. !         blurt("Error: File '$typemap' Line $. '$line' TYPEMAP entry needs 2 columns\n"), next 
  1145.           unless @words >= 2 ;
  1146.           my $kind = pop @words ;
  1147.               TrimWhitespace($kind) ;
  1148. --- 236,242 ----
  1149.           # skip blank lines and comment lines
  1150.           next if /^$/ or /^#/ ;
  1151.           my @words = split (' ') ;
  1152. !         warn("Warning: File '$typemap' Line $. '$line' TYPEMAP entry needs 2 columns\n"), next 
  1153.           unless @words >= 2 ;
  1154.           my $kind = pop @words ;
  1155.               TrimWhitespace($kind) ;
  1156. ***************
  1157. *** 251,256 ****
  1158. --- 278,285 ----
  1159.       $text;
  1160.   }
  1161.   
  1162. + open(F, $filename) or die "cannot open $filename: $!\n";
  1163.   # Identify the version of xsubpp used
  1164.   $TimeStamp = localtime ;
  1165.   print <<EOM ;
  1166. ***************
  1167. *** 263,270 ****
  1168.   EOM
  1169.    
  1170.   
  1171. - open(F, $filename) or die "cannot open $filename: $!\n";
  1172.   while (<F>) {
  1173.       last if ($Module, $foo, $Package, $foo1, $Prefix) =
  1174.       /^MODULE\s*=\s*([\w:]+)(\s+PACKAGE\s*=\s*([\w:]+))?(\s+PREFIX\s*=\s*(\S+))?\s*$/;
  1175. --- 292,297 ----
  1176. ***************
  1177. *** 276,281 ****
  1178. --- 303,309 ----
  1179.   sub fetch_para {
  1180.       # parse paragraph
  1181.       @line = ();
  1182. +     @line_no = () ;
  1183.       if ($lastline ne "") {
  1184.       if ($lastline =~
  1185.       /^MODULE\s*=\s*([\w:]+)(\s+PACKAGE\s*=\s*([\w:]+))?(\s+PREFIX\s*=\s*(\S+))?\s*$/) {
  1186. ***************
  1187. *** 294,303 ****
  1188.               !/^#[ \t]*(if|ifdef|ifndef|else|elif|endif|define|undef)\b/;
  1189.           last if /^\S/;
  1190.           }
  1191. !         push(@line, $_) if $_ ne "";
  1192.       }
  1193.       else {
  1194.           push(@line, $lastline);
  1195.       }
  1196.       $lastline = "";
  1197.       while (<F>) {
  1198. --- 322,332 ----
  1199.               !/^#[ \t]*(if|ifdef|ifndef|else|elif|endif|define|undef)\b/;
  1200.           last if /^\S/;
  1201.           }
  1202. !         push(@line, $_), push(@line_no, input_line_number F) if $_ ne "";
  1203.       }
  1204.       else {
  1205.           push(@line, $lastline);
  1206. +             push(@line_no, $lastline_no) ;
  1207.       }
  1208.       $lastline = "";
  1209.       while (<F>) {
  1210. ***************
  1211. *** 306,323 ****
  1212.           chop;
  1213.           if (/^\S/ && @line && $line[-1] eq "") {
  1214.           $lastline = $_;
  1215.           last;
  1216.           }
  1217.           else {
  1218.           push(@line, $_);
  1219.           }
  1220.       }
  1221. !     pop(@line) while @line && $line[-1] =~ /^\s*$/;
  1222.       }
  1223.       $PPCODE = grep(/PPCODE:/, @line);
  1224.       scalar @line;
  1225.   }
  1226.   
  1227.   while (&fetch_para) {
  1228.       # initialize info arrays
  1229.       undef(%args_match);
  1230. --- 335,355 ----
  1231.           chop;
  1232.           if (/^\S/ && @line && $line[-1] eq "") {
  1233.           $lastline = $_;
  1234. +                 $lastline_no = input_line_number F ;
  1235.           last;
  1236.           }
  1237.           else {
  1238.           push(@line, $_);
  1239. +                 push(@line_no, input_line_number F) ;
  1240.           }
  1241.       }
  1242. !     pop(@line), pop(@line_no) while @line && $line[-1] =~ /^\s*$/;
  1243.       }
  1244.       $PPCODE = grep(/PPCODE:/, @line);
  1245.       scalar @line;
  1246.   }
  1247.   
  1248. + PARAGRAPH:
  1249.   while (&fetch_para) {
  1250.       # initialize info arrays
  1251.       undef(%args_match);
  1252. ***************
  1253. *** 332,352 ****
  1254.   
  1255.       # extract return type, function name and arguments
  1256.       $ret_type = TidyType(shift(@line));
  1257.       if ($ret_type =~ /^BOOT:/) {
  1258.           push (@BootCode, @line, "", "") ;
  1259. !         next ;
  1260.       }
  1261.       if ($ret_type =~ /^static\s+(.*)$/) {
  1262.           $static = 1;
  1263.           $ret_type = $1;
  1264.       }
  1265.       $func_header = shift(@line);
  1266. !     ($func_name, $orig_args) =  $func_header =~ /^([\w:]+)\s*\((.*)\)$/;
  1267.       if ($func_name =~ /(.*)::(.*)/) {
  1268.           $class = $1;
  1269.           $func_name = $2;
  1270.       }
  1271.       ($pname = $func_name) =~ s/^($Prefix)?/$Packprefix/;
  1272.       push(@Func_name, "${Packid}_$func_name");
  1273.       push(@Func_pname, $pname);
  1274.       @args = split(/\s*,\s*/, $orig_args);
  1275. --- 364,400 ----
  1276.   
  1277.       # extract return type, function name and arguments
  1278.       $ret_type = TidyType(shift(@line));
  1279.       if ($ret_type =~ /^BOOT:/) {
  1280.           push (@BootCode, @line, "", "") ;
  1281. !         next PARAGRAPH ;
  1282.       }
  1283. +     # a function definition needs at least 2 lines
  1284. +     blurt ("Error: Function definition too short '$ret_type'"), next PARAGRAPH
  1285. +     unless @line ;
  1286.       if ($ret_type =~ /^static\s+(.*)$/) {
  1287.           $static = 1;
  1288.           $ret_type = $1;
  1289.       }
  1290.       $func_header = shift(@line);
  1291. !     blurt ("Error: Cannot parse function definition from '$func_header'"), next PARAGRAPH
  1292. !     unless $func_header =~ /^([\w:]+)\s*\((.*)\)$/;
  1293. !     ($func_name, $orig_args) =  ($1, $2) ;
  1294.       if ($func_name =~ /(.*)::(.*)/) {
  1295.           $class = $1;
  1296.           $func_name = $2;
  1297.       }
  1298. +     $Prefix = '' unless defined $Prefix ; # keep -w happy
  1299.       ($pname = $func_name) =~ s/^($Prefix)?/$Packprefix/;
  1300. +     # Check for duplicate function definition
  1301. +     blurt("Error: ignoring duplicate function definition '$func_name'"), next PARAGRAPH
  1302. +     if defined $Func_name{"${Packid}_$func_name"} ;
  1303. +     $Func_name{"${Packid}_$func_name"} ++ ;
  1304.       push(@Func_name, "${Packid}_$func_name");
  1305.       push(@Func_pname, $pname);
  1306.       @args = split(/\s*,\s*/, $orig_args);
  1307. ***************
  1308. *** 368,374 ****
  1309.           if ($args[$i] =~ s/\.\.\.//) {
  1310.               $elipsis = 1;
  1311.               $min_args--;
  1312. !             if ($args[i] eq '' && $i == $num_args - 1) {
  1313.               pop(@args);
  1314.               last;
  1315.               }
  1316. --- 416,422 ----
  1317.           if ($args[$i] =~ s/\.\.\.//) {
  1318.               $elipsis = 1;
  1319.               $min_args--;
  1320. !             if ($args[$i] eq '' && $i == $num_args - 1) {
  1321.               pop(@args);
  1322.               last;
  1323.               }
  1324. ***************
  1325. *** 421,442 ****
  1326.       # Now do a block of some sort.
  1327.   
  1328.       $condnum = 0;
  1329.       if (!@line) {
  1330.       @line = "CLEANUP:";
  1331.       }
  1332.       while (@line) {
  1333. !     if ($_[0] =~ s/^\s*CASE\s*:\s*//) {
  1334.           $cond = shift(@line);
  1335.           if ($condnum == 0) {
  1336. !         print "    if ($cond)\n";
  1337.           }
  1338.           elsif ($cond ne '') {
  1339.           print "    else if ($cond)\n";
  1340.           }
  1341.           else {
  1342.           print "    else\n";
  1343.           }
  1344.           $condnum++;
  1345.       }
  1346.   
  1347.       if ($except) {
  1348. --- 469,499 ----
  1349.       # Now do a block of some sort.
  1350.   
  1351.       $condnum = 0;
  1352. +     $else_cond = 0 ;
  1353.       if (!@line) {
  1354.       @line = "CLEANUP:";
  1355.       }
  1356.       while (@line) {
  1357. !     if ($line[0] =~ s/^\s*CASE\s*:\s*//) {
  1358.           $cond = shift(@line);
  1359. +             TrimWhitespace($cond) ;
  1360.           if ($condnum == 0) {
  1361. !         # Check $cond is not blank
  1362. !         blurt("Error: First CASE: needs a condition") 
  1363. !             if $cond eq '' ;
  1364. !         print "    if ($cond)\n"
  1365.           }
  1366.           elsif ($cond ne '') {
  1367.           print "    else if ($cond)\n";
  1368.           }
  1369.           else {
  1370. +         blurt ("Error: Too many CASE: statements without a condition")
  1371. +             unless $else_cond ;
  1372. +                 ++ $else_cond  ;
  1373.           print "    else\n";
  1374.           }
  1375.           $condnum++;
  1376. +             $_ = '' ;
  1377.       }
  1378.   
  1379.       if ($except) {
  1380. ***************
  1381. *** 454,459 ****
  1382. --- 511,518 ----
  1383.       $thisdone = 0;
  1384.       $retvaldone = 0;
  1385.       $deferred = "";
  1386. +     %arg_list = () ;
  1387. +         $gotRETVAL = 0;
  1388.       while (@line) {
  1389.           $_ = shift(@line);
  1390.           last if /^\s*NOT_IMPLEMENTED_YET/;
  1391. ***************
  1392. *** 463,470 ****
  1393.                   # skip blank lines 
  1394.                   next if /^$/ ;
  1395.           my $line = $_ ;
  1396.             # check for optional initialisation code
  1397. !         my $var_init = $1 if s/\s*(=.*)$// ;
  1398.   
  1399.                   my @words = split (' ') ;
  1400.                   blurt("Error: invalid argument declaration '$line'"), next
  1401. --- 522,534 ----
  1402.                   # skip blank lines 
  1403.                   next if /^$/ ;
  1404.           my $line = $_ ;
  1405. +                 # remove trailing semicolon if no initialisation
  1406. +                 s/\s*;+\s*$//g unless /=/ ;
  1407.             # check for optional initialisation code
  1408. !         my $var_init = '' ;
  1409. !         $var_init = $1 if s/\s*(=.*)$// ;
  1410.   
  1411.                   my @words = split (' ') ;
  1412.                   blurt("Error: invalid argument declaration '$line'"), next
  1413. ***************
  1414. *** 472,480 ****
  1415.                   my $var_name = pop @words ;
  1416.           my $var_type = "@words" ;
  1417.   
  1418. -         # catch C style argument declaration (this could be made alowable syntax)
  1419. -         warn("Warning: ignored semicolon in $pname argument declaration '$_'\n")
  1420. -             if ($var_name =~ s/;//g); # eg SV *<tab>name;
  1421.           # catch many errors similar to: SV<tab>* name
  1422.           blurt("Error: invalid $pname argument name '$var_name' (type '$var_type')\n")
  1423.               unless ($var_name =~ m/^&?\w+$/);
  1424. --- 536,541 ----
  1425. ***************
  1426. *** 493,499 ****
  1427.           print "\t" . &map_type($var_type);
  1428.           $var_num = $args_match{$var_name};
  1429.           if ($var_addr{$var_name}) {
  1430. !             $func_args =~ s/\b($var_name)\b/&\1/;
  1431.           }
  1432.           if ($var_init !~ /^=\s*NO_INIT\s*$/) {
  1433.               if ($var_init !~ /^\s*$/) {
  1434. --- 554,560 ----
  1435.           print "\t" . &map_type($var_type);
  1436.           $var_num = $args_match{$var_name};
  1437.           if ($var_addr{$var_name}) {
  1438. !             $func_args =~ s/\b($var_name)\b/&$1/;
  1439.           }
  1440.           if ($var_init !~ /^=\s*NO_INIT\s*$/) {
  1441.               if ($var_init !~ /^\s*$/) {
  1442. ***************
  1443. *** 536,542 ****
  1444.               print $deferred;
  1445.               while (@line) {
  1446.                   $_ = shift(@line);
  1447. !                 die "PPCODE must be last thing"
  1448.                       if /^\s*(OUTPUT|CLEANUP|CASE)\s*:/;
  1449.                   print "$_\n";
  1450.               }
  1451. --- 597,603 ----
  1452.               print $deferred;
  1453.               while (@line) {
  1454.                   $_ = shift(@line);
  1455. !                 death ("PPCODE must be last thing")
  1456.                       if /^\s*(OUTPUT|CLEANUP|CASE)\s*:/;
  1457.                   print "$_\n";
  1458.               }
  1459. ***************
  1460. *** 572,597 ****
  1461.                   $func_name = $2;
  1462.               }
  1463.               print "$func_name($func_args);\n";
  1464. !             $wantRETVAL = 1 
  1465. !                     unless $ret_type eq "void";
  1466.           }
  1467.       }
  1468.   
  1469.       # do output variables
  1470.       if (/^\s*OUTPUT\s*:/) {
  1471. !         my $gotRETVAL ;
  1472.           my %outargs ;
  1473.           while (@line) {
  1474.               $_ = shift(@line);
  1475. !             last if /^\s*CLEANUP\s*:/;
  1476.               TrimWhitespace($_) ;
  1477.               next if /^$/ ;
  1478.               my ($outarg, $outcode) = /^(\S+)\s*(.*)/ ;
  1479.               if (!$gotRETVAL and $outarg eq 'RETVAL') {
  1480.                   # deal with RETVAL last
  1481. !                 push(@line, $_) ;
  1482.                   $gotRETVAL = 1 ;
  1483. -                 undef ($wantRETVAL) ;
  1484.                   next ;
  1485.               }
  1486.               blurt ("Error: duplicate OUTPUT argument '$outarg' ignored"), next
  1487. --- 633,657 ----
  1488.                   $func_name = $2;
  1489.               }
  1490.               print "$func_name($func_args);\n";
  1491. !                 $wantRETVAL = 1 unless $ret_type eq "void";
  1492.           }
  1493.       }
  1494.   
  1495.       # do output variables
  1496.       if (/^\s*OUTPUT\s*:/) {
  1497. !         $gotRETVAL = 0;
  1498. !         my $RETVAL_code ;
  1499.           my %outargs ;
  1500.           while (@line) {
  1501.               $_ = shift(@line);
  1502. !             last if /^\s*CLEANUP|CASE\s*:/;
  1503.               TrimWhitespace($_) ;
  1504.               next if /^$/ ;
  1505.               my ($outarg, $outcode) = /^(\S+)\s*(.*)/ ;
  1506.               if (!$gotRETVAL and $outarg eq 'RETVAL') {
  1507.                   # deal with RETVAL last
  1508. !                 $RETVAL_code = $outcode ;
  1509.                   $gotRETVAL = 1 ;
  1510.                   next ;
  1511.               }
  1512.               blurt ("Error: duplicate OUTPUT argument '$outarg' ignored"), next
  1513. ***************
  1514. *** 608,618 ****
  1515.                       $outarg); 
  1516.               }
  1517.           }
  1518.       }
  1519.   
  1520.       # all OUTPUT done, so now push the return value on the stack
  1521.       &generate_output($ret_type, 0, "RETVAL")
  1522. !          if $wantRETVAL ;
  1523.   
  1524.       # do cleanup
  1525.       if (/^\s*CLEANUP\s*:/) {
  1526. --- 668,685 ----
  1527.                       $outarg); 
  1528.               }
  1529.           }
  1530. +         if ($gotRETVAL) {
  1531. +             if ($RETVAL_code) 
  1532. +                             { print "\t$RETVAL_code\n" }
  1533. +             else 
  1534. +                 { &generate_output($ret_type, 0, 'RETVAL') }
  1535. +         }
  1536.       }
  1537.   
  1538.       # all OUTPUT done, so now push the return value on the stack
  1539.       &generate_output($ret_type, 0, "RETVAL")
  1540. !          if $wantRETVAL and ! $gotRETVAL ;
  1541.   
  1542.       # do cleanup
  1543.       if (/^\s*CLEANUP\s*:/) {
  1544. ***************
  1545. *** 690,696 ****
  1546.       eval qq/print " $init\\\n"/;
  1547.   }
  1548.   
  1549. ! sub blurt { warn @_; $errors++ }
  1550.   
  1551.   sub generate_init {
  1552.       local($type, $num, $var) = @_;
  1553. --- 757,781 ----
  1554.       eval qq/print " $init\\\n"/;
  1555.   }
  1556.   
  1557. ! sub Warn
  1558. ! {
  1559. !     # work out the line number
  1560. !     my $line_no = $line_no[@line_no - @line -1] ;
  1561. !  
  1562. !     print STDERR "@_ in $filename, line $line_no\n" ;
  1563. ! }
  1564. ! sub blurt 
  1565. ! { 
  1566. !     Warn @_ ;
  1567. !     $errors ++ 
  1568. ! }
  1569. ! sub death
  1570. ! {
  1571. !     Warn @_ ;
  1572. !     exit 1 ;
  1573. ! }
  1574.   
  1575.   sub generate_init {
  1576.       local($type, $num, $var) = @_;
  1577. ***************
  1578. *** 700,706 ****
  1579.       local($tk);
  1580.   
  1581.       $type = TidyType($type) ;
  1582. !     blurt("Error: '$type' not in typemap"), return unless defined($type_kind{$type});
  1583.       ($ntype = $type) =~ s/\s*\*/Ptr/g;
  1584.       $subtype = $ntype;
  1585.       $subtype =~ s/Ptr$//;
  1586. --- 785,793 ----
  1587.       local($tk);
  1588.   
  1589.       $type = TidyType($type) ;
  1590. !     blurt("Error: '$type' not in typemap"), return 
  1591. !     unless defined($type_kind{$type});
  1592.       ($ntype = $type) =~ s/\s*\*/Ptr/g;
  1593.       $subtype = $ntype;
  1594.       $subtype =~ s/Ptr$//;
  1595. ***************
  1596. *** 708,715 ****
  1597. --- 795,808 ----
  1598.       $tk = $type_kind{$type};
  1599.       $tk =~ s/OBJ$/REF/ if $func_name =~ /DESTROY$/;
  1600.       $type =~ s/:/_/g;
  1601. +     blurt("Error: No INPUT definition for type '$type' found"), return
  1602. +         unless defined $input_expr{$tk} ;
  1603.       $expr = $input_expr{$tk};
  1604.       if ($expr =~ /DO_ARRAY_ELEM/) {
  1605. +         blurt("Error: '$subtype' not in typemap"), return 
  1606. +         unless defined($type_kind{$subtype});
  1607. +         blurt("Error: No INPUT definition for type '$subtype' found"), return
  1608. +             unless defined $input_expr{$type_kind{$subtype}} ;
  1609.       $subexpr = $input_expr{$type_kind{$subtype}};
  1610.       $subexpr =~ s/ntype/subtype/g;
  1611.       $subexpr =~ s/\$arg/ST(ix_$var)/g;
  1612. ***************
  1613. *** 743,748 ****
  1614. --- 836,843 ----
  1615.       } else {
  1616.           blurt("Error: '$type' not in typemap"), return
  1617.           unless defined($type_kind{$type});
  1618. +             blurt("Error: No OUTPUT definition for type '$type' found"), return
  1619. +                 unless defined $output_expr{$type_kind{$type}} ;
  1620.           ($ntype = $type) =~ s/\s*\*/Ptr/g;
  1621.           $ntype =~ s/\(\)//g;
  1622.           $subtype = $ntype;
  1623. ***************
  1624. *** 750,755 ****
  1625. --- 845,854 ----
  1626.           $subtype =~ s/Array$//;
  1627.           $expr = $output_expr{$type_kind{$type}};
  1628.           if ($expr =~ /DO_ARRAY_ELEM/) {
  1629. +             blurt("Error: '$subtype' not in typemap"), return
  1630. +             unless defined($type_kind{$subtype});
  1631. +                 blurt("Error: No OUTPUT definition for type '$subtype' found"), return
  1632. +                     unless defined $output_expr{$type_kind{$subtype}} ;
  1633.           $subexpr = $output_expr{$type_kind{$subtype}};
  1634.           $subexpr =~ s/ntype/subtype/g;
  1635.           $subexpr =~ s/\$arg/ST(ix_$var)/g;
  1636. ***************
  1637. *** 771,782 ****
  1638.           elsif ($arg =~ /^ST\(\d+\)$/) {
  1639.           eval "print qq\a$expr\a";
  1640.           }
  1641. -         elsif ($arg =~ /^ST\(\d+\)$/) {
  1642. -         eval "print qq\a$expr\a";
  1643. -         }
  1644. -         elsif ($arg =~ /^ST\(\d+\)$/) {
  1645. -         eval "print qq\a$expr\a";
  1646. -         }
  1647.       }
  1648.   }
  1649.   
  1650. --- 870,875 ----
  1651. ***************
  1652. *** 794,797 ****
  1653.   # If this is VMS, the exit status has meaning to the shell, so we
  1654.   # use a predictable value (SS$_Abort) rather than an arbitrary
  1655.   # number.
  1656. ! exit $Is_VMS ? 44 : $errors;
  1657. --- 887,890 ----
  1658.   # If this is VMS, the exit status has meaning to the shell, so we
  1659.   # use a predictable value (SS$_Abort) rather than an arbitrary
  1660.   # number.
  1661. ! exit ($Is_VMS ? 44 : $errors) ;
  1662. Index: lib/I18N/Collate.pm
  1663. *** perl5.001i/lib/I18N/Collate.pm    Thu May 25 11:30:29 1995
  1664. --- perl5.001j/lib/I18N/Collate.pm    Fri Jun  2 11:30:49 1995
  1665. ***************
  1666. *** 23,36 ****
  1667.   
  1668.   to extract the data itself, you'll need a dereference: $$s1
  1669.   
  1670. ! This uses POSIX::setlocale The basic collation conversion is done by
  1671.   strxfrm() which terminates at NUL characters being a decent C routine.
  1672.   collate_xfrm() handles embedded NUL characters gracefully.  Due to C<cmp>
  1673.   and overload magic, C<lt>, C<le>, C<eq>, C<ge>, and C<gt> work also.  The
  1674.   available locales depend on your operating system; try whether C<locale
  1675. ! -a> shows them or the more direct approach C<ls /usr/lib/nls/loc> or C<ls
  1676. ! /usr/lib/nls>.  The locale names are probably something like
  1677. ! "xx_XX.(ISO)?8859-N".
  1678.   
  1679.   =cut
  1680.   
  1681. --- 23,43 ----
  1682.   
  1683.   to extract the data itself, you'll need a dereference: $$s1
  1684.   
  1685. ! This uses POSIX::setlocale. The basic collation conversion is done by
  1686.   strxfrm() which terminates at NUL characters being a decent C routine.
  1687.   collate_xfrm() handles embedded NUL characters gracefully.  Due to C<cmp>
  1688.   and overload magic, C<lt>, C<le>, C<eq>, C<ge>, and C<gt> work also.  The
  1689.   available locales depend on your operating system; try whether C<locale
  1690. ! -a> shows them or man pages for "locale" or "nlsinfo" or
  1691. ! the direct approach C<ls /usr/lib/nls/loc> or C<ls
  1692. ! /usr/lib/nls>.  Not all the locales that your vendor supports
  1693. ! are necessarily installed: please consult your operating system's
  1694. ! documentation.
  1695. ! The locale names are probably something like
  1696. ! C<"xx_XX.(ISO)?8859-N"> or C<"xx_XX.(ISO)?8859N">, for example
  1697. ! C<"fr_CH.ISO8859-1"> is the Swiss (CH) variant of French (fr),
  1698. ! ISO Latin (8859) 1 (-1) which is the Western European character set.
  1699.   
  1700.   =cut
  1701.   
  1702. ***************
  1703. *** 54,60 ****
  1704.   # Overloads:    cmp # 3)
  1705.   #
  1706.   # Usage:    use Collate;
  1707. ! #            setlocale(&LC_COLLATE, 'locale-of-your-choice'); # 4)
  1708.   #        $s1 = new Collate "scalar_data_1";
  1709.   #        $s2 = new Collate "scalar_data_2";
  1710.   #        
  1711. --- 61,67 ----
  1712.   # Overloads:    cmp # 3)
  1713.   #
  1714.   # Usage:    use Collate;
  1715. ! #            setlocale(LC_COLLATE, 'locale-of-your-choice'); # 4)
  1716.   #        $s1 = new Collate "scalar_data_1";
  1717.   #        $s2 = new Collate "scalar_data_2";
  1718.   #        
  1719. ***************
  1720. *** 68,79 ****
  1721.   #           collate_xfrm handles embedded NUL characters gracefully.
  1722.   #        3) due to cmp and overload magic, lt le eq ge gt work also
  1723.   #        4) the available locales depend on your operating system;
  1724. ! #           try whether "locale -a" shows them or the more direct
  1725.   #           approach "ls /usr/lib/nls/loc" or "ls /usr/lib/nls".
  1726.   #           The locale names are probably something like
  1727. ! #           'xx_XX.(ISO)?8859-N'.
  1728.   #
  1729. ! # Updated:    19940913 1341 GMT
  1730.   #
  1731.   # ---
  1732.   
  1733. --- 75,93 ----
  1734.   #           collate_xfrm handles embedded NUL characters gracefully.
  1735.   #        3) due to cmp and overload magic, lt le eq ge gt work also
  1736.   #        4) the available locales depend on your operating system;
  1737. ! #           try whether "locale -a" shows them or man pages for
  1738. ! #           "locale" or "nlsinfo" work or the more direct
  1739.   #           approach "ls /usr/lib/nls/loc" or "ls /usr/lib/nls".
  1740. + #           Not all the locales that your vendor supports
  1741. + #           are necessarily installed: please consult your
  1742. + #           operating system's documentation.
  1743.   #           The locale names are probably something like
  1744. ! #           'xx_XX.(ISO)?8859-N' or 'xx_XX.(ISO)?8859N',
  1745. ! #           for example 'fr_CH.ISO8859-1' is the Swiss (CH)
  1746. ! #           variant of French (fr), ISO Latin (8859) 1 (-1)
  1747. ! #           which is the Western European character set.
  1748.   #
  1749. ! # Updated:    19950602 1601 GMT
  1750.   #
  1751.   # ---
  1752.   
  1753. Index: lib/ftp.pl
  1754. Prereq:  1.17 
  1755. *** perl5.001i/lib/ftp.pl    Tue Oct 18 12:36:16 1994
  1756. --- perl5.001j/lib/ftp.pl    Fri Jun  2 11:31:42 1995
  1757. ***************
  1758. *** 89,95 ****
  1759.   #
  1760.   
  1761.   require 'chat2.pl';
  1762. ! require 'socket.ph';
  1763.   
  1764.   
  1765.   package ftp;
  1766. --- 89,95 ----
  1767.   #
  1768.   
  1769.   require 'chat2.pl';
  1770. ! eval "require 'socket.ph'" || eval "require 'sys/socket.ph'" || die "socket.ph missing: $!\n";
  1771.   
  1772.   
  1773.   package ftp;
  1774. Index: lib/getcwd.pl
  1775. *** perl5.001i/lib/getcwd.pl    Tue Oct 18 12:36:19 1994
  1776. --- perl5.001j/lib/getcwd.pl    Fri Jun  2 11:33:24 1995
  1777. ***************
  1778. *** 36,42 ****
  1779.       {
  1780.           do
  1781.           {
  1782. !         unless ($dir = readdir(getcwd'PARENT))            #'))
  1783.           {
  1784.               warn "readdir($dotdots): $!";
  1785.               closedir(getcwd'PARENT);                #');
  1786. --- 36,42 ----
  1787.       {
  1788.           do
  1789.           {
  1790. !         unless (defined ($dir = readdir(getcwd'PARENT)))        #'))
  1791.           {
  1792.               warn "readdir($dotdots): $!";
  1793.               closedir(getcwd'PARENT);                #');
  1794. Index: makeaperl.SH
  1795. *** perl5.001i/makeaperl.SH    Wed Feb 22 14:37:20 1995
  1796. --- perl5.001j/makeaperl.SH    Thu Jun  1 11:20:52 1995
  1797. ***************
  1798. *** 18,24 ****
  1799.   esac
  1800.   echo "Extracting makeaperl (with variable substitutions)"
  1801.   $spitshell >makeaperl <<!GROK!THIS!
  1802. ! #!$bin/perl
  1803.   !GROK!THIS!
  1804.   
  1805.   $spitshell >>makeaperl <<'!NO!SUBS!'
  1806. --- 18,24 ----
  1807.   esac
  1808.   echo "Extracting makeaperl (with variable substitutions)"
  1809.   $spitshell >makeaperl <<!GROK!THIS!
  1810. ! #!$binexp/perl
  1811.   !GROK!THIS!
  1812.   
  1813.   $spitshell >>makeaperl <<'!NO!SUBS!'
  1814. Index: perl.c
  1815. *** perl5.001i/perl.c    Wed May 31 11:40:13 1995
  1816. --- perl5.001j/perl.c    Thu Jun  1 11:38:05 1995
  1817. ***************
  1818. *** 996,1002 ****
  1819.       return s;
  1820.       case 'v':
  1821.       printf("\nThis is perl, version %s\n\n",patchlevel);
  1822. !     fputs("\tUnofficial patchlevel 1i.\n",stdout);
  1823.       fputs("\nCopyright 1987-1994, Larry Wall\n",stdout);
  1824.   #ifdef MSDOS
  1825.       fputs("MS-DOS port Copyright (c) 1989, 1990, Diomidis Spinellis\n",
  1826. --- 996,1002 ----
  1827.       return s;
  1828.       case 'v':
  1829.       printf("\nThis is perl, version %s\n\n",patchlevel);
  1830. !     fputs("\tUnofficial patchlevel 1j.\n",stdout);
  1831.       fputs("\nCopyright 1987-1994, Larry Wall\n",stdout);
  1832.   #ifdef MSDOS
  1833.       fputs("MS-DOS port Copyright (c) 1989, 1990, Diomidis Spinellis\n",
  1834. Index: perldoc.SH
  1835. *** perl5.001i/perldoc.SH    Tue May 30 15:59:09 1995
  1836. --- perl5.001j/perldoc.SH    Mon Jun  5 12:12:27 1995
  1837. ***************
  1838. *** 18,24 ****
  1839.   esac
  1840.   echo "Extracting perldoc (with variable substitutions)"
  1841.   $spitshell >perldoc <<!GROK!THIS!
  1842. ! #!$bin/perl
  1843.   !GROK!THIS!
  1844.   
  1845.   $spitshell >>perldoc <<'!NO!SUBS!'
  1846. --- 18,24 ----
  1847.   esac
  1848.   echo "Extracting perldoc (with variable substitutions)"
  1849.   $spitshell >perldoc <<!GROK!THIS!
  1850. ! #!$binexp/perl
  1851.   !GROK!THIS!
  1852.   
  1853.   $spitshell >>perldoc <<'!NO!SUBS!'
  1854. ***************
  1855. *** 149,155 ****
  1856.   sub searchfor {
  1857.       my($s,@dirs) = @_;
  1858.       $s =~ s!::!/!g;
  1859. !     printf STDERR "looking for $s in @dirs\n";
  1860.       
  1861.       foreach $dir (@dirs) {
  1862.           if( -f "$dir/$s.pod") { return "$dir/$s.pod" }
  1863. --- 149,155 ----
  1864.   sub searchfor {
  1865.       my($s,@dirs) = @_;
  1866.       $s =~ s!::!/!g;
  1867. !     # printf STDERR "looking for $s in @dirs\n";
  1868.       
  1869.       foreach $dir (@dirs) {
  1870.           if( -f "$dir/$s.pod") { return "$dir/$s.pod" }
  1871. Index: pod/perlbot.pod
  1872. *** perl5.001i/pod/perlbot.pod    Mon May  8 15:44:20 1995
  1873. --- perl5.001j/pod/perlbot.pod    Fri Jun  2 16:08:59 1995
  1874. ***************
  1875. *** 1,6 ****
  1876.   =head1 NAME
  1877.   
  1878. ! perlbot - Bag'o Object Tricks For Perl5 (the BOT)
  1879.   
  1880.   =head1 INTRODUCTION
  1881.   
  1882. --- 1,6 ----
  1883.   =head1 NAME
  1884.   
  1885. ! perlbot - Bag'o Object Tricks (the BOT)
  1886.   
  1887.   =head1 INTRODUCTION
  1888.   
  1889. ***************
  1890. *** 8,18 ****
  1891.   appetites about such things as the use of instance variables and the
  1892.   mechanics of object and class relationships.  The reader is encouraged to
  1893.   consult relevant textbooks for discussion of Object Oriented definitions and
  1894. ! methodology.  This is not intended as a comprehensive guide to Perl5's
  1895. ! object oriented features, nor should it be construed as a style guide.
  1896.   
  1897.   The Perl motto still holds:  There's more than one way to do it.
  1898.   
  1899.   =head1 INSTANCE VARIABLES
  1900.   
  1901.   An anonymous array or anonymous hash can be used to hold instance
  1902. --- 8,79 ----
  1903.   appetites about such things as the use of instance variables and the
  1904.   mechanics of object and class relationships.  The reader is encouraged to
  1905.   consult relevant textbooks for discussion of Object Oriented definitions and
  1906. ! methodology.  This is not intended as a tutorial for object-oriented
  1907. ! programming or as a comprehensive guide to Perl's object oriented features,
  1908. ! nor should it be construed as a style guide.
  1909.   
  1910.   The Perl motto still holds:  There's more than one way to do it.
  1911.   
  1912. + =head1 OO SCALING TIPS
  1913. + =over 5
  1914. + =item 1
  1915. + Do not attempt to verify the type of $self.  That'll break if the class is
  1916. + inherited, when the type of $self is valid but its package isn't what you
  1917. + expect.  See rule 5.
  1918. + =item 2
  1919. + If an object-oriented (OO) or indirect-object (IO) syntax was used, then the
  1920. + object is probably the correct type and there's no need to become paranoid
  1921. + about it.  Perl isn't a paranoid language anyway.  If people subvert the OO
  1922. + or IO syntax then they probably know what they're doing and you should let
  1923. + them do it.  See rule 1.
  1924. + =item 3
  1925. + Use the two-argument form of bless().  Let a subclass use your constructor.
  1926. + See L<INHERITING A CONSTRUCTOR>.
  1927. + =item 4
  1928. + The subclass is allowed to know things about its immediate superclass, the
  1929. + superclass is allowed to know nothing about a subclass.
  1930. + =item 5
  1931. + Don't be trigger happy with inheritance.  A "using", "containing", or
  1932. + "delegation" relationship (some sort of aggregation, at least) is often more
  1933. + appropriate.  See L<OBJECT RELATIONSHIPS>, L<USING RELATIONSHIP WITH SDBM>,
  1934. + and L<"DELEGATION">.
  1935. + =item 6
  1936. + The object is the namespace.  Make package globals accessible via the
  1937. + object.  This will remove the guess work about the symbol's home package.
  1938. + See L<CLASS CONTEXT AND THE OBJECT>.
  1939. + =item 7
  1940. + IO syntax is certainly less noisy, but it is also prone to ambiguities which
  1941. + can cause difficult-to-find bugs.  Allow people to use the sure-thing OO
  1942. + syntax, even if you don't like it.
  1943. + =item 8
  1944. + Do not use function-call syntax on a method.  You're going to be bitten
  1945. + someday.  Someone might move that method into a superclass and your code
  1946. + will be broken.  On top of that you're feeding the paranoia in rule 2.
  1947. + =item 9
  1948. + Don't assume you know the home package of a method.  You're making it
  1949. + difficult for someone to override that method.  See L<THINKING OF CODE REUSE>.
  1950. + =back
  1951.   =head1 INSTANCE VARIABLES
  1952.   
  1953.   An anonymous array or anonymous hash can be used to hold instance
  1954. ***************
  1955. *** 26,32 ****
  1956.           my $self = {};
  1957.           $self->{'High'} = $params{'High'};
  1958.           $self->{'Low'}  = $params{'Low'};
  1959. !         bless $self;
  1960.       }
  1961.   
  1962.   
  1963. --- 87,93 ----
  1964.           my $self = {};
  1965.           $self->{'High'} = $params{'High'};
  1966.           $self->{'Low'}  = $params{'Low'};
  1967. !         bless $self, $type;
  1968.       }
  1969.   
  1970.   
  1971. ***************
  1972. *** 38,57 ****
  1973.           my $self = [];
  1974.           $self->[0] = $params{'Left'};
  1975.           $self->[1] = $params{'Right'};
  1976. !         bless $self;
  1977.       }
  1978.   
  1979.       package main;
  1980.   
  1981. !     $a = new Foo ( 'High' => 42, 'Low' => 11 );
  1982.       print "High=$a->{'High'}\n";
  1983.       print "Low=$a->{'Low'}\n";
  1984.   
  1985. !     $b = new Bar ( 'Left' => 78, 'Right' => 40 );
  1986.       print "Left=$b->[0]\n";
  1987.       print "Right=$b->[1]\n";
  1988.   
  1989.   =head1 SCALAR INSTANCE VARIABLES
  1990.   
  1991.   An anonymous scalar can be used when only one instance variable is needed.
  1992. --- 99,117 ----
  1993.           my $self = [];
  1994.           $self->[0] = $params{'Left'};
  1995.           $self->[1] = $params{'Right'};
  1996. !         bless $self, $type;
  1997.       }
  1998.   
  1999.       package main;
  2000.   
  2001. !     $a = Foo->new( 'High' => 42, 'Low' => 11 );
  2002.       print "High=$a->{'High'}\n";
  2003.       print "Low=$a->{'Low'}\n";
  2004.   
  2005. !     $b = Bar->new( 'Left' => 78, 'Right' => 40 );
  2006.       print "Left=$b->[0]\n";
  2007.       print "Right=$b->[1]\n";
  2008.   
  2009.   =head1 SCALAR INSTANCE VARIABLES
  2010.   
  2011.   An anonymous scalar can be used when only one instance variable is needed.
  2012. ***************
  2013. *** 62,73 ****
  2014.           my $type = shift;
  2015.           my $self;
  2016.           $self = shift;
  2017. !         bless \$self;
  2018.       }
  2019.   
  2020.       package main;
  2021.   
  2022. !     $a = new Foo 42;
  2023.       print "a=$$a\n";
  2024.   
  2025.   
  2026. --- 122,133 ----
  2027.           my $type = shift;
  2028.           my $self;
  2029.           $self = shift;
  2030. !         bless \$self, $type;
  2031.       }
  2032.   
  2033.       package main;
  2034.   
  2035. !     $a = Foo->new( 42 );
  2036.       print "a=$$a\n";
  2037.   
  2038.   
  2039. ***************
  2040. *** 81,103 ****
  2041.       package Bar;
  2042.   
  2043.       sub new {
  2044.           my $self = {};
  2045.           $self->{'buz'} = 42;
  2046. !         bless $self;
  2047.       }
  2048.   
  2049.       package Foo;
  2050.       @ISA = qw( Bar );
  2051.   
  2052.       sub new {
  2053. !         my $self = new Bar;
  2054.           $self->{'biz'} = 11;
  2055. !         bless $self;
  2056.       }
  2057.   
  2058.       package main;
  2059.   
  2060. !     $a = new Foo;
  2061.       print "buz = ", $a->{'buz'}, "\n";
  2062.       print "biz = ", $a->{'biz'}, "\n";
  2063.   
  2064. --- 141,165 ----
  2065.       package Bar;
  2066.   
  2067.       sub new {
  2068. +         my $type = shift;
  2069.           my $self = {};
  2070.           $self->{'buz'} = 42;
  2071. !         bless $self, $type;
  2072.       }
  2073.   
  2074.       package Foo;
  2075.       @ISA = qw( Bar );
  2076.   
  2077.       sub new {
  2078. !         my $type = shift;
  2079. !         my $self = Bar->new;
  2080.           $self->{'biz'} = 11;
  2081. !         bless $self, $type;
  2082.       }
  2083.   
  2084.       package main;
  2085.   
  2086. !     $a = Foo->new;
  2087.       print "buz = ", $a->{'buz'}, "\n";
  2088.       print "biz = ", $a->{'biz'}, "\n";
  2089.   
  2090. ***************
  2091. *** 111,133 ****
  2092.       package Bar;
  2093.   
  2094.       sub new {
  2095.           my $self = {};
  2096.           $self->{'buz'} = 42;
  2097. !         bless $self;
  2098.       }
  2099.   
  2100.       package Foo;
  2101.   
  2102.       sub new {
  2103.           my $self = {};
  2104. !         $self->{'Bar'} = new Bar ();
  2105.           $self->{'biz'} = 11;
  2106. !         bless $self;
  2107.       }
  2108.   
  2109.       package main;
  2110.   
  2111. !     $a = new Foo;
  2112.       print "buz = ", $a->{'Bar'}->{'buz'}, "\n";
  2113.       print "biz = ", $a->{'biz'}, "\n";
  2114.   
  2115. --- 173,197 ----
  2116.       package Bar;
  2117.   
  2118.       sub new {
  2119. +         my $type = shift;
  2120.           my $self = {};
  2121.           $self->{'buz'} = 42;
  2122. !         bless $self, $type;
  2123.       }
  2124.   
  2125.       package Foo;
  2126.   
  2127.       sub new {
  2128. +         my $type = shift;
  2129.           my $self = {};
  2130. !         $self->{'Bar'} = Bar->new;
  2131.           $self->{'biz'} = 11;
  2132. !         bless $self, $type;
  2133.       }
  2134.   
  2135.       package main;
  2136.   
  2137. !     $a = Foo->new;
  2138.       print "buz = ", $a->{'Bar'}->{'buz'}, "\n";
  2139.       print "biz = ", $a->{'biz'}, "\n";
  2140.   
  2141. ***************
  2142. *** 154,160 ****
  2143.       @ISA = qw( Bar Baz );
  2144.       @Foo::Inherit::ISA = @ISA;  # Access to overridden methods.
  2145.   
  2146. !     sub new { bless [] }
  2147.       sub grr { print "grumble\n" }
  2148.       sub goo {
  2149.           my $self = shift;
  2150. --- 218,227 ----
  2151.       @ISA = qw( Bar Baz );
  2152.       @Foo::Inherit::ISA = @ISA;  # Access to overridden methods.
  2153.   
  2154. !     sub new {
  2155. !         my $type = shift;
  2156. !         bless [], $type;
  2157. !     }
  2158.       sub grr { print "grumble\n" }
  2159.       sub goo {
  2160.           my $self = shift;
  2161. ***************
  2162. *** 171,197 ****
  2163.   
  2164.       package main;
  2165.   
  2166. !     $foo = new Foo;
  2167.       $foo->mumble;
  2168.       $foo->grr;
  2169.       $foo->goo;
  2170.       $foo->google;
  2171.   
  2172.   
  2173. ! =head1 USING RELATIONSHIP WITH SDBM 
  2174.   
  2175.   This example demonstrates an interface for the SDBM class.  This creates a
  2176.   "using" relationship between the SDBM class and the new class Mydbm.
  2177.   
  2178. -     use SDBM_File;
  2179. -     use POSIX;
  2180.       package Mydbm;
  2181.   
  2182.       sub TIEHASH {
  2183. !         my $self = shift;
  2184.           my $ref  = SDBM_File->new(@_);
  2185. !         bless {'dbm' => $ref};
  2186.       }
  2187.       sub FETCH {
  2188.           my $self = shift;
  2189. --- 238,265 ----
  2190.   
  2191.       package main;
  2192.   
  2193. !     $foo = Foo->new;
  2194.       $foo->mumble;
  2195.       $foo->grr;
  2196.       $foo->goo;
  2197.       $foo->google;
  2198.   
  2199.   
  2200. ! =head1 USING RELATIONSHIP WITH SDBM
  2201.   
  2202.   This example demonstrates an interface for the SDBM class.  This creates a
  2203.   "using" relationship between the SDBM class and the new class Mydbm.
  2204.   
  2205.       package Mydbm;
  2206.   
  2207. +     require SDBM_File;
  2208. +     require TieHash;
  2209. +     @ISA = qw( TieHash );
  2210.       sub TIEHASH {
  2211. !         my $type = shift;
  2212.           my $ref  = SDBM_File->new(@_);
  2213. !         bless {'dbm' => $ref}, $type;
  2214.       }
  2215.       sub FETCH {
  2216.           my $self = shift;
  2217. ***************
  2218. *** 209,214 ****
  2219. --- 277,283 ----
  2220.       }
  2221.   
  2222.       package main;
  2223. +     use Fcntl qw( O_RDWR O_CREAT );
  2224.   
  2225.       tie %foo, Mydbm, "Sdbm", O_RDWR|O_CREAT, 0640;
  2226.       $foo{'bar'} = 123;
  2227. ***************
  2228. *** 230,236 ****
  2229.   
  2230.       package FOO;
  2231.   
  2232. !     sub new { bless {} }
  2233.       sub bar {
  2234.           my $self = shift;
  2235.           $self->FOO::private::BAZ;
  2236. --- 299,308 ----
  2237.   
  2238.       package FOO;
  2239.   
  2240. !     sub new {
  2241. !         my $type = shift;
  2242. !         bless {}, $type;
  2243. !     }
  2244.       sub bar {
  2245.           my $self = shift;
  2246.           $self->FOO::private::BAZ;
  2247. ***************
  2248. *** 253,259 ****
  2249.   
  2250.       package FOO;
  2251.   
  2252. !     sub new { bless {} }
  2253.       sub bar {
  2254.           my $self = shift;
  2255.           $self->FOO::private::BAZ;
  2256. --- 325,334 ----
  2257.   
  2258.       package FOO;
  2259.   
  2260. !     sub new {
  2261. !         my $type = shift;
  2262. !         bless {}, $type;
  2263. !     }
  2264.       sub bar {
  2265.           my $self = shift;
  2266.           $self->FOO::private::BAZ;
  2267. ***************
  2268. *** 267,273 ****
  2269.   
  2270.       package GOOP;
  2271.       @ISA = qw( FOO );
  2272. !     sub new { bless {} }
  2273.   
  2274.       sub BAZ {
  2275.           print "in GOOP::BAZ\n";
  2276. --- 342,351 ----
  2277.   
  2278.       package GOOP;
  2279.       @ISA = qw( FOO );
  2280. !     sub new {
  2281. !         my $type = shift;
  2282. !         bless {}, $type;
  2283. !     }
  2284.   
  2285.       sub BAZ {
  2286.           print "in GOOP::BAZ\n";
  2287. ***************
  2288. *** 284,290 ****
  2289.   
  2290.       package FOO;
  2291.   
  2292. !     sub new { bless {} }
  2293.       sub bar {
  2294.           my $self = shift;
  2295.           $self->BAZ;
  2296. --- 362,371 ----
  2297.   
  2298.       package FOO;
  2299.   
  2300. !     sub new {
  2301. !         my $type = shift;
  2302. !         bless {}, $type;
  2303. !     }
  2304.       sub bar {
  2305.           my $self = shift;
  2306.           $self->BAZ;
  2307. ***************
  2308. *** 297,303 ****
  2309.       package GOOP;
  2310.       @ISA = qw( FOO );
  2311.   
  2312. !     sub new { bless {} }
  2313.       sub BAZ {
  2314.           print "in GOOP::BAZ\n";
  2315.       }
  2316. --- 378,387 ----
  2317.       package GOOP;
  2318.       @ISA = qw( FOO );
  2319.   
  2320. !     sub new {
  2321. !         my $type = shift;
  2322. !         bless {}, $type;
  2323. !     }
  2324.       sub BAZ {
  2325.           print "in GOOP::BAZ\n";
  2326.       }
  2327. ***************
  2328. *** 330,338 ****
  2329.       %fizzle = ( 'Password' => 'XYZZY' );
  2330.   
  2331.       sub new {
  2332.           my $self = {};
  2333.           $self->{'fizzle'} = \%fizzle;
  2334. !         bless $self;
  2335.       }
  2336.   
  2337.       sub enter {
  2338. --- 414,423 ----
  2339.       %fizzle = ( 'Password' => 'XYZZY' );
  2340.   
  2341.       sub new {
  2342. +         my $type = shift;
  2343.           my $self = {};
  2344.           $self->{'fizzle'} = \%fizzle;
  2345. !         bless $self, $type;
  2346.       }
  2347.   
  2348.       sub enter {
  2349. ***************
  2350. *** 353,361 ****
  2351.       %fizzle = ( 'Password' => 'Rumple' );
  2352.   
  2353.       sub new {
  2354.           my $self = Bar->new;
  2355.           $self->{'fizzle'} = \%fizzle;
  2356. !         bless $self;
  2357.       }
  2358.   
  2359.       package main;
  2360. --- 438,447 ----
  2361.       %fizzle = ( 'Password' => 'Rumple' );
  2362.   
  2363.       sub new {
  2364. +         my $type = shift;
  2365.           my $self = Bar->new;
  2366.           $self->{'fizzle'} = \%fizzle;
  2367. !         bless $self, $type;
  2368.       }
  2369.   
  2370.       package main;
  2371. Index: pod/pod2html.SH
  2372. *** perl5.001i/pod/pod2html.SH    Thu Apr 13 10:34:13 1995
  2373. --- perl5.001j/pod/pod2html.SH    Thu Jun  1 11:21:35 1995
  2374. ***************
  2375. *** 17,24 ****
  2376.   echo "Extracting pod/pod2html (with variable substitutions)"
  2377.   rm -f pod2html
  2378.   $spitshell >pod2html <<!GROK!THIS!
  2379. ! #!$bin/perl
  2380. ! eval 'exec $bin/perl -S \$0 \${1+"\$@"}'
  2381.       if \$running_under_some_shell;
  2382.   !GROK!THIS!
  2383.   
  2384. --- 17,24 ----
  2385.   echo "Extracting pod/pod2html (with variable substitutions)"
  2386.   rm -f pod2html
  2387.   $spitshell >pod2html <<!GROK!THIS!
  2388. ! #!$binexp/perl
  2389. ! eval 'exec perl -S \$0 \${1+"\$@"}'
  2390.       if \$running_under_some_shell;
  2391.   !GROK!THIS!
  2392.   
  2393. Index: pod/pod2latex.SH
  2394. *** perl5.001i/pod/pod2latex.SH    Thu Apr 13 12:20:39 1995
  2395. --- perl5.001j/pod/pod2latex.SH    Thu Jun  1 11:21:45 1995
  2396. ***************
  2397. *** 17,24 ****
  2398.   echo "Extracting pod/pod2latex (with variable substitutions)"
  2399.   rm -f pod2latex
  2400.   $spitshell >pod2latex <<!GROK!THIS!
  2401. ! #!$bin/perl
  2402. ! eval 'exec $bin/perl -S \$0 \${1+"\$@"}'
  2403.       if \$running_under_some_shell;
  2404.   !GROK!THIS!
  2405.   
  2406. --- 17,24 ----
  2407.   echo "Extracting pod/pod2latex (with variable substitutions)"
  2408.   rm -f pod2latex
  2409.   $spitshell >pod2latex <<!GROK!THIS!
  2410. ! #!$binexp/perl
  2411. ! eval 'exec perl -S \$0 \${1+"\$@"}'
  2412.       if \$running_under_some_shell;
  2413.   !GROK!THIS!
  2414.   
  2415. Index: pod/pod2man.SH
  2416. Prereq:  1.5 
  2417. *** perl5.001i/pod/pod2man.SH    Thu Apr 13 10:34:04 1995
  2418. --- perl5.001j/pod/pod2man.SH    Thu Jun  1 11:21:53 1995
  2419. ***************
  2420. *** 17,24 ****
  2421.   echo "Extracting pod/pod2man (with variable substitutions)"
  2422.   rm -f pod2man
  2423.   $spitshell >pod2man <<!GROK!THIS!
  2424. ! #!$bin/perl
  2425. ! eval 'exec $bin/perl -S \$0 \${1+"\$@"}'
  2426.       if \$running_under_some_shell;
  2427.   !GROK!THIS!
  2428.   
  2429. --- 17,24 ----
  2430.   echo "Extracting pod/pod2man (with variable substitutions)"
  2431.   rm -f pod2man
  2432.   $spitshell >pod2man <<!GROK!THIS!
  2433. ! #!$binexp/perl
  2434. ! eval 'exec perl -S \$0 \${1+"\$@"}'
  2435.       if \$running_under_some_shell;
  2436.   !GROK!THIS!
  2437.   
  2438. Index: sv.c
  2439. *** perl5.001i/sv.c    Wed May 24 14:27:52 1995
  2440. --- perl5.001j/sv.c    Fri Jun  2 12:03:04 1995
  2441. ***************
  2442. *** 2368,2374 ****
  2443.   I32 append;
  2444.   {
  2445.       register char *bp;        /* we're going to steal some values */
  2446. ! #ifdef USE_STDIO_PTR
  2447.       register I32 cnt;        /*  from the stdio struct and put EVERYTHING */
  2448.       register STDCHAR *ptr;    /*   in the innermost loop into registers */
  2449.       STRLEN bpx;
  2450. --- 2368,2374 ----
  2451.   I32 append;
  2452.   {
  2453.       register char *bp;        /* we're going to steal some values */
  2454. ! #if defined(USE_STDIO_PTR) && defined(STDIO_PTR_LVALUE) && defined(STDIO_CNT_LVALUE)
  2455.       register I32 cnt;        /*  from the stdio struct and put EVERYTHING */
  2456.       register STDCHAR *ptr;    /*   in the innermost loop into registers */
  2457.       STRLEN bpx;
  2458. ***************
  2459. *** 2398,2404 ****
  2460.           }
  2461.       } while (i != EOF);
  2462.       }
  2463. ! #ifdef USE_STDIO_PTR    /* Here is some breathtakingly efficient cheating */
  2464.       cnt = FILE_cnt(fp);            /* get count into register */
  2465.       (void)SvPOK_only(sv);        /* validate pointer */
  2466.       if (SvLEN(sv) - append <= cnt + 1) { /* make sure we have the room */
  2467. --- 2398,2405 ----
  2468.           }
  2469.       } while (i != EOF);
  2470.       }
  2471. ! #if defined(USE_STDIO_PTR) && defined(STDIO_PTR_LVALUE) && defined(STDIO_CNT_LVALUE)
  2472. !     /* Here is some breathtakingly efficient cheating */
  2473.       cnt = FILE_cnt(fp);            /* get count into register */
  2474.       (void)SvPOK_only(sv);        /* validate pointer */
  2475.       if (SvLEN(sv) - append <= cnt + 1) { /* make sure we have the room */
  2476. ***************
  2477. *** 2466,2473 ****
  2478.       *bp = '\0';
  2479.       SvCUR_set(sv, bp - SvPVX(sv));    /* set length */
  2480.   
  2481. ! #else /* !USE_STDIO_PTR */    /* The big, slow, and stupid way */
  2482.       {
  2483.       char buf[8192];
  2484.       register char * bpe = buf + sizeof(buf) - 3;
  2485. --- 2467,2474 ----
  2486.       *bp = '\0';
  2487.       SvCUR_set(sv, bp - SvPVX(sv));    /* set length */
  2488.   
  2489. ! #else /* USE_STDIO_PTR && STDIO_PTR_LVALUE && STDIO_CNT_LVALUE */
  2490. !     /*The big, slow, and stupid way */
  2491.       {
  2492.       char buf[8192];
  2493.       register char * bpe = buf + sizeof(buf) - 3;
  2494. ***************
  2495. *** 2499,2505 ****
  2496.       }
  2497.       }
  2498.   
  2499. ! #endif /* USE_STDIO_PTR */
  2500.   
  2501.       if (rspara) {
  2502.           while (i != EOF) {
  2503. --- 2500,2506 ----
  2504.       }
  2505.       }
  2506.   
  2507. ! #endif /* USE_STDIO_PTR && STDIO_PTR_LVALUE && STDIO_CNT_LVALUE */
  2508.   
  2509.       if (rspara) {
  2510.           while (i != EOF) {
  2511. Index: toke.c
  2512. *** perl5.001i/toke.c    Fri May 26 15:24:57 1995
  2513. --- perl5.001j/toke.c    Mon Jun  5 12:11:34 1995
  2514. ***************
  2515. *** 2366,2372 ****
  2516.               TOKEN('&');
  2517.               }
  2518.               if (lastchar == '-')
  2519. !             warn("Ambiguious use of -%s resolved as -&%s()",
  2520.                   tokenbuf, tokenbuf);
  2521.               last_lop = oldbufptr;
  2522.               last_lop_op = OP_ENTERSUB;
  2523. --- 2366,2372 ----
  2524.               TOKEN('&');
  2525.               }
  2526.               if (lastchar == '-')
  2527. !             warn("Ambiguous use of -%s resolved as -&%s()",
  2528.                   tokenbuf, tokenbuf);
  2529.               last_lop = oldbufptr;
  2530.               last_lop_op = OP_ENTERSUB;
  2531. ***************
  2532. *** 2401,2407 ****
  2533.           if (lastchar && strchr("*%&", lastchar)) {
  2534.               warn("Operator or semicolon missing before %c%s",
  2535.               lastchar, tokenbuf);
  2536. !             warn("Ambiguious use of %c resolved as operator %c",
  2537.               lastchar, lastchar);
  2538.           }
  2539.           TOKEN(WORD);
  2540. --- 2401,2407 ----
  2541.           if (lastchar && strchr("*%&", lastchar)) {
  2542.               warn("Operator or semicolon missing before %c%s",
  2543.               lastchar, tokenbuf);
  2544. !             warn("Ambiguous use of %c resolved as operator %c",
  2545.               lastchar, lastchar);
  2546.           }
  2547.           TOKEN(WORD);
  2548. Index: x2p/find2perl.SH
  2549. *** perl5.001i/x2p/find2perl.SH    Tue Oct 18 12:47:36 1994
  2550. --- perl5.001j/x2p/find2perl.SH    Thu Jun  1 11:22:09 1995
  2551. ***************
  2552. *** 23,29 ****
  2553.   : by putting a backslash in front.  You may delete these comments.
  2554.   rm -f find2perl
  2555.   $spitshell >find2perl <<!GROK!THIS!
  2556. ! #!$bin/perl
  2557.   # 
  2558.   # Modified September 26, 1993 to provide proper handling of years after 1999
  2559.   #   Tom Link <tml+@pitt.edu>
  2560. --- 23,29 ----
  2561.   : by putting a backslash in front.  You may delete these comments.
  2562.   rm -f find2perl
  2563.   $spitshell >find2perl <<!GROK!THIS!
  2564. ! #!$binexp/perl
  2565.   # 
  2566.   # Modified September 26, 1993 to provide proper handling of years after 1999
  2567.   #   Tom Link <tml+@pitt.edu>
  2568. Index: x2p/s2p.SH
  2569. *** perl5.001i/x2p/s2p.SH    Tue Oct 18 12:47:48 1994
  2570. --- perl5.001j/x2p/s2p.SH    Thu Jun  1 11:32:48 1995
  2571. ***************
  2572. *** 24,32 ****
  2573.   : by putting a backslash in front.  You may delete these comments.
  2574.   rm -f s2p
  2575.   $spitshell >s2p <<!GROK!THIS!
  2576. ! #!$bin/perl
  2577.   
  2578. ! eval 'exec $bin/perl -S \$0 \${1+"\$@"}'
  2579.       if \$running_under_some_shell;
  2580.   
  2581.   \$bin = '$bin';
  2582. --- 24,32 ----
  2583.   : by putting a backslash in front.  You may delete these comments.
  2584.   rm -f s2p
  2585.   $spitshell >s2p <<!GROK!THIS!
  2586. ! #!$binexp/perl
  2587.   
  2588. ! eval 'exec perl -S \$0 \${1+"\$@"}'
  2589.       if \$running_under_some_shell;
  2590.   
  2591.   \$bin = '$bin';
  2592. Index: x2p/str.c
  2593. *** perl5.001i/x2p/str.c    Tue May 23 14:12:27 1995
  2594. --- perl5.001j/x2p/str.c    Fri Jun  2 12:01:49 1995
  2595. ***************
  2596. *** 287,293 ****
  2597.   register STR *str;
  2598.   register FILE *fp;
  2599.   {
  2600. ! #ifdef USE_STDIO_PTR        /* Here is some breathtakingly efficient cheating */
  2601.   
  2602.       register char *bp;        /* we're going to steal some values */
  2603.       register int cnt;        /*  from the stdio struct and put EVERYTHING */
  2604. --- 287,294 ----
  2605.   register STR *str;
  2606.   register FILE *fp;
  2607.   {
  2608. ! #if defined(USE_STDIO_PTR) && defined(STDIO_PTR_LVALUE) && defined(STDIO_CNT_LVALUE)
  2609. !     /* Here is some breathtakingly efficient cheating */
  2610.   
  2611.       register char *bp;        /* we're going to steal some values */
  2612.       register int cnt;        /*  from the stdio struct and put EVERYTHING */
  2613. ***************
  2614. *** 339,345 ****
  2615.       *bp = '\0';
  2616.       str->str_cur = bp - str->str_ptr;    /* set length */
  2617.   
  2618. ! #else /* !USE_STDIO_PTR */    /* The big, slow, and stupid way */
  2619.   
  2620.       static char buf[4192];
  2621.   
  2622. --- 340,347 ----
  2623.       *bp = '\0';
  2624.       str->str_cur = bp - str->str_ptr;    /* set length */
  2625.   
  2626. ! #else /* USE_STDIO_PTR && STDIO_PTR_LVALUE && STDIO_CNT_LVALUE */
  2627. !     /* The big, slow, and stupid way */
  2628.   
  2629.       static char buf[4192];
  2630.   
  2631. ***************
  2632. *** 348,354 ****
  2633.       else
  2634.       str_set(str, No);
  2635.   
  2636. ! #endif /* USE_STDIO_PTR */
  2637.   
  2638.       return str->str_cur ? str->str_ptr : Nullch;
  2639.   }
  2640. --- 350,356 ----
  2641.       else
  2642.       str_set(str, No);
  2643.   
  2644. ! #endif /* USE_STDIO_PTR && STDIO_PTR_LVALUE && STDIO_CNT_LVALUE */
  2645.   
  2646.       return str->str_cur ? str->str_ptr : Nullch;
  2647.   }
  2648.  
  2649.  
  2650. End of patch.
  2651.  
  2652.