summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1997-03-07 04:01:12 +1200
committerChip Salzenberg <chip@atlantic.net>1997-03-07 04:01:12 +1200
commit2ae324a7ad5d4e616e757c311984fd86d5857ddd (patch)
tree6cf53ad504c2bded7498b6ca70d77e536d03ab7f
parent651159bc74695f653cfb486793f878de6956d77c (diff)
downloadperl-2ae324a7ad5d4e616e757c311984fd86d5857ddd.tar.gz
[inseparable changes from match from perl-5.003_92 to perl-5.003_93]
BUILD PROCESS Subject: Fix for Unisys UNIX and libperl.so Date: Thu, 6 Mar 97 16:28 GMT0 From: Alan Burlison <aburlison@cix.compulink.co.uk> Files: Configure Msg-ID: memo.147328@cix.compulink.co.uk (applied based on p5p patch as commit 2f525a329506abe067c4ec9d4c7ae13d8b223081) Subject: Allow './Configure -Uoptimize' Date: Thu, 06 Mar 1997 11:15:47 -0500 (EST) From: Andy Dougherty <doughera@fractal.phys.lafayette.edu> Files: Configure Msg-ID: Pine.SOL.3.95q.970306110532.11070A-100000@fractal.lafayette. (applied based on p5p patch as commit 59ae47780c168857b216412f8354d10ae6dd0b61) Subject: Use 'test -f', not 'test -x' Date: Fri, 7 Mar 1997 19:53:00 -0500 From: Spider Boardman <spider@web.zk3.dec.com> Files: Configure Msg-ID: 199703080053.TAA13943@web.zk3.dec.com (applied based on p5p patch as commit 64b4562546c4e74f87c21f65a76ec05e96a1b74f) CORE LANGUAGE CHANGES Subject: Don't autovivify array and hash elements in sub parameters Date: Thu, 06 Mar 1997 14:12:09 -0500 From: Gurusamy Sarathy <gsar@engin.umich.edu> Files: op.c pod/perldelta.pod pod/perlsub.pod pod/perltrap.pod Msg-ID: 199703061912.OAA20606@aatma.engin.umich.edu (applied based on p5p patch as commit 0ffc6623ceb5acc7b954e8cdbaeb8ba319474d7b) Subject: Support READ and GETC for tied handles Date: Sat, 08 Mar 1997 19:19:38 -0500 From: Doug MacEachern <dougm@opengroup.org> Files: pod/perldelta.pod pod/perltie.pod pp_sys.c t/op/misc.t Msg-ID: 199703090019.TAA32591@postman.osf.org (applied based on p5p patch as commit b06b64f805517c26cbd7c4d2f74efd5f36b4692c) Subject: Warn on C<@x =~ /a/> and C<%x =~ s/a/b/> From: Chip Salzenberg <chip@perl.com> Files: op.c pod/perldiag.pod CORE PORTABILITY Subject: VMS update Date: Fri, 07 Mar 1997 22:49:46 -0500 (EST) From: Charles Bailey <bailey@HMIVAX.HUMGEN.UPENN.EDU> Files: lib/ExtUtils/MM_VMS.pm vms/descrip.mms vms/gen_shrfls.pl vms/sockadapt.h private-msgid: 01IG8KN5R28M00661G@hmivax.humgen.upenn.edu DOCUMENTATION Subject: Consolidated INSTALL updates since _92 Date: Sat, 08 Mar 1997 13:21:22 -0500 (EST) From: Andy Dougherty <doughera@fractal.phys.lafayette.edu> Files: Msg-ID: Pine.SOL.3.95q.970308131806.23766F-100000@fractal.lafayette. (applied based on p5p patch as commit e6834c60cd85866fc530e8b4bb831af6186bad4d) Subject: PODs corrections Date: Fri, 7 Mar 1997 21:53:04 -0500 (EST) From: Ilya Zakharevich <ilya@math.ohio-state.edu> Files: ext/DB_File/DB_File.pm ext/Socket/Socket.pm lib/Class/Template.pm lib/ExtUtils/Embed.pm lib/ExtUtils/MM_VMS.pm lib/ExtUtils/Mksymlists.pm lib/File/Basename.pm lib/File/stat.pm lib/Time/gmtime.pm lib/Time/localtime.pm lib/Time/tm.pm lib/User/grent.pm lib/User/pwent.pm pod/perlcall.pod pod/perldebug.pod pod/perlfunc.pod pod/perlguts.pod pod/perllocale.pod pod/perlop.pod pod/perlsub.pod Msg-ID: 199703080253.VAA24975@monk.mps.ohio-state.edu (applied based on p5p patch as commit 72451f4af0d31f24ef5b12bc5d034e3e8b35d43d) OTHER CORE CHANGES Subject: Fix imbalanced ENTER/LEAVE from C<BEGIN{die}> From: Chip Salzenberg <chip@perl.com> Files: op.c perl.c proto.h Subject: perl -P path patch Date: Sat, 08 Mar 1997 12:45:08 -0500 (EST) From: Andy Dougherty <doughera@fractal.phys.lafayette.edu> Files: config_H config_h.SH perl.c plan9/config.plan9 t/comp/cpp.t vms/config.vms win32/config.H Msg-ID: Pine.SOL.3.95q.970308120242.23766D-100000@fractal.lafayette. (applied based on p5p patch as commit bba014945c609b5474f61f5e82ed2ff3e83a6e47)
-rw-r--r--Changes166
-rwxr-xr-xConfigure6
-rw-r--r--INSTALL23
-rw-r--r--config_H13
-rwxr-xr-xconfig_h.SH13
-rw-r--r--ext/DB_File/DB_File.pm2
-rw-r--r--ext/Socket/Socket.pm4
-rw-r--r--lib/Class/Template.pm4
-rw-r--r--lib/ExtUtils/Embed.pm4
-rw-r--r--lib/ExtUtils/MM_VMS.pm22
-rw-r--r--lib/ExtUtils/Mksymlists.pm4
-rw-r--r--lib/File/Basename.pm4
-rw-r--r--lib/File/stat.pm2
-rw-r--r--lib/Time/gmtime.pm2
-rw-r--r--lib/Time/localtime.pm2
-rw-r--r--lib/Time/tm.pm2
-rw-r--r--lib/User/grent.pm2
-rw-r--r--lib/User/pwent.pm2
-rw-r--r--op.c18
-rw-r--r--patchlevel.h2
-rw-r--r--perl.c34
-rw-r--r--plan9/buildinfo2
-rw-r--r--plan9/config.plan913
-rw-r--r--pod/perlcall.pod2
-rw-r--r--pod/perldebug.pod2
-rw-r--r--pod/perldelta.pod95
-rw-r--r--pod/perldiag.pod9
-rw-r--r--pod/perlfunc.pod2
-rw-r--r--pod/perlguts.pod8
-rw-r--r--pod/perllocale.pod6
-rw-r--r--pod/perlop.pod2
-rw-r--r--pod/perlsub.pod13
-rw-r--r--pod/perltie.pod28
-rw-r--r--pod/perltoc.pod19
-rw-r--r--pod/perltrap.pod20
-rw-r--r--pp_sys.c30
-rw-r--r--proto.h2
-rwxr-xr-xt/comp/cpp.t2
-rwxr-xr-xt/op/misc.t19
-rw-r--r--vms/config.vms15
-rw-r--r--vms/descrip.mms29
-rw-r--r--vms/gen_shrfls.pl2
-rw-r--r--vms/sockadapt.h7
-rw-r--r--win32/config.H13
44 files changed, 497 insertions, 174 deletions
diff --git a/Changes b/Changes
index f34114ef33..701c87109c 100644
--- a/Changes
+++ b/Changes
@@ -9,6 +9,170 @@ releases.)
----------------
+Version 5.003_93
+----------------
+
+Me, last time:
+ "This release will be the public beta of 5.004,
+ or my name isn't Larson T. Pettifogger."
+Me, now:
+ "Gone like *that*, a fortune in letterhead."
+
+ CORE LANGUAGE CHANGES
+
+ Title: "Don't autovivify array and hash elements in sub parameters"
+ From: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Msg-ID: <199703061912.OAA20606@aatma.engin.umich.edu>
+ Date: Thu, 06 Mar 1997 14:12:09 -0500
+ Files: op.c pod/perldelta.pod pod/perlsub.pod pod/perltrap.pod
+
+ Title: "Support READ and GETC for tied handles"
+ From: Doug MacEachern <dougm@opengroup.org>
+ Msg-ID: <199703090019.TAA32591@postman.osf.org>
+ Date: Sat, 08 Mar 1997 19:19:38 -0500
+ Files: pod/perldelta.pod pod/perltie.pod pp_sys.c t/op/misc.t
+
+ Title: "Warn on C<@x =~ /a/> and C<%x =~ s/a/b/>"
+ From: Chip Salzenberg
+ Files: op.c pod/perldiag.pod
+
+ Title: "Warn on %{+undef} and @{+undef}"
+ From: Chip Salzenberg
+ Files: pp.c pp_hot.c
+
+ CORE PORTABILITY
+
+ Title: "VMS update"
+ From: Charles Bailey <bailey@HMIVAX.HUMGEN.UPENN.EDU>
+ Msg-ID: <01IG8KN5R28M00661G@hmivax.humgen.upenn.edu>
+ Date: Fri, 07 Mar 1997 22:49:46 -0500 (EST)
+ Files: lib/ExtUtils/MM_VMS.pm vms/descrip.mms vms/gen_shrfls.pl
+ vms/sockadapt.h
+
+ Title: "AmigaOS hint patch"
+ From: "Norbert Pueschel" <pueschel@imsdd.meb.uni-bonn.de>
+ Msg-ID: <77724767@Armageddon.meb.uni-bonn.de>
+ Date: Sat, 08 Mar 1997 12:50:15 +0100
+ Files: hints/amigaos.sh
+
+ OTHER CORE CHANGES
+
+ Title: "Make conversion of @_ to real array work right after C<shift>"
+ From: Chip Salzenberg
+ Files: av.c
+
+ Title: "Fix imbalanced ENTER/LEAVE from C<BEGIN{die}>"
+ From: Chip Salzenberg
+ Files: op.c perl.c proto.h
+
+ Title: "perl -P path patch"
+ From: Andy Dougherty <doughera@fractal.phys.lafayette.edu>
+ Msg-ID: <Pine.SOL.3.95q.970308120242.23766D-100000@fractal.lafayette.
+ Date: Sat, 08 Mar 1997 12:45:08 -0500 (EST)
+ Files: config_H config_h.SH perl.c plan9/config.plan9 t/comp/cpp.t
+ vms/config.vms win32/config.H
+
+ BUILD PROCESS
+
+ Title: "Fix for Unisys UNIX and libperl.so"
+ From: aburlison@cix.compulink.co.uk (Alan Burlison)
+ Msg-ID: <memo.147328@cix.compulink.co.uk>
+ Date: Thu, 6 Mar 97 16:28 GMT0
+ Files: Configure
+
+ Title: "Allow './Configure -Uoptimize'"
+ From: Andy Dougherty <doughera@fractal.phys.lafayette.edu>
+ Msg-ID: <Pine.SOL.3.95q.970306110532.11070A-100000@fractal.lafayette.
+ Date: Thu, 06 Mar 1997 11:15:47 -0500 (EST)
+ Files: Configure
+
+ Title: "Use 'test -f', not 'test -x'"
+ From: Spider Boardman <spider@web.zk3.dec.com>
+ Msg-ID: <199703080053.TAA13943@web.zk3.dec.com>
+ Date: Fri, 7 Mar 1997 19:53:00 -0500
+ Files: Configure
+
+ Title: "Don't count on 'trap 0' inside () in shell script"
+ From: aburlison@cix.compulink.co.uk (Alan Burlison)
+ Msg-ID: <memo.147326@cix.compulink.co.uk>
+ Date: Thu, 6 Mar 97 16:28 GMT0
+ Files: perl_exp.SH
+
+ LIBRARY AND EXTENSIONS
+
+ Title: "Carp with multiple arguments"
+ From: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>
+ Msg-ID: <E0w3STZ-0007RW-00@taurus.cus.cam.ac.uk>
+ Date: Sat, 8 Mar 1997 20:12:17 +0000
+ Files: lib/Carp.pm
+
+ Title: "@EXPORT_FAIL fix for Exporter.pm"
+ From: Roderick Schertler <roderick@argon.org>
+ Msg-ID: <24884.857841724@eeyore.ibcinc.com>
+ Date: Sat, 08 Mar 1997 12:22:04 -0500
+ Files: lib/Exporter.pm
+
+ Title: "Open[23] autoflush docs"
+ From: Roderick Schertler <roderick@argon.org>
+ Msg-ID: <7939.857693947@eeyore.ibcinc.com>
+ Date: Thu, 06 Mar 1997 19:19:07 -0500
+ Files: lib/IPC/Open2.pm lib/IPC/Open3.pm
+
+ TESTS
+
+ Title: "Fix counts in output of TEST"
+ From: Hugo van der Sanden <hv@iii.co.uk>
+ Msg-ID: <331F1507.4BE8@iii.co.uk>
+ Date: Thu, 06 Mar 1997 19:03:35 +0000
+ Files: t/TEST
+
+ Title: "Ignore backup files in strict.t and warning.t"
+ From: Chip Salzenberg
+ Files: t/pragma/strict.t t/pragma/warning.t
+
+ UTILITIES
+
+ Title: "Quote pathname before using as pattern"
+ From: Chip Salzenberg
+ Files: pod/pod2html.PL
+
+ DOCUMENTATION
+
+ Title: "Consolidated INSTALL updates since _92"
+ From: Andy Dougherty <doughera@fractal.phys.lafayette.edu>
+ Msg-ID: <Pine.SOL.3.95q.970308131806.23766F-100000@fractal.lafayette.
+ Date: Sat, 08 Mar 1997 13:21:22 -0500 (EST)
+
+ Title: "Fix more E-Mail addresses in pods"
+ From: Chip Salzenberg
+ Files: lib/ExtUtils/MakeMaker.pm lib/ExtUtils/Manifest.pm
+ lib/diagnostics.pm pod/buildtoc
+
+ Title: "Warn about '.' terminating E-Mail"
+ From: Chip Salzenberg
+ Files: pod/perlform.pod
+
+ Title: "OS/2 doc update"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199703080537.AAA25157@monk.mps.ohio-state.edu>
+ Date: Sat, 8 Mar 1997 00:37:30 -0500 (EST)
+ Files: README.os2
+
+ Title: "PODs corrections"
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Msg-ID: <199703080253.VAA24975@monk.mps.ohio-state.edu>
+ Date: Fri, 7 Mar 1997 21:53:04 -0500 (EST)
+ Files: ext/DB_File/DB_File.pm ext/Socket/Socket.pm
+ lib/Class/Template.pm lib/ExtUtils/Embed.pm
+ lib/ExtUtils/MM_VMS.pm lib/ExtUtils/Mksymlists.pm
+ lib/File/Basename.pm lib/File/stat.pm lib/Time/gmtime.pm
+ lib/Time/localtime.pm lib/Time/tm.pm lib/User/grent.pm
+ lib/User/pwent.pm pod/perlcall.pod pod/perldebug.pod
+ pod/perlfunc.pod pod/perlguts.pod pod/perllocale.pod
+ pod/perlop.pod pod/perlsub.pod
+
+
+----------------
Version 5.003_92
----------------
@@ -446,7 +610,7 @@ At last, a mil[le]stone: The first beta of Perl 5.004.
t/lib/gdbm.t t/lib/ndbm.t t/lib/odbm.t t/lib/sdbm.t
t/op/magic.t t/op/stat.t
- #20: "Hints for DC/OSx"
+ Title: "Hints for DC/OSx"
From: Stephen Zander <srz@loopback>
Msg-ID: <199702242124.NAA03796@wsuse5.mckesson.com>
Date: Mon, 24 Feb 1997 13:24:54 -0800
diff --git a/Configure b/Configure
index dc24cf7d03..5eacc6c4c4 100755
--- a/Configure
+++ b/Configure
@@ -3557,7 +3557,7 @@ $rm -f testcpp.c testcpp.out
: determine optimize, if desired, or use for debug flag also
case "$optimize" in
-' ') dflt='none';;
+' '|$undef) dflt='none';;
'') dflt='-O';;
*) dflt="$optimize";;
esac
@@ -3899,7 +3899,7 @@ case "$nm_opt" in
nm_opt='-p' # Solaris (and SunOS?)
elif $test -f /dgux; then
nm_opt='-p' # DG-UX
- elif $test -x /lib64/rld; then
+ elif $test -f /lib64/rld; then
nm_opt='-p' # 64-bit Irix
else
nm_opt=''
@@ -4555,7 +4555,7 @@ $undef)
;;
*) case "$useshrplib" in
'') case "$osname" in
- svr4|dgux|dynixptx|esix|powerux)
+ svr4*|dgux|dynixptx|esix|powerux)
dflt='yes'
also='Building a shared libperl is required for dynamic loading to work on your system.'
;;
diff --git a/INSTALL b/INSTALL
index 470acfccbe..6b36f930d5 100644
--- a/INSTALL
+++ b/INSTALL
@@ -20,7 +20,7 @@ The basic steps to build and install perl5 on a Unix system are:
Each of these is explained in further detail below.
For information on non-Unix systems, see the section on
-L<"Porting Information"> below.
+L<"Porting information"> below.
=head1 DESCRIPTION
@@ -616,11 +616,22 @@ In a future version of perl, these might be enabled by default.
=over 4
+=item -DDEBUGGING_MSTATS
+
+If C<DEBUGGING_MSTATS> is defined, you can extract malloc
+statistics from the Perl interpreter. The overhead this imposes is not
+large (perl just twiddles integers at malloc/free/sbrk time). When you
+run perl with the environment variable C<PERL_DEBUG_MSTATS> set to
+either 1 or 2, the interpreter will dump statistics to stderr at exit
+time and (with a value of 2) after compilation. If you install the
+Devel::Peek module you can get the statistics whenever you like by
+invoking its mstat() function.
+
=item -DEMERGENCY_SBRK
-If this macro is defined, running out of memory need not be a fatal
-error: a memory pool can allocated by assigning to the special
-variable C<$^M>.
+If C<EMERGENCY_SBRK> is defined, running out of memory need not be a
+fatal error: a memory pool can allocated by assigning to the special
+variable C<$^M>. See L<perlvar> for more details.
=item -DPACK_MALLOC
@@ -787,7 +798,7 @@ mechanism.
=item Porting information
-Specific information for the OS/2, Plan9, VMS and Win32 ports are in the
+Specific information for the OS/2, Plan9, VMS and Win32 ports is in the
corresponding subdirectories. Additional information, including
a glossary of all those config.sh variables, is in the Porting
subdirectory.
@@ -1274,4 +1285,4 @@ from the original README by Larry Wall.
=head1 LAST MODIFIED
-$Id: INSTALL,v 1.3 1997/02/28 16:34:11 doughera Released $
+$Id: INSTALL,v 1.5 1997/03/08 18:15:49 doughera Released $
diff --git a/config_H b/config_H
index 39dd436b90..fbc12062d2 100644
--- a/config_H
+++ b/config_H
@@ -40,7 +40,12 @@
* This symbol holds the path of the bin directory where the package will
* be installed. Program must be prepared to deal with ~name substitution.
*/
+/* BIN_EXP:
+ * This symbol is the filename expanded version of the BIN symbol, for
+ * programs that do not want to deal with that at run-time.
+ */
#define BIN "/opt/perl/bin" /**/
+#define BIN_EXP "/opt/perl/bin" /**/
/* CAT2:
* This macro catenates 2 tokens together.
@@ -1342,14 +1347,6 @@
*/
#define RANDBITS 15 /**/
-/* SCRIPTDIR:
- * This symbol holds the name of the directory in which the user wants
- * to put publicly executable scripts for the package in question. It
- * is often a directory that is mounted across diverse architectures.
- * Programs must be prepared to deal with ~name expansion.
- */
-#define SCRIPTDIR "/opt/perl/script" /**/
-
/* Select_fd_set_t:
* This symbol holds the type used for the 2nd, 3rd, and 4th
* arguments to select. Usually, this is 'fd_set *', if HAS_FD_SET
diff --git a/config_h.SH b/config_h.SH
index 893e71eb42..23cb89623b 100755
--- a/config_h.SH
+++ b/config_h.SH
@@ -54,7 +54,12 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
* This symbol holds the path of the bin directory where the package will
* be installed. Program must be prepared to deal with ~name substitution.
*/
+/* BIN_EXP:
+ * This symbol is the filename expanded version of the BIN symbol, for
+ * programs that do not want to deal with that at run-time.
+ */
#define BIN "$bin" /**/
+#define BIN_EXP "$binexp" /**/
/* CAT2:
* This macro catenates 2 tokens together.
@@ -1356,14 +1361,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#define RANDBITS $randbits /**/
-/* SCRIPTDIR:
- * This symbol holds the name of the directory in which the user wants
- * to put publicly executable scripts for the package in question. It
- * is often a directory that is mounted across diverse architectures.
- * Programs must be prepared to deal with ~name expansion.
- */
-#define SCRIPTDIR "$scriptdir" /**/
-
/* Select_fd_set_t:
* This symbol holds the type used for the 2nd, 3rd, and 4th
* arguments to select. Usually, this is 'fd_set *', if HAS_FD_SET
diff --git a/ext/DB_File/DB_File.pm b/ext/DB_File/DB_File.pm
index c8a7e3eadc..d962b88b2e 100644
--- a/ext/DB_File/DB_File.pm
+++ b/ext/DB_File/DB_File.pm
@@ -1144,7 +1144,7 @@ destroyed.
undef $db ;
untie %hash ;
-See L<The untie gotcha> for more details.
+See L<The untie Gotcha> for more details.
All the functions defined in L<dbopen> are available except for
close() and dbopen() itself. The B<DB_File> method interface to the
diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm
index e04689d9b8..51dce5939e 100644
--- a/ext/Socket/Socket.pm
+++ b/ext/Socket/Socket.pm
@@ -47,6 +47,8 @@ all of the commonly used pound-defines like AF_INET, SOCK_STREAM, etc.
In addition, some structure manipulation functions are available:
+=over
+
=item inet_aton HOSTNAME
Takes a string giving the name of a host, and translates that
@@ -144,6 +146,8 @@ Takes a sockaddr_un structure (as returned by pack_sockaddr_un())
and returns the pathname. Will croak if the structure does not
have AF_UNIX in the right place.
+=back
+
=cut
use Carp;
diff --git a/lib/Class/Template.pm b/lib/Class/Template.pm
index 23a0d5ba83..38c2e98e66 100644
--- a/lib/Class/Template.pm
+++ b/lib/Class/Template.pm
@@ -45,6 +45,8 @@ This module uses perl5 classes to create nested data types.
=head1 EXAMPLES
+=over
+
=item * Example 1
use Class::Template;
@@ -83,6 +85,8 @@ This module uses perl5 classes to create nested data types.
bless $r;
}
+=back
+
=head1 NOTES
Use '%' if the member should point to an anonymous hash. Use '@' if the
diff --git a/lib/ExtUtils/Embed.pm b/lib/ExtUtils/Embed.pm
index 4d2ed6a77a..39d797e430 100644
--- a/lib/ExtUtils/Embed.pm
+++ b/lib/ExtUtils/Embed.pm
@@ -272,6 +272,8 @@ ccdlflags(), xsi_header(), xsi_protos(), xsi_body()
=head1 FUNCTIONS
+=over
+
=item xsinit()
Generate C/C++ code for the XS initializer function.
@@ -454,6 +456,8 @@ function to B<boot_ModuleName> for each @modules.
B<xsinit()> uses the xsi_* functions to generate most of it's code.
+=back
+
=head1 EXAMPLES
For examples on how to use B<ExtUtils::Embed> for building C/C++ applications
diff --git a/lib/ExtUtils/MM_VMS.pm b/lib/ExtUtils/MM_VMS.pm
index aca41ea371..0e2897c1ad 100644
--- a/lib/ExtUtils/MM_VMS.pm
+++ b/lib/ExtUtils/MM_VMS.pm
@@ -36,6 +36,8 @@ the semantics.
=head2 Methods always loaded
+=over
+
=item eliminate_macros
Expands MM[KS]/Make macros in a text string, using the contents of
@@ -312,6 +314,7 @@ sub ext {
ExtUtils::Liblist::ext(@_);
}
+=back
=head2 SelfLoaded methods
@@ -321,6 +324,8 @@ For overridden methods, documentation is limited to an explanation
of why this method overrides the MM_Unix method; see the ExtUtils::MM_Unix
documentation for more details.
+=over
+
=item guess_name (override)
Try to determine name of extension being built. We begin with the name
@@ -1111,12 +1116,17 @@ default MM_Unix method.
sub dist {
my($self, %attribs) = @_;
$attribs{VERSION} ||= $self->{VERSION_SYM};
+ $attribs{NAME} ||= $self->{DISTNAME};
$attribs{ZIPFLAGS} ||= '-Vu';
$attribs{COMPRESS} ||= 'gzip';
$attribs{SUFFIX} ||= '-gz';
$attribs{SHAR} ||= 'vms_share';
$attribs{DIST_DEFAULT} ||= 'zipdist';
+ # Sanitize these for use in $(DISTVNAME) filespec
+ $attribs{VERSION} =~ s/[^\w\$]/_/g;
+ $attribs{NAME} =~ s/[^\w\$]/_/g;
+
return ExtUtils::MM_Unix::dist($self,%attribs);
}
@@ -1745,28 +1755,28 @@ sub dist_core {
my($self) = @_;
q[
dist : $(DIST_DEFAULT)
- $(NOECHO) $(PERL) -le "print 'Warning: $m older than $vf' if -e ($vf = '$(VERSION_FROM)') && -M $vf < -M ($m = '$(MAKEFILE)'"
+ $(NOECHO) $(PERL) -le "print 'Warning: $m older than $vf' if -e ($vf = '$(VERSION_FROM)') && -M $vf < -M ($m = '$(MAKEFILE)')"
zipdist : $(DISTVNAME).zip
$(NOECHO) $(NOOP)
$(DISTVNAME).zip : distdir
$(PREOP)
- $(ZIP) "$(ZIPFLAGS)" $(MMS$TARGET) $(SRC)
+ $(ZIP) "$(ZIPFLAGS)" $(MMS$TARGET) [.$(DISTVNAME)...]*.*;
$(RM_RF) $(DISTVNAME)
$(POSTOP)
$(DISTVNAME).tar$(SUFFIX) : distdir
$(PREOP)
$(TO_UNIX)
- $(TAR) "$(TARFLAGS)" $(DISTVNAME).tar $(SRC)
+ $(TAR) "$(TARFLAGS)" $(DISTVNAME).tar [.$(DISTVNAME)]
$(RM_RF) $(DISTVNAME)
$(COMPRESS) $(DISTVNAME).tar
$(POSTOP)
shdist : distdir
$(PREOP)
- $(SHARE) $(SRC) $(DISTVNAME).share
+ $(SHAR) [.$(DISTVNAME...]*.*; $(DISTVNAME).share
$(RM_RF) $(DISTVNAME)
$(POSTOP)
];
@@ -2353,5 +2363,9 @@ sub nicetext {
1;
+=back
+
+=cut
+
__END__
diff --git a/lib/ExtUtils/Mksymlists.pm b/lib/ExtUtils/Mksymlists.pm
index eeed4bf794..4c6814cbcb 100644
--- a/lib/ExtUtils/Mksymlists.pm
+++ b/lib/ExtUtils/Mksymlists.pm
@@ -164,6 +164,8 @@ C<Mksymlists>, which is exported by default from C<ExtUtils::Mksymlists>.
It takes one argument, a list of key-value pairs, in which the following
keys are recognized:
+=over
+
=item NAME
This gives the name of the extension (I<e.g.> Tk::Canvas) for which
@@ -217,6 +219,8 @@ extension itself (for instance, some linkers add an '_' to the
name of the extension). If it is not specified, it is derived
from the NAME attribute. It is presently used only by OS2.
+=back
+
When calling C<Mksymlists>, one should always specify the NAME
attribute. In most cases, this is all that's necessary. In
the case of unusual extensions, however, the other attributes
diff --git a/lib/File/Basename.pm b/lib/File/Basename.pm
index dd7cdcf82e..6abfcd2cb4 100644
--- a/lib/File/Basename.pm
+++ b/lib/File/Basename.pm
@@ -95,6 +95,8 @@ would yield
$dir eq 'Doc_Root:[Help]'
$type eq '.Rnh'
+=over
+
=item C<basename>
The basename() routine returns the first element of the list produced
@@ -116,6 +118,8 @@ cases. For example, for the input file specification F<lib/>, fileparse()
considers the directory name to be F<lib/>, while dirname() considers the
directory name to be F<.>).
+=back
+
=cut
require 5.002;
diff --git a/lib/File/stat.pm b/lib/File/stat.pm
index 014af60c5b..82cb3f6df3 100644
--- a/lib/File/stat.pm
+++ b/lib/File/stat.pm
@@ -50,7 +50,7 @@ __END__
=head1 NAME
-File::stat.pm - by-name interface to Perl's built-in stat() functions
+File::stat - by-name interface to Perl's built-in stat() functions
=head1 SYNOPSIS
diff --git a/lib/Time/gmtime.pm b/lib/Time/gmtime.pm
index 35233f586a..353ade49ef 100644
--- a/lib/Time/gmtime.pm
+++ b/lib/Time/gmtime.pm
@@ -35,7 +35,7 @@ __END__
=head1 NAME
-Time::gmtime.pm - by-name interface to Perl's built-in gmtime() function
+Time::gmtime - by-name interface to Perl's built-in gmtime() function
=head1 SYNOPSIS
diff --git a/lib/Time/localtime.pm b/lib/Time/localtime.pm
index 2e811e627f..8f7695b0f5 100644
--- a/lib/Time/localtime.pm
+++ b/lib/Time/localtime.pm
@@ -36,7 +36,7 @@ __END__
=head1 NAME
-Time::localtime.pm - by-name interface to Perl's built-in localtime() function
+Time::localtime - by-name interface to Perl's built-in localtime() function
=head1 SYNOPSIS
diff --git a/lib/Time/tm.pm b/lib/Time/tm.pm
index d1df295683..7041432c0d 100644
--- a/lib/Time/tm.pm
+++ b/lib/Time/tm.pm
@@ -11,7 +11,7 @@ __END__
=head1 NAME
-Time::tm.pm - internal object used by Time::gmtime and Time::localtime
+Time::tm - internal object used by Time::gmtime and Time::localtime
=head1 SYNOPSIS
diff --git a/lib/User/grent.pm b/lib/User/grent.pm
index 1185958430..3c4635ba2a 100644
--- a/lib/User/grent.pm
+++ b/lib/User/grent.pm
@@ -37,7 +37,7 @@ __END__
=head1 NAME
-User::grent.pm - by-name interface to Perl's built-in getgr*() functions
+User::grent - by-name interface to Perl's built-in getgr*() functions
=head1 SYNOPSIS
diff --git a/lib/User/pwent.pm b/lib/User/pwent.pm
index 9f41fe9f39..a027fe627b 100644
--- a/lib/User/pwent.pm
+++ b/lib/User/pwent.pm
@@ -49,7 +49,7 @@ __END__
=head1 NAME
-User::pwent.pm - by-name interface to Perl's built-in getpw*() functions
+User::pwent - by-name interface to Perl's built-in getpw*() functions
=head1 SYNOPSIS
diff --git a/op.c b/op.c
index f27aa94360..3b05012774 100644
--- a/op.c
+++ b/op.c
@@ -1264,6 +1264,20 @@ OP *right;
{
OP *op;
+ if (dowarn &&
+ (left->op_type == OP_RV2AV ||
+ left->op_type == OP_RV2HV ||
+ left->op_type == OP_PADAV ||
+ left->op_type == OP_PADHV)) {
+ char *desc = op_desc[(right->op_type == OP_SUBST ||
+ right->op_type == OP_TRANS)
+ ? right->op_type : OP_MATCH];
+ char *sample = ((left->op_type == OP_RV2AV ||
+ left->op_type == OP_PADAV)
+ ? "@array" : "%hash");
+ warn("Applying %s to %s will act on scalar(%s)", desc, sample, sample);
+ }
+
if (right->op_type == OP_MATCH ||
right->op_type == OP_SUBST ||
right->op_type == OP_TRANS) {
@@ -3192,6 +3206,7 @@ OP *block;
else
s = name;
if (strEQ(s, "BEGIN") && !error_count) {
+ I32 oldscope = scopestack_ix;
ENTER;
SAVESPTR(compiling.cop_filegv);
SAVEI16(compiling.cop_line);
@@ -3204,7 +3219,7 @@ OP *block;
DEBUG_x( dump_sub(gv) );
av_push(beginav, (SV *)cv);
GvCV(gv) = 0;
- calllist(beginav);
+ calllist(oldscope, beginav);
curcop = &compiling;
LEAVE;
@@ -4399,7 +4414,6 @@ OP *op;
}
else
list(o);
- mod(o, OP_ENTERSUB);
prev = o;
o = o->op_sibling;
}
diff --git a/patchlevel.h b/patchlevel.h
index 42143c3cfc..15e2194ec8 100644
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -1,5 +1,5 @@
#define PATCHLEVEL 3
-#define SUBVERSION 92
+#define SUBVERSION 93
/*
local_patches -- list of locally applied less-than-subversion patches.
diff --git a/perl.c b/perl.c
index d799f2b61f..06534ff7b2 100644
--- a/perl.c
+++ b/perl.c
@@ -449,6 +449,7 @@ char **env;
char *scriptname = NULL;
VOL bool dosearch = FALSE;
char *validarg = "";
+ I32 oldscope;
AV* comppadlist;
#ifdef SETUID_SCRIPTS_ARE_SECURE_NOW
@@ -496,6 +497,7 @@ setuid perl scripts securely.\n");
main_cv = Nullcv;
time(&basetime);
+ oldscope = scopestack_ix;
mustcatch = FALSE;
switch (Sigsetjmp(top_env,1)) {
@@ -504,9 +506,11 @@ setuid perl scripts securely.\n");
/* FALL THROUGH */
case 2:
/* my_exit() was called */
+ while (scopestack_ix > oldscope)
+ LEAVE;
curstash = defstash;
if (endav)
- calllist(endav);
+ calllist(oldscope, endav);
return STATUS_NATIVE_EXPORT;
case 3:
mustcatch = FALSE;
@@ -783,17 +787,24 @@ int
perl_run(sv_interp)
PerlInterpreter *sv_interp;
{
+ I32 oldscope;
+
if (!(curinterp = sv_interp))
return 255;
+
+ oldscope = scopestack_ix;
+
switch (Sigsetjmp(top_env,1)) {
case 1:
cxstack_ix = -1; /* start context stack again */
break;
case 2:
/* my_exit() was called */
+ while (scopestack_ix > oldscope)
+ LEAVE;
curstash = defstash;
if (endav)
- calllist(endav);
+ calllist(oldscope, endav);
FREETMPS;
#ifdef DEBUGGING_MSTATS
if (getenv("PERL_DEBUG_MSTATS"))
@@ -1476,7 +1487,7 @@ my_unexec()
extern int etext;
sprintf (buf, "%s.perldump", origfilename);
- sprintf (tokenbuf, "%s/perl", BIN);
+ sprintf (tokenbuf, "%s/perl", BIN_EXP);
status = unexec(buf, tokenbuf, &etext, sbrk(0), 0);
if (status)
@@ -1650,7 +1661,7 @@ SV *sv;
char *cpp = CPPSTDIN;
if (strEQ(cpp,"cppstdin"))
- sprintf(tokenbuf, "%s/%s", SCRIPTDIR, cpp);
+ sprintf(tokenbuf, "%s/%s", BIN_EXP, cpp);
else
sprintf(tokenbuf, "%s", cpp);
sv_catpv(sv,"-I");
@@ -1733,7 +1744,7 @@ sed %s -e \"/^[^#]/b\" \
#ifndef IAMSUID /* in case script is not readable before setuid */
if (euid && Stat(SvPVX(GvSV(curcop->cop_filegv)),&statbuf) >= 0 &&
statbuf.st_mode & (S_ISUID|S_ISGID)) {
- (void)sprintf(buf, "%s/sperl%s", BIN, patchlevel);
+ (void)sprintf(buf, "%s/sperl%s", BIN_EXP, patchlevel);
execv(buf, origargv); /* try again */
croak("Can't do setuid\n");
}
@@ -1881,7 +1892,7 @@ FIX YOUR KERNEL, PUT A C WRAPPER AROUND THIS SCRIPT, OR USE -u AND UNDUMP!\n");
if (euid) { /* oops, we're not the setuid root perl */
(void)PerlIO_close(rsfp);
#ifndef IAMSUID
- (void)sprintf(buf, "%s/sperl%s", BIN, patchlevel);
+ (void)sprintf(buf, "%s/sperl%s", BIN_EXP, patchlevel);
execv(buf, origargv); /* try again */
#endif
croak("Can't do setuid\n");
@@ -1966,7 +1977,7 @@ FIX YOUR KERNEL, PUT A C WRAPPER AROUND THIS SCRIPT, OR USE -u AND UNDUMP!\n");
fcntl(PerlIO_fileno(rsfp),F_SETFD,0); /* ensure no close-on-exec */
#endif
- (void)sprintf(tokenbuf, "%s/perl%s", BIN, patchlevel);
+ (void)sprintf(tokenbuf, "%s/perl%s", BIN_EXP, patchlevel);
execv(tokenbuf, origargv); /* try again */
croak("Can't do setuid\n");
#endif /* IAMSUID */
@@ -2426,7 +2437,8 @@ int addsubdirs;
}
void
-calllist(list)
+calllist(oldscope, list)
+I32 oldscope;
AV* list;
{
Sigjmp_buf oldtop;
@@ -2454,6 +2466,8 @@ AV* list;
sv_catpv(atsv, "BEGIN failed--compilation aborted");
else
sv_catpv(atsv, "END failed--cleanup aborted");
+ while (scopestack_ix > oldscope)
+ LEAVE;
croak("%s", SvPVX(atsv));
}
}
@@ -2463,9 +2477,11 @@ AV* list;
/* FALL THROUGH */
case 2:
/* my_exit() was called */
+ while (scopestack_ix > oldscope)
+ LEAVE;
curstash = defstash;
if (endav)
- calllist(endav);
+ calllist(oldscope, endav);
FREETMPS;
Copy(oldtop, top_env, 1, Sigjmp_buf);
curcop = &compiling;
diff --git a/plan9/buildinfo b/plan9/buildinfo
index ac81a7f96f..97d00f43be 100644
--- a/plan9/buildinfo
+++ b/plan9/buildinfo
@@ -1 +1 @@
-p9pvers = 5.003_92
+p9pvers = 5.003_93
diff --git a/plan9/config.plan9 b/plan9/config.plan9
index 8b6b89ff8d..9965c73d37 100644
--- a/plan9/config.plan9
+++ b/plan9/config.plan9
@@ -49,7 +49,12 @@
* This symbol holds the path of the bin directory where the package will
* be installed. Program must be prepared to deal with ~name substitution.
*/
+/* BIN_EXP:
+ * This symbol is the filename expanded version of the BIN symbol, for
+ * programs that do not want to deal with that at run-time.
+ */
#define BIN "/_P9P_OBJTYPE/bin" /* */
+#define BIN_EXP "/_P9P_OBJTYPE/bin" /* */
/* BINCOMPAT3:
* This symbol, if defined, indicates that Perl 5.004 should be
@@ -1308,14 +1313,6 @@
*/
#define RANDBITS 15 /**/
-/* SCRIPTDIR:
- * This symbol holds the name of the directory in which the user wants
- * to put publicly executable scripts for the package in question. It
- * is often a directory that is mounted across diverse architectures.
- * Programs must be prepared to deal with ~name expansion.
- */
-#define SCRIPTDIR "/bin"
-
/* Select_fd_set_t:
* This symbol holds the type used for the 2nd, 3rd, and 4th
* arguments to select. Usually, this is 'fd_set *', if HAS_FD_SET
diff --git a/pod/perlcall.pod b/pod/perlcall.pod
index dc965009d6..9a4a886a59 100644
--- a/pod/perlcall.pod
+++ b/pod/perlcall.pod
@@ -565,7 +565,7 @@ Next, we come to XPUSHs. This is where the parameters actually get
pushed onto the stack. In this case we are pushing a string and an
integer.
-See the L<perlguts/"XSUBs and the Argument Stack"> for details
+See the L<perlguts/"XSUB's and the Argument Stack"> for details
on how the XPUSH macros work.
=item 6.
diff --git a/pod/perldebug.pod b/pod/perldebug.pod
index 0c61b74350..a682de1ade 100644
--- a/pod/perldebug.pod
+++ b/pod/perldebug.pod
@@ -465,8 +465,6 @@ corresponds to F</dev/ttyc>, say, by issuing a command like
See L<"Debugger Internals"> below for more details.
-=over 12
-
=item E<lt> [ command ]
Set an action (Perl command) to happen before every debugger prompt.
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 734e940b42..cf6036ff02 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -27,12 +27,17 @@ might have symbol conflicts if you embed Perl in another application,
just as in the 5.003 release. By default, binary compatibility
is preserved at the expense of symbol table pollution.
-=head2 New Opcode Module and Revised Safe Module
+=head2 Subroutine Parameters Are Not Autovivified
-A new Opcode module supports the creation, manipulation and
-application of opcode masks. The revised Safe module has a new API
-and is implemented using the new Opcode module. Please read the new
-Opcode and Safe documentation.
+In Perl versions 5.002 and 5.003, array and hash elements used as
+subroutine parameters were "autovivified"; that is, they were brought
+into existence if they did not already exist. For example, calling
+C<func($h{foo})> would create C<$h{foo}> if it did not already exist,
+causing C<exists $h{foo}> to become true and C<keys %h> to return
+C<('foo')>.
+
+Perl 5.004 returns to the pre-5.002 behavior of I<not> autovivifying
+array and hash elements used as subroutine parameters.
=head2 Fixed Parsing of $$<digit>, &$<digit>, etc.
@@ -52,6 +57,13 @@ previously-working script to now fail -- which should be construed
as a blessing, since that indicates a potentially-serious security
hole was just plugged.
+=head2 New Opcode Module and Revised Safe Module
+
+A new Opcode module supports the creation, manipulation and
+application of opcode masks. The revised Safe module has a new API
+and is implemented using the new Opcode module. Please read the new
+Opcode and Safe documentation.
+
=head2 Internal Change: FileHandle Class Based on IO::* Classes
File handles are now stored internally as type IO::Handle. The
@@ -222,7 +234,7 @@ would yield the same sequence of random numbers on most or all machines.
Now, when perl sees that you're calling C<rand> and haven't yet called
C<srand>, it calls C<srand> with the default seed. You should still call
C<srand> manually if your code might ever be run on a pre-5.004 system,
-of course, or if you want a seed other than the default.
+of course, or if you want a seed other than the default.
=item $_ as Default
@@ -241,8 +253,8 @@ zero-width assertion. See L<perlop> and L<perlre>.
=item nested C<sub{}> closures work now
-Prior to the 5.004 release, nested anonymous functions
-didn't work right. They do now.
+Prior to the 5.004 release, nested anonymous functions didn't work
+right. They do now.
=item formats work right on changing lexicals
@@ -258,7 +270,7 @@ before, and is fine now:
$i
.
write;
- }
+ }
=back
@@ -324,9 +336,9 @@ This is the constructor for the class. That means it is expected to
return an object of some sort. The reference can be used to
hold some internal information.
- sub TIEHANDLE {
- print "<shout>\n";
- my $i;
+ sub TIEHANDLE {
+ print "<shout>\n";
+ my $i;
return bless \$i, shift;
}
@@ -336,29 +348,46 @@ This method will be triggered every time the tied handle is printed to.
Beyond its self reference it also expects the list that was passed to
the print function.
- sub PRINT {
- $r = shift;
- $$r++;
+ sub PRINT {
+ $r = shift;
+ $$r++;
return print join( $, => map {uc} @_), $\;
}
+=item READ this LIST
+
+This method will be called when the handle is read from via the C<read>
+or C<sysread> functions.
+
+ sub READ {
+ $r = shift;
+ my($buf,$len,$offset) = @_;
+ print "READ called, \$buf=$buf, \$len=$len, \$offset=$offset";
+ }
+
=item READLINE this
This method will be called when the handle is read from. The method
should return undef when there is no more data.
- sub READLINE {
- $r = shift;
- return "PRINT called $$r times\n";
+ sub READLINE {
+ $r = shift;
+ return "PRINT called $$r times\n"
}
+=item GETC this
+
+This method will be called when the C<getc> function is called.
+
+ sub GETC { print "Don't GETC, Get Perl"; return "a"; }
+
=item DESTROY this
As with the other types of ties, this method will be called when the
tied handle is about to be destroyed. This is useful for debugging and
possibly for cleaning up.
- sub DESTROY {
+ sub DESTROY {
print "</shout>\n";
}
@@ -366,8 +395,15 @@ possibly for cleaning up.
=head2 Malloc Enhancements
-If perl's malloc() is used, you can print memory statistics at runtime
-by running Perl thusly:
+Four new compilation flags are recognized by malloc.c. (They have no
+effect if perl is compiled with system malloc().)
+
+=over
+
+=item -DDEBUGGING_MSTATS
+
+If perl is compiled with C<DEBUGGING_MSTATS> defined, you can print
+memory statistics at runtime by running Perl thusly:
env PERL_DEBUG_MSTATS=2 perl your_script_here
@@ -376,11 +412,6 @@ exit; with a value of 1, the statistics ares printed only on exit.
(If you want the statistics at an arbitrary time, you'll need to
install the optional module Devel::Peek.)
-In addition, three new compilation flags are recognized by malloc.c.
-(They have no effect if perl is compiled with system malloc().)
-
-=over
-
=item -DEMERGENCY_SBRK
If this macro is defined, running out of memory need not be a fatal
@@ -498,7 +529,7 @@ New constants in the existing Fcntl modules are now supported,
provided that your operating system happens to support them:
F_GETOWN F_SETOWN
- O_ASYNC O_DEFER O_DSYNC O_FSYNC O_SYNC
+ O_ASYNC O_DEFER O_DSYNC O_FSYNC O_SYNC
O_EXLOCK O_SHLOCK
These constants are intended for use with the Perl operators sysopen()
@@ -747,7 +778,7 @@ Although not new, this has been massively updated.
Several new conditions will trigger warnings that were
silent before. Some only affect certain platforms.
-The following new warnings and errors outline these.
+The following new warnings and errors outline these.
These messages are classified as follows (listed in
increasing order of desperation):
@@ -906,7 +937,7 @@ used.)
You probably wrote something like this:
- @list = qw(
+ @list = qw(
a # a comment
b # another comment
);
@@ -914,7 +945,7 @@ You probably wrote something like this:
when you should have written this:
@list = qw(
- a
+ a
b
);
@@ -933,7 +964,7 @@ aren't needed to separate the items. (You may have used different
delimiters than the parentheses shown here; braces are also frequently
used.)
-You probably wrote something like this:
+You probably wrote something like this:
qw! a, b, c !;
@@ -1077,4 +1108,4 @@ Constructed by Tom Christiansen, grabbing material with permission
from innumerable contributors, with kibitzing by more than a few Perl
porters.
-Last update: Tue Jan 14 14:03:02 EST 1997
+Last update: Sat Mar 8 19:51:26 EST 1997
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index c21e28a913..24b16128dd 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -180,6 +180,15 @@ the return value of your socket() call? See L<perlfunc/accept>.
(F) You can't allocate more than 2^31+"small amount" bytes.
+=item Applying %s to %s will act on scalar(%s)
+
+(W) The pattern match (//), substitution (s///), and translation (tr///)
+operators work on scalar values. If you apply one of them to an array
+or a hash, it will convert the array or hash to a scalar value -- the
+length of an array, or the population info of a hash -- and then work on
+that scalar value. This is probably not what you meant to do. See
+L<perlfunc/grep> and L<perlfunc/map> for alternatives.
+
=item Arg too short for msgsnd
(F) msgsnd() requires a string at least as long as sizeof(long).
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 09b5ad3df7..eb7276a3b4 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -1517,7 +1517,7 @@ Note that, because $_ is a reference into the list value, it can be used
to modify the elements of the array. While this is useful and
supported, it can cause bizarre results if the LIST is not a named
array. Similarly, grep returns aliases into the original list,
-much like the way that L<foreach>'s index variable aliases the list
+much like the way that L<Foreach Loops>'s index variable aliases the list
elements. That is, modifying an element of a list returned by grep
actually modifies the element in the original list.
diff --git a/pod/perlguts.pod b/pod/perlguts.pod
index 21e4b2c789..8c78802fb4 100644
--- a/pod/perlguts.pod
+++ b/pod/perlguts.pod
@@ -162,7 +162,7 @@ bus error, or just weird results. Change the zero to C<&sv_undef> in the first
line and all will be well.
To free an SV that you've created, call C<SvREFCNT_dec(SV*)>. Normally this
-call is not necessary (see the section on L<Mortality>).
+call is not necessary (see the section on L<Reference Counts and Mortality>).
=head2 What's Really Stored in an SV?
@@ -422,8 +422,8 @@ A reference can be blessed into a package with the following function:
SV* sv_bless(SV* sv, HV* stash);
The C<sv> argument must be a reference. The C<stash> argument specifies
-which class the reference will belong to. See the section on L<Stashes>
-for information on converting class names into stashes.
+which class the reference will belong to. See the section on
+L<Stashes and Globs> for information on converting class names into stashes.
/* Still under construction */
@@ -995,7 +995,7 @@ The correspondence between OP's and I<target>s is not 1-to-1. Different
OP's in the compile tree of the unit can use the same target, if this
would not conflict with the expected life of the temporary.
-=head2 Scratchpads and recursions
+=head2 Scratchpads and recursion
In fact it is not 100% true that a compiled unit contains a pointer to
the scratchpad AV. In fact it contains a pointer to an AV of
diff --git a/pod/perllocale.pod b/pod/perllocale.pod
index 9ac77b8e48..d393b81483 100644
--- a/pod/perllocale.pod
+++ b/pod/perllocale.pod
@@ -63,7 +63,7 @@ C<define>.
If you want a Perl application to process and present your data
according to a particular locale, the application code should include
-the S<C<use locale>> pragma (see L<The use locale Pragma>) where
+the S<C<use locale>> pragma (see L<The use locale pragma>) where
appropriate, and B<at least one> of the following must be true:
=over 4
@@ -345,7 +345,7 @@ call strxfrm() for both their operands, then do a byte-by-byte
comparison of the transformed strings. By calling strxfrm() explicitly,
and using a non locale-affected comparison, the example attempts to save
a couple of transformations. In fact, it doesn't save anything: Perl
-magic (see L<perlguts/Magic>) creates the transformed version of a
+magic (see L<perlguts/Magic Variables>) creates the transformed version of a
string the first time it's needed in a comparison, then keeps it around
in case it's needed again. An example rewritten the easy way with
C<cmp> runs just about as fast. It also copes with null characters
@@ -703,7 +703,7 @@ L<The setlocale function>) was always in force, even if the program
environment suggested otherwise. By default, Perl still behaves this
way so as to maintain backward compatibility. If you want a Perl
application to pay attention to locale information, you B<must> use
-the S<C<use locale>> pragma (see L<The S<C<use locale>> Pragma>) to
+the S<C<use locale>> pragma (see L<The use locale Pragma>) to
instruct it to do so.
Versions of Perl from 5.002 to 5.003 did use the C<LC_CTYPE>
diff --git a/pod/perlop.pod b/pod/perlop.pod
index 88a8af0fd4..71794fa759 100644
--- a/pod/perlop.pod
+++ b/pod/perlop.pod
@@ -88,7 +88,7 @@ Also parsed as terms are the C<do {}> and C<eval {}> constructs, as
well as subroutine and method calls, and the anonymous
constructors C<[]> and C<{}>.
-See also L<Quote and Quote-Like Operators> toward the end of this section,
+See also L<Quote and Quote-like Operators> toward the end of this section,
as well as L<"I/O Operators">.
=head2 The Arrow Operator
diff --git a/pod/perlsub.pod b/pod/perlsub.pod
index a38d05be25..9d725abe0d 100644
--- a/pod/perlsub.pod
+++ b/pod/perlsub.pod
@@ -48,15 +48,8 @@ there's really no difference from the language's perspective.)
Any arguments passed to the routine come in as the array @_. Thus if you
called a function with two arguments, those would be stored in C<$_[0]>
and C<$_[1]>. The array @_ is a local array, but its values are implicit
-references (predating L<perlref>) to the actual scalar parameters. What
-this means in practice is that when you explicitly modify C<$_[0]> et al.,
-you will be changing the actual arguments. As a result, all arguments
-to functions are treated as lvalues. Any hash or array elements that are
-passed to functions will get created if they do not exist (irrespective
-of whether the function does modify the contents of C<@_>). This is
-frequently a source of surprise. See L<perltrap> for an example.
-
-The return value of the subroutine is the value of the last expression
+references (predating L<perlref>) to the actual scalar parameters. The
+return value of the subroutine is the value of the last expression
evaluated. Alternatively, a return statement may be used to specify the
returned value and exit the subroutine. If you return one or more arrays
and/or hashes, these will be flattened together into one large
@@ -503,7 +496,7 @@ Even if you don't want to modify an array, this mechanism is useful for
passing multiple arrays in a single LIST, because normally the LIST
mechanism will merge all the array values so that you can't extract out
the individual arrays. For more on typeglobs, see
-L<perldata/"Typeglobs and FileHandles">.
+L<perldata/"Typeglobs and Filehandles">.
=head2 Pass by Reference
diff --git a/pod/perltie.pod b/pod/perltie.pod
index ffd348fcc1..8dc7c17c14 100644
--- a/pod/perltie.pod
+++ b/pod/perltie.pod
@@ -413,7 +413,7 @@ Here's the constructor:
It's probably worth mentioning that if you're going to filetest the
return values out of a readdir, you'd better prepend the directory
in question. Otherwise, because we didn't chdir() there, it would
-have been testing the wrong file.
+have been testing the wrong file.
=item FETCH this, key
@@ -610,8 +610,9 @@ use the each() function to iterate over such. Example:
This is partially implemented now.
-A class implementing a tied filehandle should define the following methods:
-TIEHANDLE, PRINT and/or READLINE, and possibly DESTROY.
+A class implementing a tied filehandle should define the following
+methods: TIEHANDLE, at least one of PRINT, READLINE, GETC, or READ,
+and possibly DESTROY.
It is especially useful when perl is embedded in some other program,
where output to STDOUT and STDERR may have to be redirected in some
@@ -639,13 +640,30 @@ the print function.
sub PRINT { $r = shift; $$r++; print join($,,map(uc($_),@_)),$\ }
+=item READ this LIST
+
+This method will be called when the handle is read from via the C<read>
+or C<sysread> functions.
+
+ sub READ {
+ $r = shift;
+ my($buf,$len,$offset) = @_;
+ print "READ called, \$buf=$buf, \$len=$len, \$offset=$offset";
+ }
+
=item READLINE this
-This method will be called when the handle is read from. The method
-should return undef when there is no more data.
+This method will be called when the handle is read from via <HANDLE>.
+The method should return undef when there is no more data.
sub READLINE { $r = shift; "PRINT called $$r times\n"; }
+=item GETC this
+
+This method will be called when the C<getc> function is called.
+
+ sub GETC { print "Don't GETC, Get Perl"; return "a"; }
+
=item DESTROY this
As with the other types of ties, this method will be called when the
diff --git a/pod/perltoc.pod b/pod/perltoc.pod
index 9e943d1623..eb59cda02e 100644
--- a/pod/perltoc.pod
+++ b/pod/perltoc.pod
@@ -50,12 +50,14 @@ expression enhancements, Innumerable Unbundled Modules, Compilability
=item Compilation Option: Binary Compatibility With 5.003
-=item New Opcode Module and Revised Safe Module
+=item Subroutine Parameters Are Not Autovivified
=item Fixed Parsing of $$<digit>, &$<digit>, etc.
=item Changes to Tainting Checks
+=item New Opcode Module and Revised Safe Module
+
=item Internal Change: FileHandle Class Based on IO::* Classes
=item Internal Change: PerlIO internal IO abstraction interface
@@ -78,11 +80,12 @@ isa(CLASS), can(METHOD), VERSION( [NEED] )
=item TIEHANDLE Now Supported
-TIEHANDLE classname, LIST, PRINT this, LIST, READLINE this, DESTROY this
+TIEHANDLE classname, LIST, PRINT this, LIST, READ this LIST, READLINE this,
+GETC this, DESTROY this
=item Malloc Enhancements
--DEMERGENCY_SBRK, -DPACK_MALLOC, -DTWO_POT_OPTIMIZE
+-DDEBUGGING_MSTATS, -DEMERGENCY_SBRK, -DPACK_MALLOC, -DTWO_POT_OPTIMIZE
=item Miscellaneous Efficiency Enhancements
@@ -962,7 +965,8 @@ this, NEXTKEY this, lastkey, DESTROY this
=item Tying FileHandles
-TIEHANDLE classname, LIST, PRINT this, LIST, READLINE this, DESTROY this
+TIEHANDLE classname, LIST, PRINT this, LIST, READ this LIST, READLINE this,
+GETC this, DESTROY this
=item The C<untie> Gotcha
@@ -1172,8 +1176,7 @@ Regular Expression
=item Subroutine, Signal, Sorting Traps
-Subroutine calls provide lvalue context to arguments, (Signals), (Sort
-Subroutine), warn() won't let you specify a filehandle
+(Signals), (Sort Subroutine), warn() won't let you specify a filehandle
=item OS Traps
@@ -1480,7 +1483,7 @@ B<PerlIO_get_base(f)>, B<PerlIO_get_bufsiz(f)>
=item Scratchpads
-=item Scratchpads and recursions
+=item Scratchpads and recursion
=back
@@ -3624,6 +3627,6 @@ don't all have manual pages yet:
=head1 AUTHOR
-Larry Wall E<lt>F<larry@wall.org>E<gt>, with the help of oodles
+Larry Wall <F<larry@wall.org>>, with the help of oodles
of other folks.
diff --git a/pod/perltrap.pod b/pod/perltrap.pod
index 6f6688701f..17c576df2f 100644
--- a/pod/perltrap.pod
+++ b/pod/perltrap.pod
@@ -1137,26 +1137,6 @@ general subroutine traps. Includes some OS-Specific traps.
=over 5
-=item * Subroutine calls provide lvalue context to arguments
-
-Beginning with version 5.002, all subroutine arguments are consistently
-given a "value may be modified" context, since all subroutines are able
-to modify their arguments by explicitly referring to C<$_[0]> etc.
-This means that any array and hash elements provided as arguments
-will B<always be created> if they did not exist at the time
-the subroutine is called. (perl5 versions before 5.002 used to provide
-lvalue context for the second and subsequent arguments, and perl4 did
-not provide lvalue context to subroutine arguments at all--even though
-arguments were supposedly modifiable in perl4).
-
- sub test { $_[0] = 1; $_[1] = 2; $_[2] = 3; }
- &test($foo{'bar'}, $bar{'foo'}, $foo[5]);
- print join(':', %foo), '|', join(':',%bar), '|', join(':',@foo);
-
- # perl4 prints: ||
- # perl5 < 5.002 prints: |foo:2|:::::3
- # perl5 >= 5.002 prints: bar:1|foo:2|:::::3
-
=item * (Signals)
Barewords that used to look like strings to Perl will now look like subroutine
diff --git a/pp_sys.c b/pp_sys.c
index a1153c6fe1..6cbca14cd8 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -829,6 +829,7 @@ PP(pp_getc)
{
dSP; dTARGET;
GV *gv;
+ MAGIC *mg;
if (MAXARG <= 0)
gv = stdingv;
@@ -836,6 +837,19 @@ PP(pp_getc)
gv = (GV*)POPs;
if (!gv)
gv = argvgv;
+
+ if (SvMAGICAL(gv) && (mg = mg_find((SV*)gv, 'q'))) {
+ PUSHMARK(SP);
+ XPUSHs(mg->mg_obj);
+ PUTBACK;
+ ENTER;
+ perl_call_method("GETC", GIMME);
+ LEAVE;
+ SPAGAIN;
+ if (GIMME == G_SCALAR)
+ SvSetSV_nosteal(TARG, TOPs);
+ RETURN;
+ }
if (!gv || do_eof(gv)) /* make sure we have fp with something */
RETPUSHUNDEF;
TAINT;
@@ -1126,8 +1140,24 @@ PP(pp_sysread)
Sock_size_t bufsize;
SV *bufsv;
STRLEN blen;
+ MAGIC *mg;
gv = (GV*)*++MARK;
+ if (SvMAGICAL(gv) && (mg = mg_find((SV*)gv, 'q'))) {
+ SV *sv;
+
+ PUSHMARK(MARK-1);
+ *MARK = mg->mg_obj;
+ ENTER;
+ perl_call_method("READ", G_SCALAR);
+ LEAVE;
+ SPAGAIN;
+ sv = POPs;
+ SP = ORIGMARK;
+ PUSHs(sv);
+ RETURN;
+ }
+
if (!gv)
goto say_undef;
bufsv = *++MARK;
diff --git a/proto.h b/proto.h
index f8ad899c16..9912407980 100644
--- a/proto.h
+++ b/proto.h
@@ -31,7 +31,7 @@ OP* bind_match _((I32 type, OP* left, OP* pat));
OP* block_end _((I32 floor, OP* seq));
int block_start _((int full));
void boot_core_UNIVERSAL _((void));
-void calllist _((AV* list));
+void calllist _((I32 oldscope, AV* list));
I32 cando _((I32 bit, I32 effective, struct stat* statbufp));
#ifndef CASTNEGFLOAT
U32 cast_ulong _((double f));
diff --git a/t/comp/cpp.t b/t/comp/cpp.t
index 880aed836e..00a9e6806a 100755
--- a/t/comp/cpp.t
+++ b/t/comp/cpp.t
@@ -9,7 +9,7 @@ BEGIN {
use Config;
if ( ($Config{'cppstdin'} =~ /\bcppstdin\b/) and
- ( ! -x $Config{'scriptdir'} . "/cppstdin") ) {
+ ( ! -x $Config{'binexp'} . "/cppstdin") ) {
print "1..0\n";
exit; # Cannot test till after install, alas.
}
diff --git a/t/op/misc.t b/t/op/misc.t
index d7a62dccbb..0f251ea354 100755
--- a/t/op/misc.t
+++ b/t/op/misc.t
@@ -196,17 +196,34 @@ BEGIN failed--compilation aborted at - line 1.
}
sub DESTROY {
print "and destroyed as well\n";
- }
+ }
+ sub READ {
+ shift;
+ print STDOUT "foo->can(READ)(@_)\n";
+ return 100;
+ }
+ sub GETC {
+ shift;
+ print STDOUT "Don't GETC, Get Perl\n";
+ return "a";
+ }
}
{
local(*FOO);
tie(*FOO,'foo');
print FOO "sentence.", "reversed", "a", "is", "This";
print "-- ", <FOO>, " --\n";
+ my($buf,$len,$offset);
+ $buf = "string";
+ $len = 10; $offset = 1;
+ read(FOO, $buf, $len, $offset) == 100 or die "foo->READ failed";
+ getc(FOO) eq "a" or die "foo->GETC failed";
}
EXPECT
This is a reversed sentence.
-- Out of inspiration --
+foo->can(READ)(string 10 1)
+Don't GETC, Get Perl
and destroyed as well
########
my @a; $a[2] = 1; for (@a) { $_ = 2 } print "@a\n"
diff --git a/vms/config.vms b/vms/config.vms
index 03051da43d..040895d957 100644
--- a/vms/config.vms
+++ b/vms/config.vms
@@ -76,7 +76,7 @@
* when Perl is built. Please do not change it by hand; make
* any changes to FndVers.Com instead.
*/
-#define ARCHLIB_EXP "/perl_root/lib/VMS_VAX/5_00392" /**/
+#define ARCHLIB_EXP "/perl_root/lib/VMS_VAX/5_00393" /**/
#define ARCHLIB ARCHLIB_EXP /*config-skip*/
/* ARCHNAME:
@@ -979,7 +979,12 @@
* This symbol holds the path of the bin directory where the package will
* be installed. Program must be prepared to deal with ~name substitution.
*/
+/* BIN_EXP:
+ * This symbol is the filename expanded version of the BIN symbol, for
+ * programs that do not want to deal with that at run-time.
+ */
#define BIN "/perl_root/000000" /**/
+#define BIN_EXP "/perl_root/000000" /**/
/* HAS_ALARM:
* This symbol, if defined, indicates that the alarm routine is
@@ -1466,14 +1471,6 @@
#define SITEARCH_EXP "/perl_root/lib/site_perl/VMS_VAX" /**/
#define SITEARCH SITEARCH_EXP /*config-skip*/
-/* SCRIPTDIR:
- * This symbol holds the name of the directory in which the user wants
- * to put publicly executable scripts for the package in question. It
- * is often a directory that is mounted across diverse architectures.
- * Programs must be prepared to deal with ~name expansion.
- */
-#define SCRIPTDIR "/perl_root/script" /**/
-
/* Size_t:
* This symbol holds the type used to declare length parameters
* for string functions. It is usually size_t, but may be
diff --git a/vms/descrip.mms b/vms/descrip.mms
index 184271c14c..c22dcdea16 100644
--- a/vms/descrip.mms
+++ b/vms/descrip.mms
@@ -65,7 +65,7 @@ OBJVAL = $(MMS$TARGET_NAME)$(O)
.endif
# Updated by fndvers.com -- do not edit by hand
-PERL_VERSION = 5_00392#
+PERL_VERSION = 5_00393#
ARCHDIR = [.lib.$(ARCH).$(PERL_VERSION)]
@@ -85,10 +85,11 @@ PIPES_BROKEN = 1
@ @[.vms]fndvers.com "" "" "[.vms]descrip.mms"
@ If F$TrnLnm("Sys").eqs."" Then Define/NoLog SYS GNU_CC_Include:[VMS]
CC = gcc
+PIPES_BROKEN = 1
# -fno-builtin avoids bug in gcc up to version 2.6.2 which can destroy
# data when memcpy() is called on large (>64 kB) blocks of memory
# (fixed in gcc 2.6.3)
-XTRACCFLAGS = /Obj=$(MMS$TARGET_NAME)$(O)/NoCase_Hack/Optimize=2/CC1="""""-fno-builtin"""""
+XTRACCFLAGS = /Obj=$(MMS$TARGET_NAME)$(O)/NoCase_Hack/Optimize=2
DBGSPECFLAGS =
XTRADEF = ,GNUC_ATTRIBUTE_CHECK
XTRAOBJS =
@@ -373,7 +374,7 @@ $(ARCHDIR)config.pm : [.lib]config.pm
$(XSUBPP) $(MMS$SOURCE) >$(MMS$TARGET)
[.ext.dynaloader]dl_vms$(O) : [.ext.dynaloader]dl_vms.c
- $(CC) $(CFLAGS) /Object=$(MMS$TARGET) $(MMS$SOURCE)
+ $(CC) $(CFLAGS) /Include=([],[.ext.dynaloader])/Object=$(MMS$TARGET) $(MMS$SOURCE)
[.lib]DynaLoader.pm : [.ext.dynaloader]dynaloader.pm
Copy/Log/NoConfirm [.ext.dynaloader]dynaloader.pm [.lib]DynaLoader.pm
@@ -550,12 +551,28 @@ IO : [.lib]IO.pm [.lib.IO]File.pm [.lib.IO]Handle.pm [.lib.IO]Pipe.pm [.lib.IO]S
Link $(LINKFLAGS) /Exe=$(MMS$TARGET) $(MMS$SOURCE_LIST) $(CRTLOPTS)
# Accomodate buggy cpp in some version of DECC, which chokes on illegal
-# filespec "y.tab.c"
+# filespec "y.tab.c", and broken gcc cpp, which doesn't start #include ""
+# search in same dir as source file
[.x2p]a2p$(O) : [.x2p]a2p.c $(MINIPERL_EXE)
$(MINIPERL) -pe "s/^#line\s+(\d+)\s+\Q""y.tab.c""/#line $1 ""y_tab.c""/;" $(MMS$SOURCE) >$(MMS$TARGET_NAME)_vms.c
- $(CC) $(CFLAGS) /Object=$(MMS$TARGET) $(MMS$TARGET_NAME)_vms.c
+ $(CC) $(CFLAGS) /Object=$(MMS$TARGET)/Include=([.x2p],[]) $(MMS$TARGET_NAME)_vms.c
Delete/Log/NoConfirm $(MMS$TARGET_NAME)_vms.c;
+# gcc cpp broken -- doesn't look in directory of source file for #include ""
+.ifdef GNUC
+[.x2p]hash$(O) : [.x2p]hash.c
+ $(CC) $(CFLAGS) /Include=[.x2p] $(MMS$SOURCE)
+
+[.x2p]str$(O) : [.x2p]str.c
+ $(CC) $(CFLAGS) /Include=[.x2p] $(MMS$SOURCE)
+
+[.x2p]util$(O) : [.x2p]util.c
+ $(CC) $(CFLAGS) /Include=[.x2p] $(MMS$SOURCE)
+
+[.x2p]walk$(O) : [.x2p]walk.c
+ $(CC) $(CFLAGS) /Include=[.x2p] $(MMS$SOURCE)
+.endif
+
[.lib.pod]pod2html.com : [.pod]pod2html.PL $(ARCHDIR)Config.pm
@ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
$(MINIPERL) $(MMS$SOURCE)
@@ -1611,7 +1628,9 @@ globals$(O) : util.h
[.x2p]str$(O) : [.x2p]str.h
[.x2p]str$(O) : handy.h
[.x2p]str$(O) : [.x2p]util.h
+.ifdef __MMK__
[.x2p]util$(O) : [.x2p]util.c
+.endif
[.x2p]util$(O) : [.x2p]EXTERN.h
[.x2p]util$(O) : [.x2p]a2p.h
[.x2p]util$(O) : [.x2p]hash.h
diff --git a/vms/gen_shrfls.pl b/vms/gen_shrfls.pl
index 48092ba360..cb4f7dd1f1 100644
--- a/vms/gen_shrfls.pl
+++ b/vms/gen_shrfls.pl
@@ -268,7 +268,7 @@ elsif ($isgcc) {
# if DOINIT is #defined. Bleah. It's cheaper to just add
# it by hand than to add /Define=DOINIT to the preprocessing
# run and wade through all the extra junk.
- $vars{'Error'}++;
+ $vars{"${embed}Error"}++;
}
# Eventually, we'll check against existing copies here, so we can add new
diff --git a/vms/sockadapt.h b/vms/sockadapt.h
index e104ca7f3c..d7f7cdc376 100644
--- a/vms/sockadapt.h
+++ b/vms/sockadapt.h
@@ -140,9 +140,6 @@ void endnetent();
#include <in.h>
#include <inet.h>
#include <netdb.h>
-/* However, we don't have these two in the system headers. */
-void setnetent(int);
-void endnetent();
/* SocketShr doesn't support these routines, but the DECC RTL contains
* stubs with these names, designed to be used with the UCX socket
@@ -155,6 +152,10 @@ void endnetent();
#define endnetent no_endnetent
#endif
+/* We don't have these two in the system headers. */
+void setnetent(int);
+void endnetent();
+
#include <socketshr.h>
/* socketshr.h from SocketShr 0.9D doesn't alias fileno; its comments say
* that the CRTL version works OK. This isn't the case, at least with
diff --git a/win32/config.H b/win32/config.H
index 92768eee09..62fa2f18db 100644
--- a/win32/config.H
+++ b/win32/config.H
@@ -37,7 +37,12 @@
* This symbol holds the path of the bin directory where the package will
* be installed. Program must be prepared to deal with ~name substitution.
*/
+/* BIN_EXP:
+ * This symbol is the filename expanded version of the BIN symbol, for
+ * programs that do not want to deal with that at run-time.
+ */
#define BIN "/usr/local/bin" /**/
+#define BIN_EXP "/usr/local/bin" /**/
/* CAT2:
* This macro catenates 2 tokens together.
@@ -1259,14 +1264,6 @@
*/
#define RANDBITS 15 /**/
-/* SCRIPTDIR:
- * This symbol holds the name of the directory in which the user wants
- * to put publicly executable scripts for the package in question. It
- * is often a directory that is mounted across diverse architectures.
- * Programs must be prepared to deal with ~name expansion.
- */
-#define SCRIPTDIR "/usr/local/script" /**/
-
/* Select_fd_set_t:
* This symbol holds the type used for the 2nd, 3rd, and 4th
* arguments to select. Usually, this is 'fd_set *', if HAS_FD_SET