home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
perl501m.zip
/
patches
/
patch.1j
< prev
next >
Wrap
Text File
|
1995-06-05
|
76KB
|
2,731 lines
# This is my patch patch.1j for perl5.001. See description below.
# Andy Dougherty doughera@lafcol.lafayette.edu
#
exit 0 # In case someone runs sh on this patch.
This is my patch patch.1j for perl5.001.
To apply, change to your perl directory and apply with
patch -p1 -N < thispatch.
After you apply this patch, I would recommend:
rm config.sh
sh Configure [whatever options you use]
make depend
make
make test
Here are the highlights:
Linux fixes: Now correctly sets & uses stdio _ptr and _cnt
tricks only when feasible (Configure, config_h.SH, config_H,
doio.c, sv.c x2p/str.c)
#!path-to-perl fixed to use $binexp instead of $bin. This should
really be fixed to do the correct perl start-up stuff. Volunteers?
(c2ph.SH, h2ph.SH, h2xs.SH, makeaperl.SH, perldoc.SH,
pod/pod2*.SH, x2p/find2perl.SH, x2p/s2p.SH)
hint updates: hints/apollo.sh, hints/linux.sh, hints/freebsd.sh,
hints/sco_3.sh.
xsubpp version 1.7. (includes CASE support)
pod/perlbot updates.
my lib/AutoLoader patch (to use @INC).
[ON]DBM_File/Makefile.PL now have a few hint files.
Other sundry small things.
Patch and enjoy,
Andy Dougherty doughera@lafcol.lafayette.edu
Dept. of Physics
Lafayette College Easton, PA 18042
Here's the file-by-file breakdown of what's included:
Configure
Checks if File_ptr(fp) and File_cnt(fp) can be assigned to.
Fix typo: s/sytem/system/
MANIFEST
Include new extension hint files.
README
Some clarifications, thanks to John Stoeffel. Tell users how to
not use dynamic loading.
c2ph.SH
Use $binexp instead of $bin.
config_H
Updated to match config_h.SH.
config_h.SH
Include defines for whether File_ptr(fp) and File_cnt(fp)
can be assigned to.
doio.c
Use defines for whether File_ptr(fp) and File_cnt(fp) can be assigned to.
ext/DynaLoader/DynaLoader.pm
Improve error messages and a little documentation.
ext/NDBM_File/hints/solaris.pl
New hint file.
ext/ODBM_File/Makefile.PL
Removed -ldbm.nfs, since it's now in the sco hint file.
ext/ODBM_File/hints/sco.pl
ext/ODBM_File/hints/solaris.pl
ext/ODBM_File/hints/svr4.pl
New hint files.
h2ph.SH
h2xs.SH
Use $binexp instead of $bin.
hints/apollo.sh
hints/freebsd.sh
hints/linux.sh
hints/sco_3.sh
Updated.
lib/AutoLoader.pm
Eliminate else clause in sub import.
Handle case where @INC contains relative paths.
lib/ExtUtils/xsubpp
Update to version 1.7. This includes CASE support.
lib/I18N/Collate.pm
Updated documentation.
lib/ftp.pl
Look for socket.ph or sys/socket.ph
lib/getcwd.pl
Use defined().
makeaperl.SH
Use $binexp instead of $bin.
perl.c
fputs("\tUnofficial patchlevel 1j.\n",stdout);
perldoc.SH
Use $binexp instead of $bin.
Turn off debugging messages.
pod/perlbot.pod
Updated.
pod/pod2html.SH
pod/pod2latex.SH
pod/pod2man.SH
Use $binexp instead of $bin.
sv.c
Use defines for whether File_ptr(fp) and File_cnt(fp) can be assigned to.
toke.c
Fix spelling of ambiguous.
x2p/find2perl.SH
x2p/s2p.SH
Use $binexp instead of $bin.
x2p/str.c
Use defines for whether File_ptr(fp) and File_cnt(fp) can be assigned to.
Index: Configure
Prereq: 3.0.1.7
*** perl5.001i/Configure Wed May 31 09:19:09 1995
--- perl5.001j/Configure Mon Jun 5 12:23:03 1995
***************
*** 20,26 ****
# $Id: Head.U,v 3.0.1.7 1995/03/21 08:46:15 ram Exp $
#
! # Generated on Wed May 31 09:14:05 EDT 1995 [metaconfig 3.0 PL55]
cat >/tmp/c1$$ <<EOF
ARGGGHHHH!!!!!
--- 20,26 ----
# $Id: Head.U,v 3.0.1.7 1995/03/21 08:46:15 ram Exp $
#
! # Generated on Mon Jun 5 12:18:53 EDT 1995 [metaconfig 3.0 PL55]
cat >/tmp/c1$$ <<EOF
ARGGGHHHH!!!!!
***************
*** 349,354 ****
--- 349,356 ----
sockethdr=''
socketlib=''
d_statblks=''
+ d_stdio_cnt_lval=''
+ d_stdio_ptr_lval=''
d_stdiobase=''
d_stdstdio=''
stdio_base=''
***************
*** 5610,5632 ****
if $contains '_IO_fpos_t' `./findhdr stdio.h` >/dev/null 2>&1 ; then
echo "(Looks like you have stdio.h from Linux.)"
case "$stdio_ptr" in
! '') stdio_ptr='((fp)->_IO_read_ptr)';;
esac
case "$stdio_cnt" in
! '') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)';;
esac
case "$stdio_base" in
'') stdio_base='((fp)->_IO_read_base)';;
esac
case "$stdio_bufsiz" in
! '') stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base))';;
esac
else
case "$stdio_ptr" in
! '') stdio_ptr='((fp)->_ptr)';;
esac
case "$stdio_cnt" in
! '') stdio_cnt='((fp)->_cnt)';;
esac
case "$stdio_base" in
'') stdio_base='((fp)->_base)';;
--- 5612,5642 ----
if $contains '_IO_fpos_t' `./findhdr stdio.h` >/dev/null 2>&1 ; then
echo "(Looks like you have stdio.h from Linux.)"
case "$stdio_ptr" in
! '') stdio_ptr='((fp)->_IO_read_ptr)'
! ptr_lval=$define
! ;;
esac
case "$stdio_cnt" in
! '') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
! cnt_lval=$undef
! ;;
esac
case "$stdio_base" in
'') stdio_base='((fp)->_IO_read_base)';;
esac
case "$stdio_bufsiz" in
! '') stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)';;
esac
else
case "$stdio_ptr" in
! '') stdio_ptr='((fp)->_ptr)'
! ptr_lval=$define
! ;;
esac
case "$stdio_cnt" in
! '') stdio_cnt='((fp)->_cnt)'
! cnt_lval=$define
! ;;
esac
case "$stdio_base" in
'') stdio_base='((fp)->_base)';;
***************
*** 5667,5672 ****
--- 5677,5702 ----
set d_stdstdio
eval $setvar
+ : Can _ptr be used as an lvalue. Only makes sense if we
+ : have a known stdio implementation.
+ case "$d_stdstdio" in
+ $define) val=$ptr_lval ;;
+ *) val=$undef ;;
+ esac
+ set d_stdio_ptr_lval
+ eval $setvar
+
+
+ : Can _cnt be used as an lvalue. Only makes sense if we
+ : have a known stdio implementation.
+ case "$d_stdstdio" in
+ $define) val=$cnt_lval ;;
+ *) val=$undef ;;
+ esac
+ set d_stdio_cnt_lval
+ eval $setvar
+
+
: see if _base is also standard
val="$undef"
case "$d_stdstdio" in
***************
*** 5834,5840 ****
eval $typedef
dflt="$clocktype"
echo " "
! rp="What type is returned by times() on this sytem?"
. ./myread
clocktype="$ans"
else
--- 5864,5870 ----
eval $typedef
dflt="$clocktype"
echo " "
! rp="What type is returned by times() on this system?"
. ./myread
clocktype="$ans"
else
***************
*** 7472,7478 ****
eval $typedef
dflt="$timetype"
echo " "
! rp="What type is returned by time() on this sytem?"
. ./myread
timetype="$ans"
else
--- 7502,7508 ----
eval $typedef
dflt="$timetype"
echo " "
! rp="What type is returned by time() on this system?"
. ./myread
timetype="$ans"
else
***************
*** 8174,8179 ****
--- 8204,8211 ----
d_socket='$d_socket'
d_sockpair='$d_sockpair'
d_statblks='$d_statblks'
+ d_stdio_cnt_lval='$d_stdio_cnt_lval'
+ d_stdio_ptr_lval='$d_stdio_ptr_lval'
d_stdiobase='$d_stdiobase'
d_stdstdio='$d_stdstdio'
d_strchr='$d_strchr'
Index: MANIFEST
*** perl5.001i/MANIFEST Tue May 30 13:45:16 1995
--- perl5.001j/MANIFEST Mon Jun 5 14:14:23 1995
***************
*** 107,116 ****
--- 107,120 ----
ext/NDBM_File/Makefile.PL NDBM extension makefile writer
ext/NDBM_File/NDBM_File.pm NDBM extension Perl module
ext/NDBM_File/NDBM_File.xs NDBM extension external subroutines
+ ext/NDBM_File/hints/solaris.pl Hint for NDBM_File for named architecture
ext/NDBM_File/typemap NDBM extension interface types
ext/ODBM_File/Makefile.PL ODBM extension makefile writer
ext/ODBM_File/ODBM_File.pm ODBM extension Perl module
ext/ODBM_File/ODBM_File.xs ODBM extension external subroutines
+ ext/ODBM_File/hints/sco.pl Hint for ODBM_File for named architecture
+ ext/ODBM_File/hints/solaris.pl Hint for ODBM_File for named architecture
+ ext/ODBM_File/hints/svr4.pl Hint for ODBM_File for named architecture
ext/ODBM_File/typemap ODBM extension interface types
ext/POSIX/Makefile.PL POSIX extension makefile writer
ext/POSIX/POSIX.pm POSIX extension Perl module
Index: README
*** perl5.001i/README Tue May 30 16:00:51 1995
--- perl5.001j/README Fri Jun 2 11:38:22 1995
***************
*** 68,92 ****
run ok, the defaults will usually be right. It will then proceed to
make config.h, config.sh, and Makefile. You may have to explicitly
say sh Configure to ensure that Configure is run under sh.
! If you're a hotshot, run Configure -d to take all the defaults,
! edit config.sh to patch up any flaws, and then run Configure -S.
Configure supports a number of useful options. Run Configure -h
to get a listing. To compile with gcc, for example, you can run
Configure -Dcc=gcc, or answer 'gcc' at the cc prompt.
! If you wish to use gcc (or another alternative compiler))
you should use Configure -Dcc=gcc. That way, the the hints
files can set appropriate defaults.
If you change compilers or make other significant changes, you should
probably _not_ re-use your old config.sh. Simply remove it or
! rename it, e.g. mv config.sh config.sh.old.
!
! By default, perl will be installed in /usr/local/{bin, lib, man}.
! You can specify a different prefix for the default installation
! directory, when Configure prompts you or by using something like
! Configure -Dprefix=/whatever.
You can also supply a file config.over to over-ride Configure's
guesses. It will get loaded up at the very end, just before
--- 68,101 ----
run ok, the defaults will usually be right. It will then proceed to
make config.h, config.sh, and Makefile. You may have to explicitly
say sh Configure to ensure that Configure is run under sh.
! If you're a hotshot, run Configure -d to take all the defaults
! and edit config.sh to patch up any flaws.
!
! If you later make any changes to config.sh, you should propagate
! them to all the .SH files by running Configure -S.
Configure supports a number of useful options. Run Configure -h
to get a listing. To compile with gcc, for example, you can run
Configure -Dcc=gcc, or answer 'gcc' at the cc prompt.
! If you wish to use gcc (or another alternative compiler)
you should use Configure -Dcc=gcc. That way, the the hints
files can set appropriate defaults.
+
+ By default, perl will be installed in /usr/local/{bin, lib, man}.
+ You can specify a different 'prefix' for the default installation
+ directory, when Configure prompts you or by using the Configure
+ command line option -Dprefix='/some/directory'.
+ By default, perl will use dynamic extensions if your system
+ supports it. If you want to force perl to be compiled statically,
+ you can either choose this when Configure prompts you or by using
+ the Configure command line option -Uusedl
+
If you change compilers or make other significant changes, you should
probably _not_ re-use your old config.sh. Simply remove it or
! rename it, e.g. mv config.sh config.sh.old. Then rerun Configure
! with the options you want to use.
You can also supply a file config.over to over-ride Configure's
guesses. It will get loaded up at the very end, just before
***************
*** 106,112 ****
can be done in cflags.SH. For instance, to turn off the optimizer
on toke.c, find the line in the switch structure for toke.c and
put the command optimize='-g' before the ;;. To change the C flags
! for all the files, edit config.sh and change either $ccflags or $optimize.
3) make depend
--- 115,123 ----
can be done in cflags.SH. For instance, to turn off the optimizer
on toke.c, find the line in the switch structure for toke.c and
put the command optimize='-g' before the ;;. To change the C flags
! for all the files, edit config.sh and change either $ccflags or $optimize,
! and then re-run Configure -S ; make depend.
!
3) make depend
Index: c2ph.SH
*** perl5.001i/c2ph.SH Tue Oct 18 12:18:34 1994
--- perl5.001j/c2ph.SH Thu Jun 1 11:20:10 1995
***************
*** 21,27 ****
: by putting a backslash in front. You may delete these comments.
rm -f c2ph
$spitshell >c2ph <<!GROK!THIS!
! #!$bin/perl
#
!GROK!THIS!
--- 21,27 ----
: by putting a backslash in front. You may delete these comments.
rm -f c2ph
$spitshell >c2ph <<!GROK!THIS!
! #!$binexp/perl
#
!GROK!THIS!
Index: config_H
Prereq: 3.0.1.3
*** perl5.001i/config_H Tue May 30 16:01:51 1995
--- perl5.001j/config_H Mon Jun 5 12:19:31 1995
***************
*** 14,20 ****
* $Id: Config_h.U,v 3.0.1.3 1995/01/30 14:25:39 ram Exp $
*/
! /* Configuration time: Tue May 30 13:05:37 EDT 1995
* Configured by: andy
* Target system: crystal crystal 3.2 2 i386
*/
--- 14,20 ----
* $Id: Config_h.U,v 3.0.1.3 1995/01/30 14:25:39 ram Exp $
*/
! /* Configuration time: Fri Jun 2 14:50:10 EDT 1995
* Configured by: andy
* Target system: crystal crystal 3.2 2 i386
*/
***************
*** 758,771 ****
--- 758,781 ----
* FILE structure pointed to by its argument. This macro will always be
* defined if USE_STDIO_PTR is defined.
*/
+ /* STDIO_PTR_LVALUE:
+ * This symbol is defined if the FILE_ptr macro can be used as an
+ * lvalue.
+ */
/* FILE_cnt:
* This macro is used to access the _cnt field (or equivalent) of the
* FILE structure pointed to by its argument. This macro will always be
* defined if USE_STDIO_PTR is defined.
*/
+ /* STDIO_CNT_LVALUE:
+ * This symbol is defined if the FILE_cnt macro can be used as an
+ * lvalue.
+ */
#ifdef USE_STDIO_PTR
#define FILE_ptr(fp) ((fp)->_ptr)
+ #define STDIO_PTR_LVALUE
#define FILE_cnt(fp) ((fp)->_cnt)
+ #define STDIO_CNT_LVALUE
#endif
/* FILE_base:
Index: config_h.SH
Prereq: 3.0.1.3
*** perl5.001i/config_h.SH Wed May 31 09:19:09 1995
--- perl5.001j/config_h.SH Mon Jun 5 12:23:03 1995
***************
*** 772,785 ****
--- 772,795 ----
* FILE structure pointed to by its argument. This macro will always be
* defined if USE_STDIO_PTR is defined.
*/
+ /* STDIO_PTR_LVALUE:
+ * This symbol is defined if the FILE_ptr macro can be used as an
+ * lvalue.
+ */
/* FILE_cnt:
* This macro is used to access the _cnt field (or equivalent) of the
* FILE structure pointed to by its argument. This macro will always be
* defined if USE_STDIO_PTR is defined.
*/
+ /* STDIO_CNT_LVALUE:
+ * This symbol is defined if the FILE_cnt macro can be used as an
+ * lvalue.
+ */
#ifdef USE_STDIO_PTR
#define FILE_ptr(fp) $stdio_ptr
+ #$d_stdio_ptr_lval STDIO_PTR_LVALUE
#define FILE_cnt(fp) $stdio_cnt
+ #$d_stdio_cnt_lval STDIO_CNT_LVALUE
#endif
/* FILE_base:
Index: doio.c
*** perl5.001i/doio.c Thu May 18 15:31:16 1995
--- perl5.001j/doio.c Fri Jun 2 12:00:23 1995
***************
*** 577,583 ****
(void)ungetc(ch, IoIFP(io));
return FALSE;
}
! #ifdef USE_STDIO_PTR
if (FILE_cnt(IoIFP(io)) < -1)
FILE_cnt(IoIFP(io)) = -1;
#endif
--- 577,583 ----
(void)ungetc(ch, IoIFP(io));
return FALSE;
}
! #if defined(USE_STDIO_PTR) && defined(STDIO_CNT_LVALUE)
if (FILE_cnt(IoIFP(io)) < -1)
FILE_cnt(IoIFP(io)) = -1;
#endif
Index: ext/DynaLoader/DynaLoader.pm
*** perl5.001i/ext/DynaLoader/DynaLoader.pm Thu May 25 11:45:15 1995
--- perl5.001j/ext/DynaLoader/DynaLoader.pm Fri Jun 2 13:59:28 1995
***************
*** 9,33 ****
=head1 SYNOPSIS
require DynaLoader;
! push (@ISA, 'DynaLoader');
=head1 DESCRIPTION
! This specification defines a standard generic interface to the dynamic
linking mechanisms available on many platforms. Its primary purpose is
to implement automatic dynamic loading of Perl modules.
The DynaLoader is designed to be a very simple high-level
interface that is sufficiently general to cover the requirements
of SunOS, HP-UX, NeXT, Linux, VMS and other platforms.
! It is also hoped that the interface will cover the needs of OS/2,
! NT etc and allow pseudo-dynamic linking (using C<ld -A> at runtime).
!
! This document serves as both a specification for anyone wishing to
! implement the DynaLoader for a new platform and as a guide for
! anyone wishing to use the DynaLoader directly in an application.
It must be stressed that the DynaLoader, by itself, is practically
useless for accessing non-Perl libraries because it provides almost no
--- 9,33 ----
=head1 SYNOPSIS
require DynaLoader;
! @ISA = qw(... DynaLoader ...);
=head1 DESCRIPTION
! This document defines a standard generic interface to the dynamic
linking mechanisms available on many platforms. Its primary purpose is
to implement automatic dynamic loading of Perl modules.
+ This document serves as both a specification for anyone wishing to
+ implement the DynaLoader for a new platform and as a guide for
+ anyone wishing to use the DynaLoader directly in an application.
+
The DynaLoader is designed to be a very simple high-level
interface that is sufficiently general to cover the requirements
of SunOS, HP-UX, NeXT, Linux, VMS and other platforms.
! It is also hoped that the interface will cover the needs of OS/2, NT
! etc and also allow pseudo-dynamic linking (using C<ld -A> at runtime).
It must be stressed that the DynaLoader, by itself, is practically
useless for accessing non-Perl libraries because it provides almost no
***************
*** 153,160 ****
and "$name".
If any directories are included in @names they are searched before
! @dl_library_path. Directories may be specified as B<-Ldir>. Any other names
! are treated as filenames to be searched for.
Using arguments of the form C<-Ldir> and C<-lname> is recommended.
--- 153,160 ----
and "$name".
If any directories are included in @names they are searched before
! @dl_library_path. Directories may be specified as B<-Ldir>. Any other
! names are treated as filenames to be searched for.
Using arguments of the form C<-Ldir> and C<-lname> is recommended.
***************
*** 174,181 ****
To support these systems a dl_expandspec() function can be implemented
either in the F<dl_*.xs> file or code can be added to the autoloadable
! dl_expandspec(0 function in F<DynaLoader.pm>). See F<DynaLoader.pm> for more
! information.
=item dl_load_file()
--- 174,181 ----
To support these systems a dl_expandspec() function can be implemented
either in the F<dl_*.xs> file or code can be added to the autoloadable
! dl_expandspec() function in F<DynaLoader.pm>. See F<DynaLoader.pm> for
! more information.
=item dl_load_file()
***************
*** 232,238 ****
Return a list of symbol names which remain undefined after load_file().
Returns C<()> if not known. Don't worry if your platform does not provide
! a mechanism for this. Most do not need it and hence do not provide it.
=item dl_install_xsub()
--- 232,239 ----
Return a list of symbol names which remain undefined after load_file().
Returns C<()> if not known. Don't worry if your platform does not provide
! a mechanism for this. Most do not need it and hence do not provide it,
! they just return an empty list.
=item dl_install_xsub()
***************
*** 308,322 ****
=head1 AUTHOR
This interface is based on the work and comments of (in no particular
order): Larry Wall, Robert Sanders, Dean Roehrich, Jeff Okamoto, Anno
! Siegel, Thomas Neumann, Paul Marquess, Charles Bailey, and others.
Larry Wall designed the elegant inherited bootstrap mechanism and
implemented the first Perl 5 dynamic loader using it.
- Tim Bunce, 11 August 1994.
-
=cut
#
--- 309,323 ----
=head1 AUTHOR
+ Tim Bunce, 11 August 1994.
+
This interface is based on the work and comments of (in no particular
order): Larry Wall, Robert Sanders, Dean Roehrich, Jeff Okamoto, Anno
! Siegel, Thomas Neumann, Paul Marquess, Charles Bailey, myself and others.
Larry Wall designed the elegant inherited bootstrap mechanism and
implemented the first Perl 5 dynamic loader using it.
=cut
#
***************
*** 328,335 ****
# Quote from Tolkien sugested by Anno Siegel.
#
! # Read ext/DynaLoader/README and DynaLoader.doc for
! # detailed information.
#
# Tim.Bunce@ig.co.uk, August 1994
--- 329,335 ----
# Quote from Tolkien sugested by Anno Siegel.
#
! # Read ext/DynaLoader/README for detailed information.
#
# Tim.Bunce@ig.co.uk, August 1994
***************
*** 394,403 ****
local($module) = $args[0];
local(@dirs, $file);
! croak "Usage: DynaLoader::bootstrap(module)"
! unless ($module);
! croak "Can't load module $module, dynamic loading not available in this perl"
unless defined(&dl_load_file);
print STDERR "DynaLoader::bootstrap($module)\n" if $dl_debug;
--- 394,406 ----
local($module) = $args[0];
local(@dirs, $file);
! confess "Usage: DynaLoader::bootstrap(module)" unless $module;
! # A common error on platforms which don't support dynamic loading.
! # Since it's fatal and potentially confusing we give a detailed message.
! croak("Can't load module $module, dynamic loading not available in this perl.\n".
! " (You may need to build a new perl executable which either supports\n".
! " dynamic loading or has the $module module statically linked into it.)\n")
unless defined(&dl_load_file);
print STDERR "DynaLoader::bootstrap($module)\n" if $dl_debug;
***************
*** 496,504 ****
--- 499,509 ----
# Deal with directories first:
# Using a -L prefix is the preferred option (faster and more robust)
if (m:^-L:){ s/^-L//; push(@dirs, $_); next; }
+
# Otherwise we try to try to spot directories by a heuristic
# (this is a more complicated issue than it first appears)
if (m:/: && -d $_){ push(@dirs, $_); next; }
+
# VMS: we may be using native VMS directry syntax instead of
# Unix emulation, so check this as well
if ($vms && /[:>\]]/ && -d $_){ push(@dirs, $_); next; }
Index: ext/NDBM_File/hints/solaris.pl
*** /dev/null Mon Jun 5 14:53:25 1995
--- perl5.001j/ext/NDBM_File/hints/solaris.pl Mon Jun 5 14:11:03 1995
***************
*** 0 ****
--- 1,3 ----
+ # -lucb has been reported to be fatal for perl5 on Solaris.
+ # Thus we deliberately don't include it here.
+ $att{LIBS} = ["-L/usr/local/lib -lndbm", "-ldbm"];
Index: ext/ODBM_File/Makefile.PL
*** perl5.001i/ext/ODBM_File/Makefile.PL Wed Feb 8 19:43:08 1995
--- perl5.001j/ext/ODBM_File/Makefile.PL Mon Jun 5 15:03:44 1995
***************
*** 1,2 ****
use ExtUtils::MakeMaker;
! WriteMakefile(LIBS => ["-ldbm.nfs", "-ldbm -lucb"]);
--- 1,2 ----
use ExtUtils::MakeMaker;
! WriteMakefile(LIBS => ["-ldbm -lucb"]);
Index: ext/ODBM_File/hints/sco.pl
*** /dev/null Mon Jun 5 14:53:25 1995
--- perl5.001j/ext/ODBM_File/hints/sco.pl Mon Jun 5 14:09:18 1995
***************
*** 0 ****
--- 1,4 ----
+ # Some versions of SCO contain a broken -ldbm library that is missing
+ # dbmclose. Some of those might have a fixed library installed as
+ # -ldbm.nfs.
+ $att{LIBS} = ['-ldbm.nfs', '-ldbm'];
Index: ext/ODBM_File/hints/solaris.pl
*** /dev/null Mon Jun 5 14:53:25 1995
--- perl5.001j/ext/ODBM_File/hints/solaris.pl Mon Jun 5 14:09:18 1995
***************
*** 0 ****
--- 1,3 ----
+ # -lucb has been reported to be fatal for perl5 on Solaris.
+ # Thus we deliberately don't include it here.
+ $att{LIBS} = ['-ldbm'];
Index: ext/ODBM_File/hints/svr4.pl
*** /dev/null Mon Jun 5 14:53:25 1995
--- perl5.001j/ext/ODBM_File/hints/svr4.pl Mon Jun 5 14:09:18 1995
***************
*** 0 ****
--- 1,4 ----
+ # Some SVR4 systems may need to link against routines in -lucb for
+ # odbm. Some may also need to link against -lc to pick up things like
+ # ecvt.
+ $att{LIBS} = ['-ldbm -lucb -lc'];
Index: h2ph.SH
*** perl5.001i/h2ph.SH Sun Mar 12 01:49:00 1995
--- perl5.001j/h2ph.SH Thu Jun 1 11:20:39 1995
***************
*** 21,27 ****
: by putting a backslash in front. You may delete these comments.
rm -f h2ph
$spitshell >h2ph <<!GROK!THIS!
! #!$bin/perl
'di ';
'ds 00 \"';
'ig 00 ';
--- 21,27 ----
: by putting a backslash in front. You may delete these comments.
rm -f h2ph
$spitshell >h2ph <<!GROK!THIS!
! #!$binexp/perl
'di ';
'ds 00 \"';
'ig 00 ';
Index: h2xs.SH
*** perl5.001i/h2xs.SH Wed Feb 22 14:36:55 1995
--- perl5.001j/h2xs.SH Thu Jun 1 11:20:46 1995
***************
*** 18,24 ****
esac
echo "Extracting h2xs (with variable substitutions)"
$spitshell >h2xs <<!GROK!THIS!
! #!$bin/perl
!GROK!THIS!
$spitshell >>h2xs <<'!NO!SUBS!'
--- 18,24 ----
esac
echo "Extracting h2xs (with variable substitutions)"
$spitshell >h2xs <<!GROK!THIS!
! #!$binexp/perl
!GROK!THIS!
$spitshell >>h2xs <<'!NO!SUBS!'
Index: hints/apollo.sh
*** perl5.001i/hints/apollo.sh Tue Oct 18 12:32:32 1994
--- perl5.001j/hints/apollo.sh Fri Jun 2 11:29:54 1995
***************
*** 1,6 ****
! optimize=''
! ccflags='-A cpu,mathchip -W0,-opt,2'
cat <<'EOF'
Some tests may fail unless you use 'chacl -B'. Also, op/stat
test 2 may fail occasionally because Apollo doesn't guarantee
--- 1,20 ----
! # Info from Johann Klasek <jk@auto.tuwien.ac.at>
! # Merged by Andy Dougherty <doughera@lafcol.lafayette.edu>
! # Last revised Fri Jun 2 11:21:27 EDT 1995
+ # uname -a looks like
+ # DomainOS newton 10.4.1 bsd4.3 425t
+
+ # We want to use both BSD includes and some of the features from the
+ # /sys5 includes.
+ ccflags="$ccflags -A cpu,mathchip -I/usr/include -I/sys5/usr/include"
+
+ # These adjustments are necessary (why?) to compile malloc.c.
+ freetype='void'
+ i_malloc='undef'
+ malloctype='void *'
+
+ # This info is left over from perl4.
cat <<'EOF'
Some tests may fail unless you use 'chacl -B'. Also, op/stat
test 2 may fail occasionally because Apollo doesn't guarantee
***************
*** 8,13 ****
--- 22,29 ----
file. Finally, the sleep test will sometimes fail. See the
sleep(3) man page to learn why.
+ See hints/apollo.sh for hints on running h2ph.
+
And a note on ccflags:
Lastly, while -A cpu,mathchip generates optimal code for your DN3500
***************
*** 18,20 ****
--- 34,51 ----
-- Steve Vinoski
EOF
+
+ # Running h2ph, on the other hand, presents a challenge.
+
+ #The perl header files have to be generated with following commands
+
+ #sed 's|/usr/include|/sys5/usr/include|g' h2ph >h2ph.new && chmod +x h2ph.new
+ #(set cdir=`pwd`; cd /sys5/usr/include; $cdir/h2ph.new sys/* )
+ #(set cdir=`pwd`; cd /usr/include; $cdir/h2ph * sys/* machine/*)
+
+ #The SYS5 headers (only sys) are overlayed by the BSD headers. It seems
+ #all ok, but once I am going into details, a lot of limitations from
+ #'h2ph' are coming up. Lines like "#define NODEV (dev_t)(-1)" result in
+ #syntax errors as converted by h2ph.
+
+ # Generally, h2ph might need a lot of help.
Index: hints/freebsd.sh
*** perl5.001i/hints/freebsd.sh Mon May 22 14:23:20 1995
--- perl5.001j/hints/freebsd.sh Fri Jun 2 10:58:00 1995
***************
*** 33,39 ****
;;
1.1*) d_dlopen="$define"
cccdlflags='-DPIC -fpic'
! lddlflags='-Bshareable $lddlflags'
malloctype='void *'
groupstype='int'
d_setregid='undef'
--- 33,39 ----
;;
1.1*) d_dlopen="$define"
cccdlflags='-DPIC -fpic'
! lddlflags="-Bshareable $lddlflags"
malloctype='void *'
groupstype='int'
d_setregid='undef'
***************
*** 44,50 ****
2.0-RELEASE*)
d_dlopen="$define"
cccdlflags='-DPIC -fpic'
! lddlflags='-Bshareable $lddlflags'
d_setregid='undef'
d_setreuid='undef'
d_setrgid='undef'
--- 44,50 ----
2.0-RELEASE*)
d_dlopen="$define"
cccdlflags='-DPIC -fpic'
! lddlflags="-Bshareable $lddlflags"
d_setregid='undef'
d_setreuid='undef'
d_setrgid='undef'
***************
*** 58,64 ****
2.0.5*|2.0-BUILD|2.1*)
d_dlopen="$define"
cccdlflags='-DPIC -fpic'
! lddlflags='-Bshareable $lddlflags'
# Are these defines necessary? Doesn't Configure find them
# correctly?
d_setregid='define'
--- 58,64 ----
2.0.5*|2.0-BUILD|2.1*)
d_dlopen="$define"
cccdlflags='-DPIC -fpic'
! lddlflags="-Bshareable $lddlflags"
# Are these defines necessary? Doesn't Configure find them
# correctly?
d_setregid='define'
Index: hints/linux.sh
*** perl5.001i/hints/linux.sh Tue May 30 14:28:25 1995
--- perl5.001j/hints/linux.sh Fri Jun 2 10:20:55 1995
***************
*** 80,87 ****
You don't have an ELF gcc. I will use dld if possible. If you are
using a version of DLD earlier than 3.2.6, or don't have it at all, you
should probably upgrade. If you are forced to use 3.2.4, you should
! uncomment a couple of lines in hints/linux.sh and rerun Configure to
! disallow shared libraries.
EOM
lddlflags="-r $lddlflags"
--- 80,87 ----
You don't have an ELF gcc. I will use dld if possible. If you are
using a version of DLD earlier than 3.2.6, or don't have it at all, you
should probably upgrade. If you are forced to use 3.2.4, you should
! uncomment a couple of lines in hints/linux.sh and restart Configure so
! that shared libraries will be disallowed.
EOM
lddlflags="-r $lddlflags"
***************
*** 96,118 ****
#ldflags="-static"
#so='none'
fi
- rm -rf try.c a.out
! case "$BASH_VERSION" in
! 1.14.3*)
! cat <<'EOM'
!
! If you get failure of op/exec test #5 during the test phase, you probably
! have a buggy version of bash. Upgrading to a recent version (1.14.4 or
! later) should fix the problem.
EOM
! ;;
! esac
# In addition, on some systems there is a problem with perl and NDBM, which
# causes AnyDBM and NDBM_File to lock up. This is evidenced in the tests as
# AnyDBM just freezing. Currently we disable NDBM for all linux systems.
# If someone can suggest a more robust test, that would be appreciated.
d_dbm_open=undef
--- 96,123 ----
#ldflags="-static"
#so='none'
fi
! rm -f try.c a.out
!
! if /bin/bash -c exit; then
! echo You appear to have a working bash. Good.
! else
! cat << 'EOM'
! Warning: it would appear you have a defective bash shell installed. This is
! likely to give you a failure of op/exec test #5 during the test phase of the
! build, Upgrading to a recent version (1.14.4 or later) should fix the
! problem.
EOM
!
! fi
# In addition, on some systems there is a problem with perl and NDBM, which
# causes AnyDBM and NDBM_File to lock up. This is evidenced in the tests as
# AnyDBM just freezing. Currently we disable NDBM for all linux systems.
# If someone can suggest a more robust test, that would be appreciated.
+ # This will generate a harmless message:
+ # Hmm...You had some extra variables I don't know about...I'll try to keep 'em.
+ # Propagating recommended variable d_dbm_open
d_dbm_open=undef
Index: hints/sco_3.sh
*** perl5.001i/hints/sco_3.sh Tue Apr 11 16:14:41 1995
--- perl5.001j/hints/sco_3.sh Mon Jun 5 11:50:11 1995
***************
*** 39,41 ****
--- 39,45 ----
# If you want to use nm, you'll probably have to use nm -p. The
# following does that for you:
nm_opt='-p'
+
+ # I have received one report that you can't include utime.h in
+ # pp_sys.c. Uncomment the following line if that happens to you:
+ # i_utime=undef
Index: lib/AutoLoader.pm
*** perl5.001i/lib/AutoLoader.pm Thu May 25 14:33:45 1995
--- perl5.001j/lib/AutoLoader.pm Mon Jun 5 14:47:15 1995
***************
*** 43,64 ****
goto &$AUTOLOAD;
}
! sub import
! {
! my ($callclass, $callfile, $callline,$path,$callpack) = caller(0);
! ($callpack = $callclass) =~ s#::#/#;
! if (defined($path = $INC{$callpack . '.pm'}))
! {
! if ($path =~ s#^(.*)$callpack\.pm$#$1auto/$callpack/autosplit.ix# && -e $path)
! {
! eval {require $path};
! carp $@ if ($@);
}
- else
- {
- croak "Have not loaded $callpack.pm";
- }
- }
}
1;
--- 43,72 ----
goto &$AUTOLOAD;
}
! sub import {
! my ($callclass, $callfile, $callline,$path,$callpack) = caller(0);
! ($callpack = $callclass) =~ s#::#/#;
! # Try to find the autosplit index file. Eg., if the call package
! # is POSIX, then $INC{POSIX.pm} is something like
! # '/usr/local/lib/perl5/POSIX.pm', and the autosplit index file is in
! # '/usr/local/lib/perl5/auto/POSIX/autosplit.ix', so we require that.
! #
! # However, if @INC is a relative path, this might not work. If,
! # for example, @INC = ('lib'), then
! # $INC{POSIX.pm} is 'lib/POSIX.pm', and we want to require
! # 'auto/POSIX/autosplit.ix' (without the leading 'lib').
! #
! if (defined($path = $INC{$callpack . '.pm'})) {
! # Try absolute path name.
! $path =~ s#^(.*)$callpack\.pm$#$1auto/$callpack/autosplit.ix#;
! eval { require $path; };
! # If that failed, try relative path with normal @INC searching.
! if ($@) {
! $path ="auto/$callpack/autosplit.ix";
! eval { require $path; };
! }
! carp $@ if ($@);
}
}
1;
Index: lib/ExtUtils/xsubpp
*** perl5.001i/lib/ExtUtils/xsubpp Fri May 26 15:24:22 1995
--- perl5.001j/lib/ExtUtils/xsubpp Mon Jun 5 12:10:44 1995
***************
*** 132,145 ****
When parsing the OUTPUT arguments check that they are all present in
the corresponding input argument definitions.
=head1 SEE ALSO
perl(1)
=cut
# Global Constants
! $XSUBPP_version = "1.4" ;
$usage = "Usage: xsubpp [-C++] [-except] [-typemap typemap] file.xs\n";
--- 132,171 ----
When parsing the OUTPUT arguments check that they are all present in
the corresponding input argument definitions.
+ =head2 1.5
+
+ Changes by Paul Marquess <pmarquess@bfsec.bt.co.uk>, 1 June 1995.
+
+ Started tidy up to allow clean run using C<-w> flag.
+
+ Added some more error checking.
+
+ The CASE: functionality now works.
+
+ =head2 1.6
+
+ Changes by Paul Marquess <pmarquess@bfsec.bt.co.uk>, 3 June 1995.
+
+ Added some more error checking.
+
+ =head2 1.7
+
+ Changes by Paul Marquess <pmarquess@bfsec.bt.co.uk>, 5 June 1995.
+
+ When an error or warning message is printed C<xsubpp> will now attempt
+ to identify the exact line in the C<.xs> file where the fault occurs.
+ This can be achieved in the majority of cases.
+
=head1 SEE ALSO
perl(1)
=cut
+ use FileHandle ;
+
# Global Constants
! $XSUBPP_version = "1.7" ;
$usage = "Usage: xsubpp [-C++] [-except] [-typemap typemap] file.xs\n";
***************
*** 155,162 ****
chop($pwd = `pwd`);
# Check for error message from VMS
if ($pwd =~ /unrecognized command verb/) { $Is_VMS = 1; $pwd = $ENV{DEFAULT} }
! ($dir, $filename) = @ARGV[0] =~ m#(.*)/(.*)#
! or ($dir, $filename) = @ARGV[0] =~ m#(.*[>\]])(.*)#
or ($dir, $filename) = ('.', $ARGV[0]);
chdir($dir);
--- 181,188 ----
chop($pwd = `pwd`);
# Check for error message from VMS
if ($pwd =~ /unrecognized command verb/) { $Is_VMS = 1; $pwd = $ENV{DEFAULT} }
! ($dir, $filename) = $ARGV[0] =~ m#(.*)/(.*)#
! or ($dir, $filename) = $ARGV[0] =~ m#(.*[>\]])(.*)#
or ($dir, $filename) = ('.', $ARGV[0]);
chdir($dir);
***************
*** 196,201 ****
--- 222,228 ----
open(TYPEMAP, $typemap)
or warn ("Warning: could not open typemap file '$typemap': $!\n"), next;
$mode = Typemap;
+ $junk = "" ;
$current = \$junk;
while (<TYPEMAP>) {
next if /^#/;
***************
*** 209,215 ****
# skip blank lines and comment lines
next if /^$/ or /^#/ ;
my @words = split (' ') ;
! blurt("Error: File '$typemap' Line $. '$line' TYPEMAP entry needs 2 columns\n"), next
unless @words >= 2 ;
my $kind = pop @words ;
TrimWhitespace($kind) ;
--- 236,242 ----
# skip blank lines and comment lines
next if /^$/ or /^#/ ;
my @words = split (' ') ;
! warn("Warning: File '$typemap' Line $. '$line' TYPEMAP entry needs 2 columns\n"), next
unless @words >= 2 ;
my $kind = pop @words ;
TrimWhitespace($kind) ;
***************
*** 251,256 ****
--- 278,285 ----
$text;
}
+ open(F, $filename) or die "cannot open $filename: $!\n";
+
# Identify the version of xsubpp used
$TimeStamp = localtime ;
print <<EOM ;
***************
*** 263,270 ****
EOM
- open(F, $filename) or die "cannot open $filename: $!\n";
-
while (<F>) {
last if ($Module, $foo, $Package, $foo1, $Prefix) =
/^MODULE\s*=\s*([\w:]+)(\s+PACKAGE\s*=\s*([\w:]+))?(\s+PREFIX\s*=\s*(\S+))?\s*$/;
--- 292,297 ----
***************
*** 276,281 ****
--- 303,309 ----
sub fetch_para {
# parse paragraph
@line = ();
+ @line_no = () ;
if ($lastline ne "") {
if ($lastline =~
/^MODULE\s*=\s*([\w:]+)(\s+PACKAGE\s*=\s*([\w:]+))?(\s+PREFIX\s*=\s*(\S+))?\s*$/) {
***************
*** 294,303 ****
!/^#[ \t]*(if|ifdef|ifndef|else|elif|endif|define|undef)\b/;
last if /^\S/;
}
! push(@line, $_) if $_ ne "";
}
else {
push(@line, $lastline);
}
$lastline = "";
while (<F>) {
--- 322,332 ----
!/^#[ \t]*(if|ifdef|ifndef|else|elif|endif|define|undef)\b/;
last if /^\S/;
}
! push(@line, $_), push(@line_no, input_line_number F) if $_ ne "";
}
else {
push(@line, $lastline);
+ push(@line_no, $lastline_no) ;
}
$lastline = "";
while (<F>) {
***************
*** 306,323 ****
chop;
if (/^\S/ && @line && $line[-1] eq "") {
$lastline = $_;
last;
}
else {
push(@line, $_);
}
}
! pop(@line) while @line && $line[-1] =~ /^\s*$/;
}
$PPCODE = grep(/PPCODE:/, @line);
scalar @line;
}
while (&fetch_para) {
# initialize info arrays
undef(%args_match);
--- 335,355 ----
chop;
if (/^\S/ && @line && $line[-1] eq "") {
$lastline = $_;
+ $lastline_no = input_line_number F ;
last;
}
else {
push(@line, $_);
+ push(@line_no, input_line_number F) ;
}
}
! pop(@line), pop(@line_no) while @line && $line[-1] =~ /^\s*$/;
}
$PPCODE = grep(/PPCODE:/, @line);
scalar @line;
}
+ PARAGRAPH:
while (&fetch_para) {
# initialize info arrays
undef(%args_match);
***************
*** 332,352 ****
# extract return type, function name and arguments
$ret_type = TidyType(shift(@line));
if ($ret_type =~ /^BOOT:/) {
push (@BootCode, @line, "", "") ;
! next ;
}
if ($ret_type =~ /^static\s+(.*)$/) {
$static = 1;
$ret_type = $1;
}
$func_header = shift(@line);
! ($func_name, $orig_args) = $func_header =~ /^([\w:]+)\s*\((.*)\)$/;
if ($func_name =~ /(.*)::(.*)/) {
$class = $1;
$func_name = $2;
}
($pname = $func_name) =~ s/^($Prefix)?/$Packprefix/;
push(@Func_name, "${Packid}_$func_name");
push(@Func_pname, $pname);
@args = split(/\s*,\s*/, $orig_args);
--- 364,400 ----
# extract return type, function name and arguments
$ret_type = TidyType(shift(@line));
+
if ($ret_type =~ /^BOOT:/) {
push (@BootCode, @line, "", "") ;
! next PARAGRAPH ;
}
+
+ # a function definition needs at least 2 lines
+ blurt ("Error: Function definition too short '$ret_type'"), next PARAGRAPH
+ unless @line ;
+
if ($ret_type =~ /^static\s+(.*)$/) {
$static = 1;
$ret_type = $1;
}
$func_header = shift(@line);
! blurt ("Error: Cannot parse function definition from '$func_header'"), next PARAGRAPH
! unless $func_header =~ /^([\w:]+)\s*\((.*)\)$/;
!
! ($func_name, $orig_args) = ($1, $2) ;
if ($func_name =~ /(.*)::(.*)/) {
$class = $1;
$func_name = $2;
}
+ $Prefix = '' unless defined $Prefix ; # keep -w happy
($pname = $func_name) =~ s/^($Prefix)?/$Packprefix/;
+
+ # Check for duplicate function definition
+ blurt("Error: ignoring duplicate function definition '$func_name'"), next PARAGRAPH
+ if defined $Func_name{"${Packid}_$func_name"} ;
+ $Func_name{"${Packid}_$func_name"} ++ ;
+
push(@Func_name, "${Packid}_$func_name");
push(@Func_pname, $pname);
@args = split(/\s*,\s*/, $orig_args);
***************
*** 368,374 ****
if ($args[$i] =~ s/\.\.\.//) {
$elipsis = 1;
$min_args--;
! if ($args[i] eq '' && $i == $num_args - 1) {
pop(@args);
last;
}
--- 416,422 ----
if ($args[$i] =~ s/\.\.\.//) {
$elipsis = 1;
$min_args--;
! if ($args[$i] eq '' && $i == $num_args - 1) {
pop(@args);
last;
}
***************
*** 421,442 ****
# Now do a block of some sort.
$condnum = 0;
if (!@line) {
@line = "CLEANUP:";
}
while (@line) {
! if ($_[0] =~ s/^\s*CASE\s*:\s*//) {
$cond = shift(@line);
if ($condnum == 0) {
! print " if ($cond)\n";
}
elsif ($cond ne '') {
print " else if ($cond)\n";
}
else {
print " else\n";
}
$condnum++;
}
if ($except) {
--- 469,499 ----
# Now do a block of some sort.
$condnum = 0;
+ $else_cond = 0 ;
if (!@line) {
@line = "CLEANUP:";
}
while (@line) {
! if ($line[0] =~ s/^\s*CASE\s*:\s*//) {
$cond = shift(@line);
+ TrimWhitespace($cond) ;
if ($condnum == 0) {
! # Check $cond is not blank
! blurt("Error: First CASE: needs a condition")
! if $cond eq '' ;
! print " if ($cond)\n"
}
elsif ($cond ne '') {
print " else if ($cond)\n";
}
else {
+ blurt ("Error: Too many CASE: statements without a condition")
+ unless $else_cond ;
+ ++ $else_cond ;
print " else\n";
}
$condnum++;
+ $_ = '' ;
}
if ($except) {
***************
*** 454,459 ****
--- 511,518 ----
$thisdone = 0;
$retvaldone = 0;
$deferred = "";
+ %arg_list = () ;
+ $gotRETVAL = 0;
while (@line) {
$_ = shift(@line);
last if /^\s*NOT_IMPLEMENTED_YET/;
***************
*** 463,470 ****
# skip blank lines
next if /^$/ ;
my $line = $_ ;
# check for optional initialisation code
! my $var_init = $1 if s/\s*(=.*)$// ;
my @words = split (' ') ;
blurt("Error: invalid argument declaration '$line'"), next
--- 522,534 ----
# skip blank lines
next if /^$/ ;
my $line = $_ ;
+
+ # remove trailing semicolon if no initialisation
+ s/\s*;+\s*$//g unless /=/ ;
+
# check for optional initialisation code
! my $var_init = '' ;
! $var_init = $1 if s/\s*(=.*)$// ;
my @words = split (' ') ;
blurt("Error: invalid argument declaration '$line'"), next
***************
*** 472,480 ****
my $var_name = pop @words ;
my $var_type = "@words" ;
- # catch C style argument declaration (this could be made alowable syntax)
- warn("Warning: ignored semicolon in $pname argument declaration '$_'\n")
- if ($var_name =~ s/;//g); # eg SV *<tab>name;
# catch many errors similar to: SV<tab>* name
blurt("Error: invalid $pname argument name '$var_name' (type '$var_type')\n")
unless ($var_name =~ m/^&?\w+$/);
--- 536,541 ----
***************
*** 493,499 ****
print "\t" . &map_type($var_type);
$var_num = $args_match{$var_name};
if ($var_addr{$var_name}) {
! $func_args =~ s/\b($var_name)\b/&\1/;
}
if ($var_init !~ /^=\s*NO_INIT\s*$/) {
if ($var_init !~ /^\s*$/) {
--- 554,560 ----
print "\t" . &map_type($var_type);
$var_num = $args_match{$var_name};
if ($var_addr{$var_name}) {
! $func_args =~ s/\b($var_name)\b/&$1/;
}
if ($var_init !~ /^=\s*NO_INIT\s*$/) {
if ($var_init !~ /^\s*$/) {
***************
*** 536,542 ****
print $deferred;
while (@line) {
$_ = shift(@line);
! die "PPCODE must be last thing"
if /^\s*(OUTPUT|CLEANUP|CASE)\s*:/;
print "$_\n";
}
--- 597,603 ----
print $deferred;
while (@line) {
$_ = shift(@line);
! death ("PPCODE must be last thing")
if /^\s*(OUTPUT|CLEANUP|CASE)\s*:/;
print "$_\n";
}
***************
*** 572,597 ****
$func_name = $2;
}
print "$func_name($func_args);\n";
! $wantRETVAL = 1
! unless $ret_type eq "void";
}
}
# do output variables
if (/^\s*OUTPUT\s*:/) {
! my $gotRETVAL ;
my %outargs ;
while (@line) {
$_ = shift(@line);
! last if /^\s*CLEANUP\s*:/;
TrimWhitespace($_) ;
next if /^$/ ;
my ($outarg, $outcode) = /^(\S+)\s*(.*)/ ;
if (!$gotRETVAL and $outarg eq 'RETVAL') {
# deal with RETVAL last
! push(@line, $_) ;
$gotRETVAL = 1 ;
- undef ($wantRETVAL) ;
next ;
}
blurt ("Error: duplicate OUTPUT argument '$outarg' ignored"), next
--- 633,657 ----
$func_name = $2;
}
print "$func_name($func_args);\n";
! $wantRETVAL = 1 unless $ret_type eq "void";
}
}
# do output variables
if (/^\s*OUTPUT\s*:/) {
! $gotRETVAL = 0;
! my $RETVAL_code ;
my %outargs ;
while (@line) {
$_ = shift(@line);
! last if /^\s*CLEANUP|CASE\s*:/;
TrimWhitespace($_) ;
next if /^$/ ;
my ($outarg, $outcode) = /^(\S+)\s*(.*)/ ;
if (!$gotRETVAL and $outarg eq 'RETVAL') {
# deal with RETVAL last
! $RETVAL_code = $outcode ;
$gotRETVAL = 1 ;
next ;
}
blurt ("Error: duplicate OUTPUT argument '$outarg' ignored"), next
***************
*** 608,618 ****
$outarg);
}
}
}
# all OUTPUT done, so now push the return value on the stack
&generate_output($ret_type, 0, "RETVAL")
! if $wantRETVAL ;
# do cleanup
if (/^\s*CLEANUP\s*:/) {
--- 668,685 ----
$outarg);
}
}
+
+ if ($gotRETVAL) {
+ if ($RETVAL_code)
+ { print "\t$RETVAL_code\n" }
+ else
+ { &generate_output($ret_type, 0, 'RETVAL') }
+ }
}
# all OUTPUT done, so now push the return value on the stack
&generate_output($ret_type, 0, "RETVAL")
! if $wantRETVAL and ! $gotRETVAL ;
# do cleanup
if (/^\s*CLEANUP\s*:/) {
***************
*** 690,696 ****
eval qq/print " $init\\\n"/;
}
! sub blurt { warn @_; $errors++ }
sub generate_init {
local($type, $num, $var) = @_;
--- 757,781 ----
eval qq/print " $init\\\n"/;
}
! sub Warn
! {
! # work out the line number
! my $line_no = $line_no[@line_no - @line -1] ;
!
! print STDERR "@_ in $filename, line $line_no\n" ;
! }
!
! sub blurt
! {
! Warn @_ ;
! $errors ++
! }
!
! sub death
! {
! Warn @_ ;
! exit 1 ;
! }
sub generate_init {
local($type, $num, $var) = @_;
***************
*** 700,706 ****
local($tk);
$type = TidyType($type) ;
! blurt("Error: '$type' not in typemap"), return unless defined($type_kind{$type});
($ntype = $type) =~ s/\s*\*/Ptr/g;
$subtype = $ntype;
$subtype =~ s/Ptr$//;
--- 785,793 ----
local($tk);
$type = TidyType($type) ;
! blurt("Error: '$type' not in typemap"), return
! unless defined($type_kind{$type});
!
($ntype = $type) =~ s/\s*\*/Ptr/g;
$subtype = $ntype;
$subtype =~ s/Ptr$//;
***************
*** 708,715 ****
--- 795,808 ----
$tk = $type_kind{$type};
$tk =~ s/OBJ$/REF/ if $func_name =~ /DESTROY$/;
$type =~ s/:/_/g;
+ blurt("Error: No INPUT definition for type '$type' found"), return
+ unless defined $input_expr{$tk} ;
$expr = $input_expr{$tk};
if ($expr =~ /DO_ARRAY_ELEM/) {
+ blurt("Error: '$subtype' not in typemap"), return
+ unless defined($type_kind{$subtype});
+ blurt("Error: No INPUT definition for type '$subtype' found"), return
+ unless defined $input_expr{$type_kind{$subtype}} ;
$subexpr = $input_expr{$type_kind{$subtype}};
$subexpr =~ s/ntype/subtype/g;
$subexpr =~ s/\$arg/ST(ix_$var)/g;
***************
*** 743,748 ****
--- 836,843 ----
} else {
blurt("Error: '$type' not in typemap"), return
unless defined($type_kind{$type});
+ blurt("Error: No OUTPUT definition for type '$type' found"), return
+ unless defined $output_expr{$type_kind{$type}} ;
($ntype = $type) =~ s/\s*\*/Ptr/g;
$ntype =~ s/\(\)//g;
$subtype = $ntype;
***************
*** 750,755 ****
--- 845,854 ----
$subtype =~ s/Array$//;
$expr = $output_expr{$type_kind{$type}};
if ($expr =~ /DO_ARRAY_ELEM/) {
+ blurt("Error: '$subtype' not in typemap"), return
+ unless defined($type_kind{$subtype});
+ blurt("Error: No OUTPUT definition for type '$subtype' found"), return
+ unless defined $output_expr{$type_kind{$subtype}} ;
$subexpr = $output_expr{$type_kind{$subtype}};
$subexpr =~ s/ntype/subtype/g;
$subexpr =~ s/\$arg/ST(ix_$var)/g;
***************
*** 771,782 ****
elsif ($arg =~ /^ST\(\d+\)$/) {
eval "print qq\a$expr\a";
}
- elsif ($arg =~ /^ST\(\d+\)$/) {
- eval "print qq\a$expr\a";
- }
- elsif ($arg =~ /^ST\(\d+\)$/) {
- eval "print qq\a$expr\a";
- }
}
}
--- 870,875 ----
***************
*** 794,797 ****
# If this is VMS, the exit status has meaning to the shell, so we
# use a predictable value (SS$_Abort) rather than an arbitrary
# number.
! exit $Is_VMS ? 44 : $errors;
--- 887,890 ----
# If this is VMS, the exit status has meaning to the shell, so we
# use a predictable value (SS$_Abort) rather than an arbitrary
# number.
! exit ($Is_VMS ? 44 : $errors) ;
Index: lib/I18N/Collate.pm
*** perl5.001i/lib/I18N/Collate.pm Thu May 25 11:30:29 1995
--- perl5.001j/lib/I18N/Collate.pm Fri Jun 2 11:30:49 1995
***************
*** 23,36 ****
to extract the data itself, you'll need a dereference: $$s1
! This uses POSIX::setlocale The basic collation conversion is done by
strxfrm() which terminates at NUL characters being a decent C routine.
collate_xfrm() handles embedded NUL characters gracefully. Due to C<cmp>
and overload magic, C<lt>, C<le>, C<eq>, C<ge>, and C<gt> work also. The
available locales depend on your operating system; try whether C<locale
! -a> shows them or the more direct approach C<ls /usr/lib/nls/loc> or C<ls
! /usr/lib/nls>. The locale names are probably something like
! "xx_XX.(ISO)?8859-N".
=cut
--- 23,43 ----
to extract the data itself, you'll need a dereference: $$s1
! This uses POSIX::setlocale. The basic collation conversion is done by
strxfrm() which terminates at NUL characters being a decent C routine.
collate_xfrm() handles embedded NUL characters gracefully. Due to C<cmp>
and overload magic, C<lt>, C<le>, C<eq>, C<ge>, and C<gt> work also. The
available locales depend on your operating system; try whether C<locale
! -a> shows them or man pages for "locale" or "nlsinfo" or
! the direct approach C<ls /usr/lib/nls/loc> or C<ls
! /usr/lib/nls>. Not all the locales that your vendor supports
! are necessarily installed: please consult your operating system's
! documentation.
!
! The locale names are probably something like
! C<"xx_XX.(ISO)?8859-N"> or C<"xx_XX.(ISO)?8859N">, for example
! C<"fr_CH.ISO8859-1"> is the Swiss (CH) variant of French (fr),
! ISO Latin (8859) 1 (-1) which is the Western European character set.
=cut
***************
*** 54,60 ****
# Overloads: cmp # 3)
#
# Usage: use Collate;
! # setlocale(&LC_COLLATE, 'locale-of-your-choice'); # 4)
# $s1 = new Collate "scalar_data_1";
# $s2 = new Collate "scalar_data_2";
#
--- 61,67 ----
# Overloads: cmp # 3)
#
# Usage: use Collate;
! # setlocale(LC_COLLATE, 'locale-of-your-choice'); # 4)
# $s1 = new Collate "scalar_data_1";
# $s2 = new Collate "scalar_data_2";
#
***************
*** 68,79 ****
# collate_xfrm handles embedded NUL characters gracefully.
# 3) due to cmp and overload magic, lt le eq ge gt work also
# 4) the available locales depend on your operating system;
! # try whether "locale -a" shows them or the more direct
# approach "ls /usr/lib/nls/loc" or "ls /usr/lib/nls".
# The locale names are probably something like
! # 'xx_XX.(ISO)?8859-N'.
#
! # Updated: 19940913 1341 GMT
#
# ---
--- 75,93 ----
# collate_xfrm handles embedded NUL characters gracefully.
# 3) due to cmp and overload magic, lt le eq ge gt work also
# 4) the available locales depend on your operating system;
! # try whether "locale -a" shows them or man pages for
! # "locale" or "nlsinfo" work or the more direct
# approach "ls /usr/lib/nls/loc" or "ls /usr/lib/nls".
+ # Not all the locales that your vendor supports
+ # are necessarily installed: please consult your
+ # operating system's documentation.
# The locale names are probably something like
! # 'xx_XX.(ISO)?8859-N' or 'xx_XX.(ISO)?8859N',
! # for example 'fr_CH.ISO8859-1' is the Swiss (CH)
! # variant of French (fr), ISO Latin (8859) 1 (-1)
! # which is the Western European character set.
#
! # Updated: 19950602 1601 GMT
#
# ---
Index: lib/ftp.pl
Prereq: 1.17
*** perl5.001i/lib/ftp.pl Tue Oct 18 12:36:16 1994
--- perl5.001j/lib/ftp.pl Fri Jun 2 11:31:42 1995
***************
*** 89,95 ****
#
require 'chat2.pl';
! require 'socket.ph';
package ftp;
--- 89,95 ----
#
require 'chat2.pl';
! eval "require 'socket.ph'" || eval "require 'sys/socket.ph'" || die "socket.ph missing: $!\n";
package ftp;
Index: lib/getcwd.pl
*** perl5.001i/lib/getcwd.pl Tue Oct 18 12:36:19 1994
--- perl5.001j/lib/getcwd.pl Fri Jun 2 11:33:24 1995
***************
*** 36,42 ****
{
do
{
! unless ($dir = readdir(getcwd'PARENT)) #'))
{
warn "readdir($dotdots): $!";
closedir(getcwd'PARENT); #');
--- 36,42 ----
{
do
{
! unless (defined ($dir = readdir(getcwd'PARENT))) #'))
{
warn "readdir($dotdots): $!";
closedir(getcwd'PARENT); #');
Index: makeaperl.SH
*** perl5.001i/makeaperl.SH Wed Feb 22 14:37:20 1995
--- perl5.001j/makeaperl.SH Thu Jun 1 11:20:52 1995
***************
*** 18,24 ****
esac
echo "Extracting makeaperl (with variable substitutions)"
$spitshell >makeaperl <<!GROK!THIS!
! #!$bin/perl
!GROK!THIS!
$spitshell >>makeaperl <<'!NO!SUBS!'
--- 18,24 ----
esac
echo "Extracting makeaperl (with variable substitutions)"
$spitshell >makeaperl <<!GROK!THIS!
! #!$binexp/perl
!GROK!THIS!
$spitshell >>makeaperl <<'!NO!SUBS!'
Index: perl.c
*** perl5.001i/perl.c Wed May 31 11:40:13 1995
--- perl5.001j/perl.c Thu Jun 1 11:38:05 1995
***************
*** 996,1002 ****
return s;
case 'v':
printf("\nThis is perl, version %s\n\n",patchlevel);
! fputs("\tUnofficial patchlevel 1i.\n",stdout);
fputs("\nCopyright 1987-1994, Larry Wall\n",stdout);
#ifdef MSDOS
fputs("MS-DOS port Copyright (c) 1989, 1990, Diomidis Spinellis\n",
--- 996,1002 ----
return s;
case 'v':
printf("\nThis is perl, version %s\n\n",patchlevel);
! fputs("\tUnofficial patchlevel 1j.\n",stdout);
fputs("\nCopyright 1987-1994, Larry Wall\n",stdout);
#ifdef MSDOS
fputs("MS-DOS port Copyright (c) 1989, 1990, Diomidis Spinellis\n",
Index: perldoc.SH
*** perl5.001i/perldoc.SH Tue May 30 15:59:09 1995
--- perl5.001j/perldoc.SH Mon Jun 5 12:12:27 1995
***************
*** 18,24 ****
esac
echo "Extracting perldoc (with variable substitutions)"
$spitshell >perldoc <<!GROK!THIS!
! #!$bin/perl
!GROK!THIS!
$spitshell >>perldoc <<'!NO!SUBS!'
--- 18,24 ----
esac
echo "Extracting perldoc (with variable substitutions)"
$spitshell >perldoc <<!GROK!THIS!
! #!$binexp/perl
!GROK!THIS!
$spitshell >>perldoc <<'!NO!SUBS!'
***************
*** 149,155 ****
sub searchfor {
my($s,@dirs) = @_;
$s =~ s!::!/!g;
! printf STDERR "looking for $s in @dirs\n";
foreach $dir (@dirs) {
if( -f "$dir/$s.pod") { return "$dir/$s.pod" }
--- 149,155 ----
sub searchfor {
my($s,@dirs) = @_;
$s =~ s!::!/!g;
! # printf STDERR "looking for $s in @dirs\n";
foreach $dir (@dirs) {
if( -f "$dir/$s.pod") { return "$dir/$s.pod" }
Index: pod/perlbot.pod
*** perl5.001i/pod/perlbot.pod Mon May 8 15:44:20 1995
--- perl5.001j/pod/perlbot.pod Fri Jun 2 16:08:59 1995
***************
*** 1,6 ****
=head1 NAME
! perlbot - Bag'o Object Tricks For Perl5 (the BOT)
=head1 INTRODUCTION
--- 1,6 ----
=head1 NAME
! perlbot - Bag'o Object Tricks (the BOT)
=head1 INTRODUCTION
***************
*** 8,18 ****
appetites about such things as the use of instance variables and the
mechanics of object and class relationships. The reader is encouraged to
consult relevant textbooks for discussion of Object Oriented definitions and
! methodology. This is not intended as a comprehensive guide to Perl5's
! object oriented features, nor should it be construed as a style guide.
The Perl motto still holds: There's more than one way to do it.
=head1 INSTANCE VARIABLES
An anonymous array or anonymous hash can be used to hold instance
--- 8,79 ----
appetites about such things as the use of instance variables and the
mechanics of object and class relationships. The reader is encouraged to
consult relevant textbooks for discussion of Object Oriented definitions and
! methodology. This is not intended as a tutorial for object-oriented
! programming or as a comprehensive guide to Perl's object oriented features,
! nor should it be construed as a style guide.
The Perl motto still holds: There's more than one way to do it.
+ =head1 OO SCALING TIPS
+
+ =over 5
+
+ =item 1
+
+ Do not attempt to verify the type of $self. That'll break if the class is
+ inherited, when the type of $self is valid but its package isn't what you
+ expect. See rule 5.
+
+ =item 2
+
+ If an object-oriented (OO) or indirect-object (IO) syntax was used, then the
+ object is probably the correct type and there's no need to become paranoid
+ about it. Perl isn't a paranoid language anyway. If people subvert the OO
+ or IO syntax then they probably know what they're doing and you should let
+ them do it. See rule 1.
+
+ =item 3
+
+ Use the two-argument form of bless(). Let a subclass use your constructor.
+ See L<INHERITING A CONSTRUCTOR>.
+
+ =item 4
+
+ The subclass is allowed to know things about its immediate superclass, the
+ superclass is allowed to know nothing about a subclass.
+
+ =item 5
+
+ Don't be trigger happy with inheritance. A "using", "containing", or
+ "delegation" relationship (some sort of aggregation, at least) is often more
+ appropriate. See L<OBJECT RELATIONSHIPS>, L<USING RELATIONSHIP WITH SDBM>,
+ and L<"DELEGATION">.
+
+ =item 6
+
+ The object is the namespace. Make package globals accessible via the
+ object. This will remove the guess work about the symbol's home package.
+ See L<CLASS CONTEXT AND THE OBJECT>.
+
+ =item 7
+
+ IO syntax is certainly less noisy, but it is also prone to ambiguities which
+ can cause difficult-to-find bugs. Allow people to use the sure-thing OO
+ syntax, even if you don't like it.
+
+ =item 8
+
+ Do not use function-call syntax on a method. You're going to be bitten
+ someday. Someone might move that method into a superclass and your code
+ will be broken. On top of that you're feeding the paranoia in rule 2.
+
+ =item 9
+
+ Don't assume you know the home package of a method. You're making it
+ difficult for someone to override that method. See L<THINKING OF CODE REUSE>.
+
+ =back
+
=head1 INSTANCE VARIABLES
An anonymous array or anonymous hash can be used to hold instance
***************
*** 26,32 ****
my $self = {};
$self->{'High'} = $params{'High'};
$self->{'Low'} = $params{'Low'};
! bless $self;
}
--- 87,93 ----
my $self = {};
$self->{'High'} = $params{'High'};
$self->{'Low'} = $params{'Low'};
! bless $self, $type;
}
***************
*** 38,57 ****
my $self = [];
$self->[0] = $params{'Left'};
$self->[1] = $params{'Right'};
! bless $self;
}
package main;
! $a = new Foo ( 'High' => 42, 'Low' => 11 );
print "High=$a->{'High'}\n";
print "Low=$a->{'Low'}\n";
! $b = new Bar ( 'Left' => 78, 'Right' => 40 );
print "Left=$b->[0]\n";
print "Right=$b->[1]\n";
-
=head1 SCALAR INSTANCE VARIABLES
An anonymous scalar can be used when only one instance variable is needed.
--- 99,117 ----
my $self = [];
$self->[0] = $params{'Left'};
$self->[1] = $params{'Right'};
! bless $self, $type;
}
package main;
! $a = Foo->new( 'High' => 42, 'Low' => 11 );
print "High=$a->{'High'}\n";
print "Low=$a->{'Low'}\n";
! $b = Bar->new( 'Left' => 78, 'Right' => 40 );
print "Left=$b->[0]\n";
print "Right=$b->[1]\n";
=head1 SCALAR INSTANCE VARIABLES
An anonymous scalar can be used when only one instance variable is needed.
***************
*** 62,73 ****
my $type = shift;
my $self;
$self = shift;
! bless \$self;
}
package main;
! $a = new Foo 42;
print "a=$$a\n";
--- 122,133 ----
my $type = shift;
my $self;
$self = shift;
! bless \$self, $type;
}
package main;
! $a = Foo->new( 42 );
print "a=$$a\n";
***************
*** 81,103 ****
package Bar;
sub new {
my $self = {};
$self->{'buz'} = 42;
! bless $self;
}
package Foo;
@ISA = qw( Bar );
sub new {
! my $self = new Bar;
$self->{'biz'} = 11;
! bless $self;
}
package main;
! $a = new Foo;
print "buz = ", $a->{'buz'}, "\n";
print "biz = ", $a->{'biz'}, "\n";
--- 141,165 ----
package Bar;
sub new {
+ my $type = shift;
my $self = {};
$self->{'buz'} = 42;
! bless $self, $type;
}
package Foo;
@ISA = qw( Bar );
sub new {
! my $type = shift;
! my $self = Bar->new;
$self->{'biz'} = 11;
! bless $self, $type;
}
package main;
! $a = Foo->new;
print "buz = ", $a->{'buz'}, "\n";
print "biz = ", $a->{'biz'}, "\n";
***************
*** 111,133 ****
package Bar;
sub new {
my $self = {};
$self->{'buz'} = 42;
! bless $self;
}
package Foo;
sub new {
my $self = {};
! $self->{'Bar'} = new Bar ();
$self->{'biz'} = 11;
! bless $self;
}
package main;
! $a = new Foo;
print "buz = ", $a->{'Bar'}->{'buz'}, "\n";
print "biz = ", $a->{'biz'}, "\n";
--- 173,197 ----
package Bar;
sub new {
+ my $type = shift;
my $self = {};
$self->{'buz'} = 42;
! bless $self, $type;
}
package Foo;
sub new {
+ my $type = shift;
my $self = {};
! $self->{'Bar'} = Bar->new;
$self->{'biz'} = 11;
! bless $self, $type;
}
package main;
! $a = Foo->new;
print "buz = ", $a->{'Bar'}->{'buz'}, "\n";
print "biz = ", $a->{'biz'}, "\n";
***************
*** 154,160 ****
@ISA = qw( Bar Baz );
@Foo::Inherit::ISA = @ISA; # Access to overridden methods.
! sub new { bless [] }
sub grr { print "grumble\n" }
sub goo {
my $self = shift;
--- 218,227 ----
@ISA = qw( Bar Baz );
@Foo::Inherit::ISA = @ISA; # Access to overridden methods.
! sub new {
! my $type = shift;
! bless [], $type;
! }
sub grr { print "grumble\n" }
sub goo {
my $self = shift;
***************
*** 171,197 ****
package main;
! $foo = new Foo;
$foo->mumble;
$foo->grr;
$foo->goo;
$foo->google;
! =head1 USING RELATIONSHIP WITH SDBM
This example demonstrates an interface for the SDBM class. This creates a
"using" relationship between the SDBM class and the new class Mydbm.
- use SDBM_File;
- use POSIX;
-
package Mydbm;
sub TIEHASH {
! my $self = shift;
my $ref = SDBM_File->new(@_);
! bless {'dbm' => $ref};
}
sub FETCH {
my $self = shift;
--- 238,265 ----
package main;
! $foo = Foo->new;
$foo->mumble;
$foo->grr;
$foo->goo;
$foo->google;
! =head1 USING RELATIONSHIP WITH SDBM
This example demonstrates an interface for the SDBM class. This creates a
"using" relationship between the SDBM class and the new class Mydbm.
package Mydbm;
+ require SDBM_File;
+ require TieHash;
+ @ISA = qw( TieHash );
+
sub TIEHASH {
! my $type = shift;
my $ref = SDBM_File->new(@_);
! bless {'dbm' => $ref}, $type;
}
sub FETCH {
my $self = shift;
***************
*** 209,214 ****
--- 277,283 ----
}
package main;
+ use Fcntl qw( O_RDWR O_CREAT );
tie %foo, Mydbm, "Sdbm", O_RDWR|O_CREAT, 0640;
$foo{'bar'} = 123;
***************
*** 230,236 ****
package FOO;
! sub new { bless {} }
sub bar {
my $self = shift;
$self->FOO::private::BAZ;
--- 299,308 ----
package FOO;
! sub new {
! my $type = shift;
! bless {}, $type;
! }
sub bar {
my $self = shift;
$self->FOO::private::BAZ;
***************
*** 253,259 ****
package FOO;
! sub new { bless {} }
sub bar {
my $self = shift;
$self->FOO::private::BAZ;
--- 325,334 ----
package FOO;
! sub new {
! my $type = shift;
! bless {}, $type;
! }
sub bar {
my $self = shift;
$self->FOO::private::BAZ;
***************
*** 267,273 ****
package GOOP;
@ISA = qw( FOO );
! sub new { bless {} }
sub BAZ {
print "in GOOP::BAZ\n";
--- 342,351 ----
package GOOP;
@ISA = qw( FOO );
! sub new {
! my $type = shift;
! bless {}, $type;
! }
sub BAZ {
print "in GOOP::BAZ\n";
***************
*** 284,290 ****
package FOO;
! sub new { bless {} }
sub bar {
my $self = shift;
$self->BAZ;
--- 362,371 ----
package FOO;
! sub new {
! my $type = shift;
! bless {}, $type;
! }
sub bar {
my $self = shift;
$self->BAZ;
***************
*** 297,303 ****
package GOOP;
@ISA = qw( FOO );
! sub new { bless {} }
sub BAZ {
print "in GOOP::BAZ\n";
}
--- 378,387 ----
package GOOP;
@ISA = qw( FOO );
! sub new {
! my $type = shift;
! bless {}, $type;
! }
sub BAZ {
print "in GOOP::BAZ\n";
}
***************
*** 330,338 ****
%fizzle = ( 'Password' => 'XYZZY' );
sub new {
my $self = {};
$self->{'fizzle'} = \%fizzle;
! bless $self;
}
sub enter {
--- 414,423 ----
%fizzle = ( 'Password' => 'XYZZY' );
sub new {
+ my $type = shift;
my $self = {};
$self->{'fizzle'} = \%fizzle;
! bless $self, $type;
}
sub enter {
***************
*** 353,361 ****
%fizzle = ( 'Password' => 'Rumple' );
sub new {
my $self = Bar->new;
$self->{'fizzle'} = \%fizzle;
! bless $self;
}
package main;
--- 438,447 ----
%fizzle = ( 'Password' => 'Rumple' );
sub new {
+ my $type = shift;
my $self = Bar->new;
$self->{'fizzle'} = \%fizzle;
! bless $self, $type;
}
package main;
Index: pod/pod2html.SH
*** perl5.001i/pod/pod2html.SH Thu Apr 13 10:34:13 1995
--- perl5.001j/pod/pod2html.SH Thu Jun 1 11:21:35 1995
***************
*** 17,24 ****
echo "Extracting pod/pod2html (with variable substitutions)"
rm -f pod2html
$spitshell >pod2html <<!GROK!THIS!
! #!$bin/perl
! eval 'exec $bin/perl -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
!GROK!THIS!
--- 17,24 ----
echo "Extracting pod/pod2html (with variable substitutions)"
rm -f pod2html
$spitshell >pod2html <<!GROK!THIS!
! #!$binexp/perl
! eval 'exec perl -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
!GROK!THIS!
Index: pod/pod2latex.SH
*** perl5.001i/pod/pod2latex.SH Thu Apr 13 12:20:39 1995
--- perl5.001j/pod/pod2latex.SH Thu Jun 1 11:21:45 1995
***************
*** 17,24 ****
echo "Extracting pod/pod2latex (with variable substitutions)"
rm -f pod2latex
$spitshell >pod2latex <<!GROK!THIS!
! #!$bin/perl
! eval 'exec $bin/perl -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
!GROK!THIS!
--- 17,24 ----
echo "Extracting pod/pod2latex (with variable substitutions)"
rm -f pod2latex
$spitshell >pod2latex <<!GROK!THIS!
! #!$binexp/perl
! eval 'exec perl -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
!GROK!THIS!
Index: pod/pod2man.SH
Prereq: 1.5
*** perl5.001i/pod/pod2man.SH Thu Apr 13 10:34:04 1995
--- perl5.001j/pod/pod2man.SH Thu Jun 1 11:21:53 1995
***************
*** 17,24 ****
echo "Extracting pod/pod2man (with variable substitutions)"
rm -f pod2man
$spitshell >pod2man <<!GROK!THIS!
! #!$bin/perl
! eval 'exec $bin/perl -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
!GROK!THIS!
--- 17,24 ----
echo "Extracting pod/pod2man (with variable substitutions)"
rm -f pod2man
$spitshell >pod2man <<!GROK!THIS!
! #!$binexp/perl
! eval 'exec perl -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
!GROK!THIS!
Index: sv.c
*** perl5.001i/sv.c Wed May 24 14:27:52 1995
--- perl5.001j/sv.c Fri Jun 2 12:03:04 1995
***************
*** 2368,2374 ****
I32 append;
{
register char *bp; /* we're going to steal some values */
! #ifdef USE_STDIO_PTR
register I32 cnt; /* from the stdio struct and put EVERYTHING */
register STDCHAR *ptr; /* in the innermost loop into registers */
STRLEN bpx;
--- 2368,2374 ----
I32 append;
{
register char *bp; /* we're going to steal some values */
! #if defined(USE_STDIO_PTR) && defined(STDIO_PTR_LVALUE) && defined(STDIO_CNT_LVALUE)
register I32 cnt; /* from the stdio struct and put EVERYTHING */
register STDCHAR *ptr; /* in the innermost loop into registers */
STRLEN bpx;
***************
*** 2398,2404 ****
}
} while (i != EOF);
}
! #ifdef USE_STDIO_PTR /* Here is some breathtakingly efficient cheating */
cnt = FILE_cnt(fp); /* get count into register */
(void)SvPOK_only(sv); /* validate pointer */
if (SvLEN(sv) - append <= cnt + 1) { /* make sure we have the room */
--- 2398,2405 ----
}
} while (i != EOF);
}
! #if defined(USE_STDIO_PTR) && defined(STDIO_PTR_LVALUE) && defined(STDIO_CNT_LVALUE)
! /* Here is some breathtakingly efficient cheating */
cnt = FILE_cnt(fp); /* get count into register */
(void)SvPOK_only(sv); /* validate pointer */
if (SvLEN(sv) - append <= cnt + 1) { /* make sure we have the room */
***************
*** 2466,2473 ****
*bp = '\0';
SvCUR_set(sv, bp - SvPVX(sv)); /* set length */
! #else /* !USE_STDIO_PTR */ /* The big, slow, and stupid way */
!
{
char buf[8192];
register char * bpe = buf + sizeof(buf) - 3;
--- 2467,2474 ----
*bp = '\0';
SvCUR_set(sv, bp - SvPVX(sv)); /* set length */
! #else /* USE_STDIO_PTR && STDIO_PTR_LVALUE && STDIO_CNT_LVALUE */
! /*The big, slow, and stupid way */
{
char buf[8192];
register char * bpe = buf + sizeof(buf) - 3;
***************
*** 2499,2505 ****
}
}
! #endif /* USE_STDIO_PTR */
if (rspara) {
while (i != EOF) {
--- 2500,2506 ----
}
}
! #endif /* USE_STDIO_PTR && STDIO_PTR_LVALUE && STDIO_CNT_LVALUE */
if (rspara) {
while (i != EOF) {
Index: toke.c
*** perl5.001i/toke.c Fri May 26 15:24:57 1995
--- perl5.001j/toke.c Mon Jun 5 12:11:34 1995
***************
*** 2366,2372 ****
TOKEN('&');
}
if (lastchar == '-')
! warn("Ambiguious use of -%s resolved as -&%s()",
tokenbuf, tokenbuf);
last_lop = oldbufptr;
last_lop_op = OP_ENTERSUB;
--- 2366,2372 ----
TOKEN('&');
}
if (lastchar == '-')
! warn("Ambiguous use of -%s resolved as -&%s()",
tokenbuf, tokenbuf);
last_lop = oldbufptr;
last_lop_op = OP_ENTERSUB;
***************
*** 2401,2407 ****
if (lastchar && strchr("*%&", lastchar)) {
warn("Operator or semicolon missing before %c%s",
lastchar, tokenbuf);
! warn("Ambiguious use of %c resolved as operator %c",
lastchar, lastchar);
}
TOKEN(WORD);
--- 2401,2407 ----
if (lastchar && strchr("*%&", lastchar)) {
warn("Operator or semicolon missing before %c%s",
lastchar, tokenbuf);
! warn("Ambiguous use of %c resolved as operator %c",
lastchar, lastchar);
}
TOKEN(WORD);
Index: x2p/find2perl.SH
*** perl5.001i/x2p/find2perl.SH Tue Oct 18 12:47:36 1994
--- perl5.001j/x2p/find2perl.SH Thu Jun 1 11:22:09 1995
***************
*** 23,29 ****
: by putting a backslash in front. You may delete these comments.
rm -f find2perl
$spitshell >find2perl <<!GROK!THIS!
! #!$bin/perl
#
# Modified September 26, 1993 to provide proper handling of years after 1999
# Tom Link <tml+@pitt.edu>
--- 23,29 ----
: by putting a backslash in front. You may delete these comments.
rm -f find2perl
$spitshell >find2perl <<!GROK!THIS!
! #!$binexp/perl
#
# Modified September 26, 1993 to provide proper handling of years after 1999
# Tom Link <tml+@pitt.edu>
Index: x2p/s2p.SH
*** perl5.001i/x2p/s2p.SH Tue Oct 18 12:47:48 1994
--- perl5.001j/x2p/s2p.SH Thu Jun 1 11:32:48 1995
***************
*** 24,32 ****
: by putting a backslash in front. You may delete these comments.
rm -f s2p
$spitshell >s2p <<!GROK!THIS!
! #!$bin/perl
! eval 'exec $bin/perl -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
\$bin = '$bin';
--- 24,32 ----
: by putting a backslash in front. You may delete these comments.
rm -f s2p
$spitshell >s2p <<!GROK!THIS!
! #!$binexp/perl
! eval 'exec perl -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
\$bin = '$bin';
Index: x2p/str.c
*** perl5.001i/x2p/str.c Tue May 23 14:12:27 1995
--- perl5.001j/x2p/str.c Fri Jun 2 12:01:49 1995
***************
*** 287,293 ****
register STR *str;
register FILE *fp;
{
! #ifdef USE_STDIO_PTR /* Here is some breathtakingly efficient cheating */
register char *bp; /* we're going to steal some values */
register int cnt; /* from the stdio struct and put EVERYTHING */
--- 287,294 ----
register STR *str;
register FILE *fp;
{
! #if defined(USE_STDIO_PTR) && defined(STDIO_PTR_LVALUE) && defined(STDIO_CNT_LVALUE)
! /* Here is some breathtakingly efficient cheating */
register char *bp; /* we're going to steal some values */
register int cnt; /* from the stdio struct and put EVERYTHING */
***************
*** 339,345 ****
*bp = '\0';
str->str_cur = bp - str->str_ptr; /* set length */
! #else /* !USE_STDIO_PTR */ /* The big, slow, and stupid way */
static char buf[4192];
--- 340,347 ----
*bp = '\0';
str->str_cur = bp - str->str_ptr; /* set length */
! #else /* USE_STDIO_PTR && STDIO_PTR_LVALUE && STDIO_CNT_LVALUE */
! /* The big, slow, and stupid way */
static char buf[4192];
***************
*** 348,354 ****
else
str_set(str, No);
! #endif /* USE_STDIO_PTR */
return str->str_cur ? str->str_ptr : Nullch;
}
--- 350,356 ----
else
str_set(str, No);
! #endif /* USE_STDIO_PTR && STDIO_PTR_LVALUE && STDIO_CNT_LVALUE */
return str->str_cur ? str->str_ptr : Nullch;
}
End of patch.