Change 18173 by jhi@lyta on 2002/11/23 02:02:33 Integrate [ 18135] Subject: [PATCH] perlopentut and PerlIO documentation From: Slaven Rezic <[EMAIL PROTECTED]> Date: 08 Nov 2002 22:22:19 +0100 Message-ID: <[EMAIL PROTECTED]> [ 18136] Subject: t/run/runenv.t bug From: Salvador "Fandiņo" <[EMAIL PROTECTED]> Date: Fri, 8 Nov 2002 08:07:13 -0800 (PST) Message-ID: <[EMAIL PROTECTED]> [ 18137] Subject: [PATCH] warning fix in SYNOPSIS example of Term::ReadLine pod From: Slaven Rezic <[EMAIL PROTECTED]> Date: Sat, 9 Nov 2002 22:31:31 +0100 (CET) Message-Id: <[EMAIL PROTECTED]> [ 18139] Date: Tue, 12 Nov 2002 16:49:22 +0200 From: Jarkko Hietaniemi <[EMAIL PROTECTED]> Subject: [PATCH] Tru64 osvers Message-ID: <[EMAIL PROTECTED]> [ 18141] repair 18139 (missing awk command) [ 18147] Subject: [PATCH] Typo in perl58delta From: [EMAIL PROTECTED] (Andreas J. Koenig) Date: Sat, 16 Nov 2002 16:29:14 +0100 Message-ID: <[EMAIL PROTECTED]> [ 18148] New B::Lint option, bare-subs, that checks for implicitely quoted barewords that are also subroutines, from Ian Phillipps <[EMAIL PROTECTED]>. Message-ID: <[EMAIL PROTECTED]> With a few tweaks to the implementation and tests. [ 18149] New B::Lint option, bare-subs, that checks for implicitely quoted barewords that are also subroutines, from Ian Phillipps <[EMAIL PROTECTED]>. Message-ID: <[EMAIL PROTECTED]> With a few tweaks to the implementation and tests. (previous change was empty) [ 18150] Subject: [PATCH] optional code for debugging leaking scalars From: Dave Mitchell <[EMAIL PROTECTED]> Date: Thu, 14 Nov 2002 23:03:00 +0000 Message-ID: <[EMAIL PROTECTED]> [ 18151] Document PRIVSHIFT. Subject: [PATCH] two small doc patches From: [EMAIL PROTECTED] (Yitzchak Scott-Thoennes) Date: Thu, 14 Nov 2002 15:07:35 -0800 Message-ID: <[EMAIL PROTECTED]> [ 18152] Subject: Re: [PATCH] optional code for debugging leaking scalars From: Dave Mitchell <[EMAIL PROTECTED]> Date: Sat, 16 Nov 2002 22:18:23 +0000 Message-ID: <[EMAIL PROTECTED]> Documentation for change #18150. [ 18154] Correction to change #18152, by Dave Mitchell. [ 18158] Remove duplicate my() declaration giving warnings from change #18105. [ 18159] Subject: Re: [perl #18113] UNIVERSAL::AUTOLOAD doesn't work if the stash doesn't exist yet From: Gurusamy Sarathy <[EMAIL PROTECTED]> Date: Wed, 30 Oct 2002 20:58:15 -0800 Message-Id: <[EMAIL PROTECTED]> Date: Wed, 30 Oct 2002 21:56:22 -0800 Message-Id: <[EMAIL PROTECTED]> Date: Wed, 30 Oct 2002 22:55:30 -0800 Message-Id: <[EMAIL PROTECTED]> [ 18160] Subject: [PATCH] regen_headers outside Makefile (was Re: [PATCH] embed.pl doc) From: Nicholas Clark <[EMAIL PROTECTED]> Date: Tue, 29 Oct 2002 23:00:05 +0000 Message-ID: <[EMAIL PROTECTED]> [ 18161] Subject: [PATCH Win32] Document wperl.exe From: "Brent Dax" <[EMAIL PROTECTED]> Date: Fri, 15 Nov 2002 23:02:01 -0800 Message-ID: <034e01c28d3e$0fed1680$6501a8c0@deepblue> [ 18162] Subject: [PATCH ext/threads/threads.xs] trivial typo From: Dave Mitchell <[EMAIL PROTECTED]> Date: Thu, 14 Nov 2002 22:55:39 +0000 Message-ID: <[EMAIL PROTECTED]> [ 18163] Subject: Re: [PATCH] AutoLoader gives wrong message From: Peter Scott <[EMAIL PROTECTED]> Date: Thu, 07 Nov 2002 19:04:27 -0800 Message-id: <[EMAIL PROTECTED]> With a tweak to the END cleanup block to fully remove the temporary test directory [ 18164] t/io/crlf.t failed with miniperl. [ 18165] Subject: Re: [PATCH] UTF-8 enabling via locale (was: Re: Redhat 8 issue?) From: Jarkko Hietaniemi <[EMAIL PROTECTED]> Date: Sun, 3 Nov 2002 17:50:08 +0200 Message-ID: <[EMAIL PROTECTED]> [ 18166] Fix perl bug #17920 : a case of parser coredump. The fix is to disable Perl_block_start and Perl_block_end when the yacc parser has encountered errors. This prevents corruption of the internal stack, at the expense of correctness, but this doesn't matter as the code is unparseable anyway. [ 18168] Subject: [PATCH] hires sleeping wants libs Date: Wed, 20 Nov 2002 17:18:31 +0200 From: Jarkko Hietaniemi <[EMAIL PROTECTED]> Message-ID: <[EMAIL PROTECTED]> [ 18169] Add a test for bug #17920, and a new test file for it. [ 18170] Move some tests from t/run/fresh_perl.t to the new t/comp/parser.t. The goal being to get rid of fresh_perl.t at some point. [ 18171] A new test for $^S, based on a patch by Iain 'Spoon' Truskett. Fix the existing tests that didn't checked the difference between 0 and undef. [ 18172] Subject: [PATCH] Historic version labels From: [EMAIL PROTECTED] (Andreas J. Koenig) Date: Fri, 22 Nov 2002 14:39:41 +0100 Message-ID: <[EMAIL PROTECTED]> (and regen Configure, regen_headers)
Affected files ... .... //depot/maint-5.8/perl/Changes5.005#2 integrate .... //depot/maint-5.8/perl/Changes5.6#2 integrate .... //depot/maint-5.8/perl/Configure#6 edit .... //depot/maint-5.8/perl/MANIFEST#8 integrate .... //depot/maint-5.8/perl/Makefile.SH#3 integrate .... //depot/maint-5.8/perl/README.ce#2 edit .... //depot/maint-5.8/perl/README.win32#3 integrate .... //depot/maint-5.8/perl/autodoc.pl#3 integrate .... //depot/maint-5.8/perl/bytecode.pl#2 integrate .... //depot/maint-5.8/perl/config_h.SH#4 edit .... //depot/maint-5.8/perl/embed.pl#3 integrate .... //depot/maint-5.8/perl/ext/B/B.pm#4 edit .... //depot/maint-5.8/perl/ext/B/B/Lint.pm#2 integrate .... //depot/maint-5.8/perl/ext/B/t/concise.t#4 edit .... //depot/maint-5.8/perl/ext/B/t/lint.t#2 integrate .... //depot/maint-5.8/perl/ext/threads/threads.xs#2 integrate .... //depot/maint-5.8/perl/gv.c#3 integrate .... //depot/maint-5.8/perl/hints/irix_6.sh#3 integrate .... //depot/maint-5.8/perl/keywords.pl#3 integrate .... //depot/maint-5.8/perl/lib/AutoLoader.t#3 integrate .... //depot/maint-5.8/perl/lib/Class/Struct.t#3 integrate .... //depot/maint-5.8/perl/lib/PerlIO.pm#2 integrate .... //depot/maint-5.8/perl/lib/Term/ReadLine.pm#3 integrate .... //depot/maint-5.8/perl/lib/open.pm#2 integrate .... //depot/maint-5.8/perl/locale.c#2 integrate .... //depot/maint-5.8/perl/op.c#5 integrate .... //depot/maint-5.8/perl/opcode.pl#3 integrate .... //depot/maint-5.8/perl/perl.c#4 integrate .... //depot/maint-5.8/perl/pod/perl58delta.pod#3 integrate .... //depot/maint-5.8/perl/pod/perlhack.pod#2 integrate .... //depot/maint-5.8/perl/pod/perlopentut.pod#3 integrate .... //depot/maint-5.8/perl/pp_hot.c#5 integrate .... //depot/maint-5.8/perl/regcomp.pl#2 integrate .... //depot/maint-5.8/perl/regen.pl#1 branch .... //depot/maint-5.8/perl/regen_headers.pl#1 branch .... //depot/maint-5.8/perl/sv.c#5 integrate .... //depot/maint-5.8/perl/sv.h#3 integrate .... //depot/maint-5.8/perl/t/comp/parser.t#1 branch .... //depot/maint-5.8/perl/t/io/crlf.t#3 integrate .... //depot/maint-5.8/perl/t/op/magic.t#3 integrate .... //depot/maint-5.8/perl/t/op/method.t#2 integrate .... //depot/maint-5.8/perl/t/run/fresh_perl.t#3 integrate .... //depot/maint-5.8/perl/t/run/runenv.t#3 integrate Differences ... ==== //depot/maint-5.8/perl/Changes5.005#2 (text) ==== Index: perl/Changes5.005 --- perl/Changes5.005#1~17645~ Fri Jul 19 12:29:57 2002 +++ perl/Changes5.005 Fri Nov 22 18:02:33 2002 @@ -10105,6 +10105,11 @@ Files: t/op/ipcmsg.t Branch: maint-5.004/perl ! t/op/ipcmsg.t + +---------------- +Version 5.004_65 +---------------- + ____________________________________________________________________________ [ 988] By: mbeattie on 1998/05/15 16:28:08 Log: Patch from Sarathy to fix up win32 integration. Patch from Jarkko ==== //depot/maint-5.8/perl/Changes5.6#2 (text) ==== Index: perl/Changes5.6 --- perl/Changes5.6#1~17645~ Fri Jul 19 12:29:57 2002 +++ perl/Changes5.6 Fri Nov 22 18:02:33 2002 @@ -23213,6 +23213,11 @@ Skip NIS includes. Branch: cfgperl ! t/op/pwent.t + +---------------- +Version 5.005_54 +---------------- + ____________________________________________________________________________ [ 2430] By: gsar on 1998/12/01 12:12:50 Log: 5.005_54, as released @@ -23279,11 +23284,6 @@ Log: Undo #2395, seems more like a problem in netbsd-current. Branch: cfgperl ! util.c - ----------------- -Version 5.005_54 ----------------- - ____________________________________________________________________________ [ 2414] By: gsar on 1998/11/30 02:23:55 Log: more JPL tweaks ==== //depot/maint-5.8/perl/Configure#6 (xtext) ==== Index: perl/Configure --- perl/Configure#5~18110~ Tue Nov 5 05:12:12 2002 +++ perl/Configure Fri Nov 22 18:02:33 2002 @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Tue Nov 5 16:17:01 EET 2002 [metaconfig 3.0 PL70] +# Generated on Sat Nov 23 04:46:37 EET 2002 [metaconfig 3.0 PL70] # (with additional metaconfig patches by [EMAIL PROTECTED]) cat >c1$$ <<EOF ==== //depot/maint-5.8/perl/MANIFEST#8 (text) ==== Index: perl/MANIFEST --- perl/MANIFEST#7~18133~ Sat Nov 9 13:56:38 2002 +++ perl/MANIFEST Fri Nov 22 18:02:33 2002 @@ -95,7 +95,7 @@ ext/B/ramblings/flip-flop Compiler ramblings: notes on flip-flop ext/B/ramblings/magic Compiler ramblings: notes on magic ext/B/ramblings/reg.alloc Compiler ramblings: register allocation -ext/B/ramblings/runtime.porting Compiler ramblings: porting PP enging +ext/B/ramblings/runtime.porting Compiler ramblings: porting PP engine ext/B/README Compiler backend README ext/B/t/asmdata.t See if B::Asmdata works ext/B/t/assembler.t See if B::Assembler, B::Disassembler comply @@ -226,7 +226,7 @@ ext/Encode/Encode/README.e2x Skeleton file for enc2xs ext/Encode/Encode/_PM.e2x Skeleton file for enc2xs ext/Encode/Encode/_T.e2x Skeleton file for enc2xs -ext/Encode/encoding.pm Perl Pragmactic Module +ext/Encode/encoding.pm Perl Pragmatic Module ext/Encode/JP/JP.pm Encode extension ext/Encode/JP/Makefile.PL Encode extension ext/Encode/KR/KR.pm Encode extension @@ -625,7 +625,7 @@ ext/Storable/t/forgive.t See if Storable works ext/Storable/t/freeze.t See if Storable works ext/Storable/t/integer.t See if Storable works -ext/Storable/t/interwork56.t Test combatibility kludge for 64bit data under 5.6.x +ext/Storable/t/interwork56.t Test compatibility kludge for 64bit data under 5.6.x ext/Storable/t/lock.t See if Storable works ext/Storable/t/make_56_interwork.pl Make test data for interwork56.t ext/Storable/t/make_downgrade.pl Make test data for downgrade.t @@ -698,7 +698,7 @@ ext/threads/t/basic.t ithreads ext/threads/t/end.t Test end functions ext/threads/t/join.t Testing the join function -ext/threads/t/libc.t testing libc functions for threadsafetyness +ext/threads/t/libc.t testing libc functions for threadsafety ext/threads/t/list.t Test threads->list() ext/threads/t/stress_cv.t Test with multiple threads, coderef cv argument. ext/threads/t/stress_re.t Test with multiple threads, string cv argument and regexes. @@ -1251,8 +1251,8 @@ lib/Math/BigInt/t/downgrade.t Test if use Math::BigInt(); under downgrade works lib/Math/BigInt/t/inf_nan.t Special tests for inf and NaN handling lib/Math/BigInt/t/isa.t Test for Math::BigInt inheritance -lib/Math/BigInt/t/mbimbf.inc Actual BigInt/BigFloat accuracy, precicion and fallback, round_mode tests -lib/Math/BigInt/t/mbimbf.t BigInt/BigFloat accuracy, precicion and fallback, round_mode +lib/Math/BigInt/t/mbimbf.inc Actual BigInt/BigFloat accuracy, precision and +fallback, round_mode tests +lib/Math/BigInt/t/mbimbf.t BigInt/BigFloat accuracy, precision and fallback, +round_mode lib/Math/BigInt/t/mbi_rand.t Test Math::BigInt randomly lib/Math/BigInt/t/require.t Test if require Math::BigInt works lib/Math/BigInt/t/sub_mbf.t Empty subclass test of BigFloat @@ -2057,7 +2057,7 @@ op.c Opcode syntax tree code op.h Opcode syntax tree header opcode.h Automatically generated opcode header -opcode.pl Opcode header generatore +opcode.pl Opcode header generator opnames.h Automatically generated opcode header os2/Changes Changelog for OS/2 port os2/diff.configure Patches to Configure @@ -2148,7 +2148,7 @@ plan9/versnum Plan9 port: script to print version number pod/buildtoc.PL generate buildtoc which generates perltoc.pod pod/checkpods.PL Tool to check for common errors in pods -pod/Makefile.SH generate Makefile whichs makes pods into something else +pod/Makefile.SH generate Makefile which makes pods into +something else pod/perl.pod Top level perl documentation pod/perl5004delta.pod Changes from 5.003 to 5.004 pod/perl5005delta.pod Changes from 5.004 to 5.005 @@ -2194,7 +2194,7 @@ pod/perlguts.pod Internals info pod/perlhack.pod Perl hackers guide pod/perlhist.pod Perl history info -pod/perlintern.pod Perl internal function docs (autogenrated) +pod/perlintern.pod Perl internal function docs (autogenerated) pod/perlintro.pod Perl introduction for beginners pod/perliol.pod Internals of PerlIO with layers. pod/perlipc.pod IPC info @@ -2329,6 +2329,8 @@ regcomp.h Private declarations for above regcomp.pl Builder of regnodes.h regcomp.sym Data for regnodes.h +regen.pl Common file routines for generator scripts +regen_headers.pl Run all scripts that (re)generate files regexec.c Regular expression evaluator regexp.h Public declarations for the above regnodes.h Description of nodes of RE engine @@ -2360,12 +2362,13 @@ t/comp/multiline.t See if multiline strings work t/comp/our.t Tests for our declaration t/comp/package.t See if packages work +t/comp/parser.t See if the parser works in edge cases t/comp/proto.t See if function prototypes work t/comp/redef.t See if we get correct warnings on redefined subs t/comp/require.t See if require works -t/comp/script.t See if script invokation works +t/comp/script.t See if script invocation works t/comp/term.t See if more terms work -t/comp/use.t See if pragmas work +t/comp/use.t See if pragmata work t/harness Finer diagnostics from test suite t/io/argv.t See if ARGV stuff works t/io/binmode.t See if binmode() works @@ -2720,7 +2723,7 @@ vms/ext/DCLsym/Makefile.PL MakeMaker driver for VMS::DCLsym vms/ext/DCLsym/test.pl regression tests for VMS::DCLsym vms/ext/Filespec.pm VMS-Unix file syntax interconversion -vms/ext/filespec.t See if VMS::Filespec funtions work +vms/ext/filespec.t See if VMS::Filespec functions work vms/ext/Stdio/0README.txt ReadMe file for VMS::Stdio vms/ext/Stdio/Makefile.PL MakeMaker driver for VMS::Stdio vms/ext/Stdio/Stdio.pm VMS options to stdio routines @@ -2852,7 +2855,7 @@ x2p/a2p.c Output of a2p.y run through byacc x2p/a2p.h Global declarations x2p/a2p.pod Pod for awk to perl translator -x2p/a2p.y A yacc grammer for awk +x2p/a2p.y A yacc grammar for awk x2p/a2py.c Awk compiler, sort of x2p/cflags.SH A script that emits C compilation flags per file x2p/EXTERN.h Same as above ==== //depot/maint-5.8/perl/Makefile.SH#3 (text) ==== Index: perl/Makefile.SH --- perl/Makefile.SH#2~18129~ Sat Nov 9 13:20:02 2002 +++ perl/Makefile.SH Fri Nov 22 18:02:33 2002 @@ -824,8 +824,10 @@ # warnings.pl: warnings.h lib/warnings.pm # The correct versions should be already supplied with the perl kit, # in case you don't have perl available. -# To force them to be regenerated, type -# make regen_headers +# To force them to be regenerated, run +# perl regen_headers.pl +# with your existing copy of perl +# (make regen_headers is kept for backwards compatibility) AUTOGEN_FILES = keywords.h opcode.h opnames.h pp_proto.h pp.sym proto.h \ embed.h embedvar.h global.sym \ @@ -837,14 +839,7 @@ .PHONY: regen_headers regen_pods regen_all regen_headers: FORCE - -$(CHMOD_W) $(AUTOGEN_FILES) - -perl keywords.pl - -perl opcode.pl - -perl embed.pl - -perl bytecode.pl - -perl regcomp.pl - -perl warnings.pl - -perl autodoc.pl + -perl regen_headers.pl regen_pods: FORCE -cd pod; $(LDLIBPTH) $(MAKE) regen_pods ==== //depot/maint-5.8/perl/README.win32#3 (text) ==== Index: perl/README.win32 --- perl/README.win32#2~18080~ Sun Nov 3 21:23:04 2002 +++ perl/README.win32 Fri Nov 22 18:02:33 2002 @@ -706,6 +706,14 @@ "perldoc -f foo" will print information about the perl operator "foo". +One common mistake when using this port with a GUI library like C<Tk> +is assuming that Perl's normal behavior of opening a command-line +window will go away. This isn't the case. If you want to start a copy +of C<perl> without opening a command-line window, use the C<wperl> +executable built during the installation process. Usage is exactly +the same as normal C<perl> on Win32, except that options like C<-h> +don't work (since they need a command-line window to print to). + If you find bugs in perl, you can run C<perlbug> to create a bug report (you may have to send it manually if C<perlbug> cannot find a mailer on your system). ==== //depot/maint-5.8/perl/autodoc.pl#3 (text) ==== Index: perl/autodoc.pl --- perl/autodoc.pl#2~18080~ Sun Nov 3 21:23:04 2002 +++ perl/autodoc.pl Fri Nov 22 18:02:33 2002 @@ -3,7 +3,10 @@ require 5.003; # keep this compatible, an old perl is all we may have before # we build the new one -BEGIN { push @INC, 'lib' } # glob() below requires File::Glob +BEGIN { + push @INC, 'lib'; + require 'regen.pl'; +} # glob() below requires File::Glob # @@ -28,6 +31,7 @@ $F = $filename; } else { + safer_unlink $filename; open F, ">$filename" or die "Can't open $filename: $!"; $F = \*F; } @@ -50,7 +54,9 @@ print $F $function->(@args); } print $F $trailer if $trailer; - close $F unless ref $filename; + unless (ref $filename) { + close $F or die "Error closing $filename: $!"; + } } my %apidocs; @@ -145,7 +151,7 @@ close F or die "Error closing $file: $!\n"; } -unlink "pod/perlapi.pod"; +safer_unlink "pod/perlapi.pod"; open (DOC, ">pod/perlapi.pod") or die "Can't create pod/perlapi.pod: $!\n"; @@ -235,8 +241,9 @@ _EOE_ -close(DOC); +close(DOC) or die "Error closing pod/perlapi.pod: $!"; +safer_unlink "pod/perlintern.pod"; open(GUTS, ">pod/perlintern.pod") or die "Unable to create pod/perlintern.pod: $!\n"; print GUTS <<'END'; @@ -277,5 +284,4 @@ END -close GUTS; - +close GUTS or die "Error closing pod/perlintern.pod: $!"; ==== //depot/maint-5.8/perl/bytecode.pl#2 (text) ==== Index: perl/bytecode.pl --- perl/bytecode.pl#1~17645~ Fri Jul 19 12:29:57 2002 +++ perl/bytecode.pl Fri Nov 22 18:02:33 2002 @@ -1,5 +1,6 @@ BEGIN { push @INC, './lib'; + require 'regen.pl'; } use strict; my %alias_to = ( @@ -36,7 +37,7 @@ my $perl_header; ($perl_header = $c_header) =~ s{[/ ]?\*/?}{#}g; -unlink "ext/ByteLoader/byterun.c", "ext/ByteLoader/byterun.h", "ext/B/B/Asmdata.pm"; +safer_unlink "ext/ByteLoader/byterun.c", "ext/ByteLoader/byterun.h", +"ext/B/B/Asmdata.pm"; # # Start with boilerplate for Asmdata.pm @@ -311,6 +312,11 @@ =cut EOT + + +close ASMDATA_PM or die "Error closing ASMDATA_PM: $!"; +close BYTERUN_H or die "Error closing BYTERUN_H: $!"; +close BYTERUN_C or die "Error closing BYTERUN_C: $!"; __END__ # First set instruction ord("#") to read comment to end-of-line (sneaky) ==== //depot/maint-5.8/perl/embed.pl#3 (xtext) ==== Index: perl/embed.pl --- perl/embed.pl#2~18111~ Tue Nov 5 05:24:59 2002 +++ perl/embed.pl Fri Nov 22 18:02:33 2002 @@ -3,6 +3,11 @@ require 5.003; # keep this compatible, an old perl is all we may have before # we build the new one +BEGIN { + # Get function prototypes + require 'regen.pl'; +} + # # See database of global and static function prototypes in embed.fnc # This is used to generate prototype headers under various configurations, @@ -60,7 +65,7 @@ $F = $filename; } else { - unlink $filename; + safer_unlink $filename; open F, ">$filename" or die "Can't open $filename: $!"; $F = \*F; } @@ -84,7 +89,9 @@ print $F @outs; # $function->(@args) is not 5.003 } print $F $trailer if $trailer; - close $F unless ref $filename; + unless (ref $filename) { + close $F or die "Error closing $filename: $!"; + } } sub munge_c_files () { @@ -302,7 +309,7 @@ return hide("PL_$pre$sym", "PL_$sym"); } -unlink 'embed.h'; +safer_unlink 'embed.h'; open(EM, '> embed.h') or die "Can't create embed.h: $!\n"; print EM do_not_edit ("embed.h"), <<'END'; @@ -488,9 +495,9 @@ END -close(EM); +close(EM) or die "Error closing EM: $!"; -unlink 'embedvar.h'; +safer_unlink 'embedvar.h'; open(EM, '> embedvar.h') or die "Can't create embedvar.h: $!\n"; @@ -626,10 +633,10 @@ #endif /* PERL_POLLUTE */ END -close(EM); +close(EM) or die "Error closing EM: $!"; -unlink 'perlapi.h'; -unlink 'perlapi.c'; +safer_unlink 'perlapi.h'; +safer_unlink 'perlapi.c'; open(CAPI, '> perlapi.c') or die "Can't create perlapi.c: $!\n"; open(CAPIH, '> perlapi.h') or die "Can't create perlapi.h: $!\n"; @@ -727,7 +734,7 @@ #endif /* __perlapi_h__ */ EOT -close CAPIH; +close CAPIH or die "Error closing CAPIH: $!"; print CAPI do_not_edit ("perlapi.c"), <<'EOT'; @@ -777,7 +784,7 @@ #endif /* MULTIPLICITY */ EOT -close(CAPI); +close(CAPI) or die "Error closing CAPI: $!"; # functions that take va_list* for implementing vararg functions # NOTE: makedef.pl must be updated if you add symbols to %vfuncs ==== //depot/maint-5.8/perl/ext/B/B.pm#4 (text) ==== Index: perl/ext/B/B.pm --- perl/ext/B/B.pm#3~18127~ Sat Nov 9 13:07:43 2002 +++ perl/ext/B/B.pm Fri Nov 22 18:02:33 2002 @@ -176,7 +176,7 @@ $op->$method($level); $ppname = $op->name; if ($ppname =~ - /^(d?or(assign)?|and(assign)?|mapwhile|grepwhile|entertry|range|cond_expr)$/) + /^(or(assign)?|and(assign)?|mapwhile|grepwhile|entertry|range|cond_expr)$/) { print $prefix, uc($1), " => {\n"; walkoptree_exec($op->other, $method, $level + 1); ==== //depot/maint-5.8/perl/ext/B/B/Lint.pm#2 (text) ==== Index: perl/ext/B/B/Lint.pm --- perl/ext/B/B/Lint.pm#1~17645~ Fri Jul 19 12:29:57 2002 +++ perl/ext/B/B/Lint.pm Fri Nov 22 18:02:33 2002 @@ -57,6 +57,18 @@ for (@a) { ... } +=item B<bare-subs> + +This option warns whenever a bareword is implicitly quoted, but is also +the name of a subroutine in the current package. Typical mistakes that it will +trap are: + + use constant foo => 'bar'; + @a = ( foo => 1 ); + $b{foo} = 2; + +Neither of these will do what a naive user would expect. + =item B<dollar-underscore> This option warns whenever $_ is used either explicitly anywhere or @@ -121,7 +133,7 @@ use strict; use B qw(walkoptree_slow main_root walksymtable svref_2object parents - OPf_WANT_LIST OPf_WANT OPf_STACKED G_ARRAY + OPf_WANT_LIST OPf_WANT OPf_STACKED G_ARRAY SVf_POK ); my $file = "unknown"; # shadows current filename @@ -145,7 +157,7 @@ BEGIN { map($valid_check{$_}++, qw(context implicit_read implicit_write dollar_underscore - private_names undefined_subs regexp_variables)); + private_names bare_subs undefined_subs regexp_variables)); } # Debugging options @@ -238,6 +250,14 @@ sub B::SVOP::lint { my $op = shift; + if ( $check{bare_subs} && $op->name eq 'const' + && $op->private & 64 ) # OPpCONST_BARE = 64 in op.h + { + my $sv = $op->sv; + if( $sv->FLAGS & SVf_POK && exists &{$curstash.'::'.$sv->PV} ) { + warning "Bare sub name '" . $sv->PV . "' interpreted as string"; + } + } if ($check{dollar_underscore} && $op->name eq "gvsv" && $op->gv->NAME eq "_") { ==== //depot/maint-5.8/perl/ext/B/t/concise.t#4 (text) ==== Index: perl/ext/B/t/concise.t --- perl/ext/B/t/concise.t#3~18128~ Sat Nov 9 13:15:09 2002 +++ perl/ext/B/t/concise.t Fri Nov 22 18:02:33 2002 @@ -29,8 +29,8 @@ $out = runperl( switches => ["-MO=Concise,-exec"], - prog => q{$a//=$b && print q/foo/}, + prog => q{$a||=$b && print q/foo/}, stderr => 1, ); -like($out, qr/print/, "-exec option with //="); +like($out, qr/print/, "-exec option with ||="); ==== //depot/maint-5.8/perl/ext/B/t/lint.t#2 (text) ==== Index: perl/ext/B/t/lint.t --- perl/ext/B/t/lint.t#1~17645~ Fri Jul 19 12:29:57 2002 +++ perl/ext/B/t/lint.t Fri Nov 22 18:02:33 2002 @@ -6,7 +6,7 @@ require './test.pl'; } -plan tests => 13; +plan tests => 15; # adjust also number of skipped tests ! # Runs a separate perl interpreter with the appropriate lint options # turned on @@ -40,7 +40,7 @@ SKIP : { use Config; - skip("Doesn't work with threaded perls",9) + skip("Doesn't work with threaded perls",11) if $Config{useithreads} || $Config{use5005threads}; runlint 'implicit-read', '1 for @ARGV', <<'RESULT', 'implicit-read in foreach'; @@ -78,6 +78,13 @@ runlint 'regexp-variables', 's/./$&/', <<'RESULT'; Use of regexp variable $& at -e line 1 +RESULT + + runlint 'bare-subs', 'sub bare(){1};$x=bare', ''; + + runlint 'bare-subs', 'sub bare(){1}; $x=[bare=>0]; $x=$y{bare}', <<'RESULT'; +Bare sub name 'bare' interpreted as string at -e line 1 +Bare sub name 'bare' interpreted as string at -e line 1 RESULT } ==== //depot/maint-5.8/perl/ext/threads/threads.xs#2 (xtext) ==== Index: perl/ext/threads/threads.xs --- perl/ext/threads/threads.xs#1~17645~ Fri Jul 19 12:29:57 2002 +++ perl/ext/threads/threads.xs Fri Nov 22 18:02:33 2002 @@ -386,7 +386,7 @@ thread->interp = perl_clone(aTHX, CLONEf_KEEP_PTR_TABLE); #endif /* perl_clone leaves us in new interpreter's context. - As it is tricky to spot implcit aTHX create a new scope + As it is tricky to spot an implicit aTHX, create a new scope with aTHX matching the context for the duration of our work for new interpreter. */ ==== //depot/maint-5.8/perl/gv.c#3 (text) ==== Index: perl/gv.c --- perl/gv.c#2~18080~ Sun Nov 3 21:23:04 2002 +++ perl/gv.c Fri Nov 22 18:02:33 2002 @@ -401,6 +401,10 @@ register const char *nend; const char *nsplit = 0; GV* gv; + HV* ostash = stash; + + if (stash && SvTYPE(stash) < SVt_PVHV) + stash = Nullhv; for (nend = name; *nend; nend++) { if (*nend == '\'') @@ -433,6 +437,7 @@ gv_stashpvn(origname, nsplit - origname - 7, FALSE)) stash = gv_stashpvn(origname, nsplit - origname, TRUE); } + ostash = stash; } gv = gv_fetchmeth(stash, name, nend - name, 0); @@ -440,7 +445,7 @@ if (strEQ(name,"import") || strEQ(name,"unimport")) gv = (GV*)&PL_sv_yes; else if (autoload) - gv = gv_autoload4(stash, name, nend - name, TRUE); + gv = gv_autoload4(ostash, name, nend - name, TRUE); } else if (autoload) { CV* cv = GvCV(gv); @@ -475,11 +480,19 @@ HV* varstash; GV* vargv; SV* varsv; + char *packname = ""; - if (!stash) - return Nullgv; /* UNIVERSAL::AUTOLOAD could cause trouble */ if (len == autolen && strnEQ(name, autoload, autolen)) return Nullgv; + if (stash) { + if (SvTYPE(stash) < SVt_PVHV) { + packname = SvPV_nolen((SV*)stash); + stash = Nullhv; + } + else { + packname = HvNAME(stash); + } + } if (!(gv = gv_fetchmeth(stash, autoload, autolen, FALSE))) return Nullgv; cv = GvCV(gv); @@ -494,7 +507,7 @@ (GvCVGEN(gv) || GvSTASH(gv) != stash)) Perl_warner(aTHX_ packWARN2(WARN_DEPRECATED, WARN_SYNTAX), "Use of inherited AUTOLOAD for non-method %s::%.*s() is deprecated", - HvNAME(stash), (int)len, name); + packname, (int)len, name); #ifndef USE_5005THREADS if (CvXSUB(cv)) { @@ -530,7 +543,7 @@ #ifdef USE_5005THREADS sv_lock(varsv); #endif - sv_setpv(varsv, HvNAME(stash)); + sv_setpv(varsv, packname); sv_catpvn(varsv, "::", 2); sv_catpvn(varsv, name, len); SvTAINTED_off(varsv); ==== //depot/maint-5.8/perl/hints/irix_6.sh#3 (text) ==== Index: perl/hints/irix_6.sh --- perl/hints/irix_6.sh#2~18080~ Sun Nov 3 21:23:04 2002 +++ perl/hints/irix_6.sh Fri Nov 22 18:02:33 2002 @@ -326,7 +326,8 @@ # We don't want these libraries. # Socket networking is in libc, these are not installed by default, # and just slow perl down. ([EMAIL PROTECTED]) -set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ nsl / /' -e 's/ dl / /'` +# librt contains nothing we need (some places need it for Time::HiRes) --jhi +set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ nsl / /' -e 's/ dl / /' -e +'s/ rt / /'` shift libswanted="$*" ==== //depot/maint-5.8/perl/keywords.pl#3 (xtext) ==== Index: perl/keywords.pl --- perl/keywords.pl#2~18080~ Sun Nov 3 21:23:04 2002 +++ perl/keywords.pl Fri Nov 22 18:02:33 2002 @@ -1,6 +1,7 @@ #!/usr/bin/perl -unlink "keywords.h"; +require 'regen.pl'; +safer_unlink ("keywords.h"); open(KW, ">keywords.h") || die "Can't create keywords.h: $!\n"; select KW; @@ -29,6 +30,8 @@ ($keyword) = split; print &tab(5, "#define KEY_$keyword"), $keynum++, "\n"; } + +close KW or die "Error closing keywords.h: $!"; ########################################################################### sub tab { ==== //depot/maint-5.8/perl/lib/AutoLoader.t#3 (xtext) ==== Index: perl/lib/AutoLoader.t --- perl/lib/AutoLoader.t#2~18080~ Sun Nov 3 21:23:04 2002 +++ perl/lib/AutoLoader.t Fri Nov 22 18:02:33 2002 @@ -16,7 +16,7 @@ unshift @INC, $dir; } -use Test::More tests => 13; +use Test::More tests => 14; # First we must set up some autoloader files my $fulldir = File::Spec->catdir( $dir, 'auto', 'Foo' ); @@ -49,6 +49,24 @@ EOT close(BAZ); +open(BLECH, '>', File::Spec->catfile( $fulldir, 'blechanawilla.al' )) + or die "Can't open blech file: $!"; +print BLECH <<'EOT'; +package Foo; +sub blechanawilla { compilation error ( +EOT +close(BLECH); + +# This is just to keep the old SVR3 systems happy; they may fail +# to find the above file so we duplicate it where they should find it. +open(BLECH, '>', File::Spec->catfile( $fulldir, 'blechanawil.al' )) + or die "Can't open blech file: $!"; +print BLECH <<'EOT'; +package Foo; +sub blechanawilla { compilation error ( +EOT +close(BLECH); + # Let's define the package package Foo; require AutoLoader; @@ -85,6 +103,14 @@ is( $foo->bazmarkhianish($1), 'foo', 'for any method call' ); is( $foo->bazmarkhianish($1), 'foo', '(again)' ); +# Used to retry long subnames with shorter filenames on any old +# exception, including compilation error. Now AutoLoader only +# tries shorter filenames if it can't find the long one. +eval { + $foo->blechanawilla; +}; +like( $@, qr/syntax error/, 'require error propagates' ); + # test recursive autoloads open(F, '>', File::Spec->catfile( $fulldir, 'a.al')) or die "Cannot make 'a' file: $!"; @@ -130,5 +156,5 @@ # cleanup END { return unless $dir && -d $dir; - rmtree $fulldir; + rmtree $dir; } ==== //depot/maint-5.8/perl/lib/Class/Struct.t#3 (text) ==== Index: perl/lib/Class/Struct.t --- perl/lib/Class/Struct.t#2~18126~ Sat Nov 9 11:00:47 2002 +++ perl/lib/Class/Struct.t Fri Nov 22 18:02:33 2002 @@ -66,7 +66,7 @@ is $obj->c->meth(), 42; -my $obj = MyOther->new; +$obj = MyOther->new; isa_ok $obj, 'MyOther'; $obj->s('foo'); ==== //depot/maint-5.8/perl/lib/PerlIO.pm#2 (text) ==== Index: perl/lib/PerlIO.pm --- perl/lib/PerlIO.pm#1~17645~ Fri Jul 19 12:29:57 2002 +++ perl/lib/PerlIO.pm Fri Nov 22 18:02:33 2002 @@ -203,7 +203,7 @@ =head1 SEE ALSO -L<perlfunc/"binmode">, L<perlfunc/"open">, L<perlunicode>, L<Encode> +L<perlfunc/"binmode">, L<perlfunc/"open">, L<perlunicode>, L<perliol>, L<Encode> =cut ==== //depot/maint-5.8/perl/lib/Term/ReadLine.pm#3 (text) ==== Index: perl/lib/Term/ReadLine.pm --- perl/lib/Term/ReadLine.pm#2~18080~ Sun Nov 3 21:23:04 2002 +++ perl/lib/Term/ReadLine.pm Fri Nov 22 18:02:33 2002 @@ -10,7 +10,7 @@ my $prompt = "Enter your arithmetic expression: "; my $OUT = $term->OUT || \*STDOUT; while ( defined ($_ = $term->readline($prompt)) ) { - my $res = eval($_), "\n"; + my $res = eval($_); warn $@ if $@; print $OUT $res, "\n" unless $@; $term->addhistory($_) if /\S/; @@ -33,7 +33,7 @@ $term->addhistory('row'); -where $term is a return value of Term::ReadLine-E<gt>Init. +where $term is a return value of Term::ReadLine-E<gt>new(). =over 12 @@ -60,7 +60,7 @@ adds the line to the history of input, from where it can be used if the actual C<readline> is present. -=item C<IN>, $C<OUT> +=item C<IN>, C<OUT> return the filehandles for input and output or C<undef> if C<readline> input and output cannot be used for Perl. ==== //depot/maint-5.8/perl/lib/open.pm#2 (text) ==== Index: perl/lib/open.pm --- perl/lib/open.pm#1~17645~ Fri Jul 19 12:29:57 2002 +++ perl/lib/open.pm Fri Nov 22 18:02:33 2002 @@ -27,6 +27,7 @@ } elsif ($ENV{LANG} =~ /^([^.]+)\.([^.]+)$/) { ($country_language, $locale_encoding) = ($1, $2); } + # LANGUAGE affects only LC_MESSAGES only on glibc } elsif (not $locale_encoding) { if ($ENV{LC_ALL} =~ /\butf-?8\b/i || $ENV{LANG} =~ /\butf-?8\b/i) { @@ -250,7 +251,7 @@ =back -If your locale environment variables (LANGUAGE, LC_ALL, LC_CTYPE, LANG) +If your locale environment variables (LC_ALL, LC_CTYPE, LANG) contain the strings 'UTF-8' or 'UTF8' (case-insensitive matching), the default encoding of your STDIN, STDOUT, and STDERR, and of B<any subsequent file open>, is UTF-8. ==== //depot/maint-5.8/perl/locale.c#2 (text) ==== Index: perl/locale.c --- perl/locale.c#1~17645~ Fri Jul 19 12:29:57 2002 +++ perl/locale.c Fri Nov 22 18:02:33 2002 @@ -478,10 +478,15 @@ /* Set PL_wantutf8 to TRUE if using PerlIO _and_ any of the following are true: - nl_langinfo(CODESET) contains /^utf-?8/i - - $ENV{LANGUAGE} contains /^utf-?8/i (only if using glibc) - - $ENV{LC_CALL} contains /^utf-?8/i + - $ENV{LC_ALL} contains /^utf-?8/i - $ENV{LC_CTYPE} contains /^utf-?8/i - - $ENV{LANG} contains /^utf-?8/i + - $ENV{LANG} contains /^utf-?8/i + The LC_ALL, LC_CTYPE, LANG obey the usual override + hierarchy of locale environment variables. (LANGUAGE + affects only LC_MESSAGES only under glibc.) (If present, + it overrides LC_MESSAGES for GNU gettext, and it also + can have more than one locale, separated by spaces, + in case you need to know.) If PL_wantutf8 is true, perl.c:S_parse_body() will turn on the PerlIO :utf8 discipline on STDIN, STDOUT, STDERR, _and_ the default open discipline. @@ -491,32 +496,26 @@ #if defined(HAS_NL_LANGINFO) && defined(CODESET) codeset = nl_langinfo(CODESET); #endif - if (codeset && - (ibcmp(codeset, "UTF-8", 5) == 0 || - ibcmp(codeset, "UTF8", 4) == 0)) - wantutf8 = TRUE; + if (codeset) + wantutf8 = (ibcmp(codeset, "UTF-8", 5) == 0 || + ibcmp(codeset, "UTF8", 4) == 0); #if defined(USE_LOCALE) -#ifdef __GLIBC__ - if (!wantutf8 && language && - (ibcmp(language, "UTF-8", 5) == 0 || - ibcmp(language, "UTF8", 4) == 0)) - wantutf8 = TRUE; -#endif - if (!wantutf8 && lc_all && - (ibcmp(lc_all, "UTF-8", 5) == 0 || - ibcmp(lc_all, "UTF8", 4) == 0)) - wantutf8 = TRUE; + else { /* nl_langinfo(CODESET) is supposed to correctly + * interpret the locale environment variables, + * but just in case it fails, let's do this manually. */ + if (lang) + wantutf8 = (ibcmp(lang, "UTF-8", 5) == 0 || + ibcmp(lang, "UTF8", 4) == 0); #ifdef USE_LOCALE_CTYPE - if (!wantutf8 && curctype && - (ibcmp(curctype, "UTF-8", 5) == 0 || - ibcmp(curctype, "UTF8", 4) == 0)) - wantutf8 = TRUE; + if (curctype) + wantutf8 = (ibcmp(curctype, "UTF-8", 5) == 0 || + ibcmp(curctype, "UTF8", 4) == 0); #endif - if (!wantutf8 && lang && - (ibcmp(lang, "UTF-8", 5) == 0 || - ibcmp(lang, "UTF8", 4) == 0)) - wantutf8 = TRUE; + if (lc_all) + wantutf8 = (ibcmp(lc_all, "UTF-8", 5) == 0 || + ibcmp(lc_all, "UTF8", 4) == 0); #endif /* USE_LOCALE */ + } if (wantutf8) PL_wantutf8 = TRUE; } ==== //depot/maint-5.8/perl/op.c#5 (text) ==== Index: perl/op.c --- perl/op.c#4~18130~ Sat Nov 9 13:25:39 2002 +++ perl/op.c Fri Nov 22 18:02:33 2002 @@ -2278,6 +2278,8 @@ Perl_block_start(pTHX_ int full) { int retval = PL_savestack_ix; + /* If there were syntax errors, don't try to start a block */ + if (PL_yynerrs) return retval; SAVEI32(PL_comppad_name_floor); PL_comppad_name_floor = AvFILLp(PL_comppad_name); @@ -2313,6 +2315,8 @@ int needblockscope = PL_hints & HINT_BLOCK_SCOPE; line_t copline = PL_copline; OP* retval = scalarseq(seq); + /* If there were syntax errors, don't try to close a block */ + if (PL_yynerrs) return retval; if (!seq) { /* scalarseq() gave us an OP_STUB */ retval->op_flags |= OPf_PARENS; ==== //depot/maint-5.8/perl/opcode.pl#3 (xtext) ==== Index: perl/opcode.pl --- perl/opcode.pl#2~18080~ Sun Nov 3 21:23:04 2002 +++ perl/opcode.pl Fri Nov 22 18:02:33 2002 @@ -1,4 +1,8 @@ #!/usr/bin/perl +BEGIN { + # Get function prototypes + require 'regen.pl'; +} $opcode_new = 'opcode.h-new'; $opname_new = 'opnames.h-new'; @@ -278,15 +282,11 @@ close OC or die "Error closing opcode.h: $!"; close ON or die "Error closing opnames.h: $!"; -chmod 0600, 'opcode.h'; # required by dosish filesystems -chmod 0600, 'opnames.h'; # required by dosish filesystems - -# Some dosish systems can't rename over an existing file: -unlink "$_-old" for qw(opcode.h opnames.h); -rename $_, "$_-old" for qw(opcode.h opnames.h); - -rename $opcode_new, 'opcode.h' or die "renaming opcode.h: $!\n"; -rename $opname_new, 'opnames.h' or die "renaming opnames.h: $!\n"; +foreach ('opcode.h', 'opnames.h') { + safer_rename_silent $_, "$_-old"; +} +safer_rename $opcode_new, 'opcode.h'; +safer_rename $opname_new, 'opnames.h'; $pp_proto_new = 'pp_proto.h-new'; $pp_sym_new = 'pp.sym-new'; @@ -330,15 +330,11 @@ close PP or die "Error closing pp_proto.h: $!"; close PPSYM or die "Error closing pp.sym: $!"; -chmod 0600, 'pp_proto.h'; # required by dosish filesystems -chmod 0600, 'pp.sym'; # required by dosish filesystems - -# Some dosish systems can't rename over an existing file: -unlink "$_-old" for qw(pp_proto.h pp.sym); -rename $_, "$_-old" for qw(pp_proto.h pp.sym); - -rename $pp_proto_new, 'pp_proto.h' or die "rename pp_proto.h: $!\n"; -rename $pp_sym_new, 'pp.sym' or die "rename pp.sym: $!\n"; +foreach ('pp_proto.h', 'pp.sym') { + safer_rename_silent $_, "$_-old"; +} +safer_rename $pp_proto_new, 'pp_proto.h'; +safer_rename $pp_sym_new, 'pp.sym'; ########################################################################### sub tab { ==== //depot/maint-5.8/perl/perl.c#4 (text) ==== Index: perl/perl.c --- perl/perl.c#3~18126~ Sat Nov 9 11:00:47 2002 +++ perl/perl.c Fri Nov 22 18:02:33 2002 @@ -867,6 +867,24 @@ if (PL_sv_count != 0 && ckWARN_d(WARN_INTERNAL)) Perl_warner(aTHX_ packWARN(WARN_INTERNAL),"Scalars leaked: %ld\n", (long)PL_sv_count); +#ifdef DEBUG_LEAKING_SCALARS + if (PL_sv_count != 0) { + SV* sva; + SV* sv; + register SV* svend; + + for (sva = PL_sv_arenaroot; sva; sva = (SV*)SvANY(sva)) { + svend = &sva[SvREFCNT(sva)]; + for (sv = sva + 1; sv < svend; ++sv) { + if (SvTYPE(sv) != SVTYPEMASK) { + PerlIO_printf(Perl_debug_log, "leaked: 0x%p\n", sv); + } + } + } + } +#endif + + #if defined(PERLIO_LAYERS) /* No more IO - including error messages ! */ PerlIO_cleanup(aTHX); ==== //depot/maint-5.8/perl/pod/perl58delta.pod#3 (text) ==== Index: perl/pod/perl58delta.pod --- perl/pod/perl58delta.pod#2~18080~ Sun Nov 3 21:23:04 2002 +++ perl/pod/perl58delta.pod Fri Nov 22 18:02:33 2002 @@ -415,12 +415,12 @@ =item * -If your environment variables (LC_ALL, LC_CTYPE, LANG, LANGUAGE) look -like you want to use UTF-8 (any of the the variables match C</utf-?8/i>), -your STDIN, STDOUT, STDERR handles and the default open layer -(see L<open>) are marked as UTF-8. (This feature, like other new -features that combine Unicode and I/O, work only if you are using -PerlIO, but that's the default.) +If your environment variables (LC_ALL, LC_CTYPE, LANG) look like you +want to use UTF-8 (any of the the variables match C</utf-?8/i>), your +STDIN, STDOUT, STDERR handles and the default open layer (see L<open>) +are marked as UTF-8. (This feature, like other new features that +combine Unicode and I/O, work only if you are using PerlIO, but that's +the default.) Note that after this Perl really does assume that everything is UTF-8: for example if some input handle is not, Perl will probably very soon @@ -678,10 +678,10 @@ =item * -The printf() and sprintf() now support parameter reordering using the +printf() and sprintf() now support parameter reordering using the C<%\d+\$> and C<*\d+\$> syntaxes. For example - print "%2\$s %1\$s\n", "foo", "bar"; + printf "%2\$s %1\$s\n", "foo", "bar"; will print "bar foo\n". This feature helps in writing internationalised software, and in general when the order ==== //depot/maint-5.8/perl/pod/perlhack.pod#2 (text) ==== Index: perl/pod/perlhack.pod --- perl/pod/perlhack.pod#1~17645~ Fri Jul 19 12:29:57 2002 +++ perl/pod/perlhack.pod Fri Nov 22 18:02:33 2002 @@ -2064,7 +2064,14 @@ (Note: the mod_perl apache module uses also this environment variable for its own purposes and extended its semantics. Refer to the mod_perl -documentation for more information.) +documentation for more information. Also, spawned threads do the +equivalent of setting this variable to the value 1.) + +If, at the end of a run you get the message I<N scalars leaked>, you can +recompile with C<-DDEBUG_LEAKING_SCALARS>, which will cause +the addresses of all those leaked SVs to be dumped; it also converts +C<new_SV()> from a macro into a real function, so you can use your +favourite debugger to discover where those pesky SVs were allocated. =head2 Profiling ==== //depot/maint-5.8/perl/pod/perlopentut.pod#3 (text) ==== Index: perl/pod/perlopentut.pod --- perl/pod/perlopentut.pod#2~18080~ Sun Nov 3 21:23:04 2002 +++ perl/pod/perlopentut.pod Fri Nov 22 18:02:33 2002 @@ -925,7 +925,7 @@ =back -For more detailed discussion about PerlIO see L<perlio>; +For more detailed discussion about PerlIO see L<PerlIO>; for more detailed discussion about Unicode and I/O see L<perluniintro>. =head1 SEE ALSO ==== //depot/maint-5.8/perl/pp_hot.c#5 (text) ==== Index: perl/pp_hot.c --- perl/pp_hot.c#4~18130~ Sat Nov 9 13:25:39 2002 +++ perl/pp_hot.c Fri Nov 22 18:02:33 2002 @@ -3058,6 +3058,7 @@ char* name; STRLEN namelen; char* packname = 0; + SV *packsv = Nullsv; STRLEN packlen; name = SvPV(meth, namelen); @@ -3093,6 +3094,8 @@ } /* assume it's a package name */ stash = gv_stashpvn(packname, packlen, FALSE); + if (!stash) + packsv = sv; goto fetch; } /* it _is_ a filehandle name -- replace with a reference */ @@ -3125,7 +3128,7 @@ } } - gv = gv_fetchmethod(stash, name); + gv = gv_fetchmethod(stash ? stash : (HV*)packsv, name); if (!gv) { /* This code tries to figure out just what went wrong with ==== //depot/maint-5.8/perl/regcomp.pl#2 (text) ==== Index: perl/regcomp.pl --- perl/regcomp.pl#1~17645~ Fri Jul 19 12:29:57 2002 +++ perl/regcomp.pl Fri Nov 22 18:02:33 2002 @@ -1,3 +1,7 @@ +BEGIN { + # Get function prototypes + require 'regen.pl'; +} #use Fatal qw(open close rename chmod unlink); open DESC, 'regcomp.sym'; $ind = 0; @@ -112,8 +116,6 @@ EOP -close OUT; +close OUT or die "close $tmp_h: $!"; -chmod 0666, 'regnodes.h'; -unlink 'regnodes.h'; -rename $tmp_h, 'regnodes.h'; +safer_rename $tmp_h, 'regnodes.h'; ==== //depot/maint-5.8/perl/regen.pl#1 (text) ==== Index: perl/regen.pl --- /dev/null Tue May 5 13:32:27 1998 +++ perl/regen.pl Fri Nov 22 18:02:33 2002 @@ -0,0 +1,45 @@ +#!/usr/bin/perl -w +use strict; +use vars qw($Is_W32 $Is_OS2 $Is_Cygwin $Is_NetWare $Needs_Write); +use Config; # Remember, this is running using an existing perl + +# Common functions needed by the regen scripts + +$Is_W32 = $^O eq 'MSWin32'; +$Is_OS2 = $^O eq 'os2'; +$Is_Cygwin = $^O eq 'cygwin'; +$Is_NetWare = $Config{osname} eq 'NetWare'; +if ($Is_NetWare) { + $Is_W32 = 0; +} + +$Needs_Write = $Is_OS2 || $Is_W32 || $Is_Cygwin || $Is_NetWare; + +sub safer_unlink { + my @names = @_; + my $cnt = 0; + + my $name; + foreach $name (@names) { + next unless -e $name; + chmod 0777, $name if $Needs_Write; + ( CORE::unlink($name) and ++$cnt + or warn "Couldn't unlink $name: $!\n" ); + } + return $cnt; +} + +sub safer_rename_silent { + my ($from, $to) = @_; + + # Some dosish systems can't rename over an existing file: + safer_unlink $to; + chmod 0600, $from if $Needs_Write; + rename $from, $to; +} + +sub safer_rename { + my ($from, $to) = @_; + safer_rename_silent($from, $to) or die "renaming $from to $to: $!"; +} +1; ==== //depot/maint-5.8/perl/regen_headers.pl#1 (text) ==== Index: perl/regen_headers.pl --- /dev/null Tue May 5 13:32:27 1998 +++ perl/regen_headers.pl Fri Nov 22 18:02:33 2002 @@ -0,0 +1,23 @@ +#!/usr/bin/perl -w +require 5.003; # keep this compatible, an old perl is all we may have before + # we build the new one + +# The idea is to move the regen_headers target out of the Makefile so that +# it is possible to rebuild the headers before the Makefile is available. +# (and the Makefile is unavailable until after Configure is run, and we may +# wish to make a clean source tree but with current headers without running +# anything else. + +use strict; +my $perl = $^X; + +require 'regen.pl'; +# keep warnings.pl in sync with the CPAN distribution by not requiring core +# changes +safer_unlink ("warnings.h", "lib/warnings.pm"); + +foreach (qw (keywords.pl opcode.pl embed.pl bytecode.pl regcomp.pl + warnings.pl autodoc.pl)) { + print "$^X $_\n"; + system "$^X $_"; +} ==== //depot/maint-5.8/perl/sv.c#5 (text) ==== Index: perl/sv.c --- perl/sv.c#4~18132~ Sat Nov 9 13:50:30 2002 +++ perl/sv.c Fri Nov 22 18:02:33 2002 @@ -155,7 +155,28 @@ /* new_SV(): return a new, empty SV head */ -#define new_SV(p) \ +#ifdef DEBUG_LEAKING_SCALARS +/* provide a real function for a debugger to play with */ +STATIC SV* +S_new_SV(pTHX) +{ + SV* sv; + + LOCK_SV_MUTEX; + if (PL_sv_root) + uproot_SV(sv); + else + sv = more_sv(); + UNLOCK_SV_MUTEX; + SvANY(sv) = 0; + SvREFCNT(sv) = 1; + SvFLAGS(sv) = 0; + return sv; +} +# define new_SV(p) (p)=S_new_SV(aTHX) + +#else +# define new_SV(p) \ STMT_START { \ LOCK_SV_MUTEX; \ if (PL_sv_root) \ @@ -167,6 +188,7 @@ SvREFCNT(p) = 1; \ SvFLAGS(p) = 0; \ } STMT_END +#endif /* del_SV(): return an empty SV head to the free list */ ==== //depot/maint-5.8/perl/sv.h#3 (text) ==== Index: perl/sv.h --- perl/sv.h#2~18080~ Sun Nov 3 21:23:04 2002 +++ perl/sv.h Fri Nov 22 18:02:33 2002 @@ -216,7 +216,7 @@ #define SVf_AMAGIC 0x10000000 /* has magical overloaded methods */ -#define PRIVSHIFT 8 +#define PRIVSHIFT 8 /* (SVp_?OK >> PRIVSHIFT) == SVf_?OK */ /* Some private flags. */ ==== //depot/maint-5.8/perl/t/comp/parser.t#1 (text) ==== Index: perl/t/comp/parser.t --- /dev/null Tue May 5 13:32:27 1998 +++ perl/t/comp/parser.t Fri Nov 22 18:02:33 2002 @@ -0,0 +1,15 @@ +#!./perl + +# Checks if the parser behaves correctly in edge cases +# (including weird syntax errors) + +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} + +print "1..1\n"; + +# This used to dump core (bug #17920) +eval q{ sub { sub { f1(f2();); my($a,$b,$c) } } }; +print $@ && $@ =~ /error/ ? "ok 1\n" : "not ok 1\n"; ==== //depot/maint-5.8/perl/t/io/crlf.t#3 (text) ==== Index: perl/t/io/crlf.t --- perl/t/io/crlf.t#2~18095~ Mon Nov 4 09:45:47 2002 +++ perl/t/io/crlf.t Fri Nov 22 18:02:33 2002 @@ -30,7 +30,9 @@ { local $/; $text = <FOO> } is(count_chars($text, "\015\012"), 2000); + SKIP: { + if ($^X =~ /\bminiperl\b/) { skip(q/miniperl can't load PerlIO layers/) } my $fcontents = join "", map {"$_\r\n"} "a".."zzz"; open my $fh, "<:crlf", \$fcontents; local $/ = "xxx"; ==== //depot/maint-5.8/perl/t/op/magic.t#3 (xtext) ==== Index: perl/t/op/magic.t --- perl/t/op/magic.t#2~18080~ Sun Nov 3 21:23:04 2002 +++ perl/t/op/magic.t Fri Nov 22 18:02:33 2002 @@ -36,7 +36,7 @@ return 1; } -print "1..47\n"; +print "1..48\n"; $Is_MSWin32 = $^O eq 'MSWin32'; $Is_NetWare = $^O eq 'NetWare'; @@ -308,9 +308,10 @@ my %errs = %{"!"}; # Cause Errno.pm to be loaded at run-time ok ${"!"}{ENOENT}; -ok $^S == 0; +ok $^S == 0 && defined $^S; eval { ok $^S == 1 }; -ok $^S == 0; +eval " BEGIN { ok ! defined \$^S } "; +ok $^S == 0 && defined $^S; ok ${^TAINT} == 0; eval { ${^TAINT} = 1 }; ==== //depot/maint-5.8/perl/t/op/method.t#2 (xtext) ==== Index: perl/t/op/method.t --- perl/t/op/method.t#1~17645~ Fri Jul 19 12:29:57 2002 +++ perl/t/op/method.t Fri Nov 22 18:02:33 2002 @@ -10,7 +10,7 @@ require "test.pl"; } -print "1..75\n"; +print "1..78\n"; @A::ISA = 'B'; @B::ISA = 'C'; @@ -277,3 +277,18 @@ Bminor->test('y', 'z'); is("@X", "Amajor Bminor x y Bminor Bminor y z"); +package main; +for my $meth (['Bar', 'Foo::Bar'], + ['SUPER::Bar', 'main::SUPER::Bar'], + ['Xyz::SUPER::Bar', 'Xyz::SUPER::Bar']) +{ + fresh_perl_is(<<EOT, +package UNIVERSAL; sub AUTOLOAD { my \$c = shift; print "\$c \$AUTOLOAD\\n" } +package Xyz; +package main; Foo->$meth->[0](); +EOT + "Foo $meth->[1]", + { switches => [ '-w' ] }, + "check if UNIVERSAL::AUTOLOAD works", + ); +} ==== //depot/maint-5.8/perl/t/run/fresh_perl.t#3 (text) ==== Index: perl/t/run/fresh_perl.t --- perl/t/run/fresh_perl.t#2~18080~ Sun Nov 3 21:23:04 2002 +++ perl/t/run/fresh_perl.t Fri Nov 22 18:02:33 2002 @@ -4,20 +4,9 @@ # Instead, put the test in the appropriate test file and use the # fresh_perl_is()/fresh_perl_like() functions in t/test.pl. -# This is for tests that will normally cause segfaults, and other nasty +# This is for tests that used to abnormally cause segfaults, and other nasty # errors that might kill the interpreter and for some reason you can't # use an eval(). -# -# New tests are added to the bottom. For example. -# -# ######## perlbug ID 20020831.001 -# ($a, b) = (1,2) -# EXPECT -# Can't modify constant item in list assignment - at line 1 -# -# to test that the code "($a, b) = (1,2)" causes the appropriate syntax -# error, rather than just segfaulting as reported in perlbug ID -# 20020831.001 BEGIN { chdir 't' if -d 't'; @@ -114,11 +103,6 @@ EXPECT 12345 ######## -%@x=0; -EXPECT -Can't modify hash dereference in repeat (x) at - line 1, near "0;" -Execution of - aborted due to compilation errors. -######## $_="foo"; printf(STDOUT "%s\n", $_); EXPECT @@ -688,18 +672,6 @@ EXPECT ok ######## -# Bug 20010422.005 -{s//${}/; //} -EXPECT -syntax error at - line 2, near "${}" -Execution of - aborted due to compilation errors. -######## -# Bug 20010528.007 -"\x{" -EXPECT -Missing right brace on \x{} at - line 2, within string -Execution of - aborted due to compilation errors. -######## my $foo = Bar->new(); my @dst; END { @@ -717,26 +689,6 @@ } EXPECT Bar=ARRAY(0x...) -######## -######## found by Markov chain stress testing -eval "a.b.c.d.e.f;sub" -EXPECT - -######## perlbug ID 20010831.001 -($a, b) = (1, 2); -EXPECT -Can't modify constant item in list assignment at - line 1, near ");" -Execution of - aborted due to compilation errors. -######## tying a bareword causes a segfault in 5.6.1 -tie FOO, "Foo"; -EXPECT -Can't modify constant item in tie at - line 1, near ""Foo";" -Execution of - aborted due to compilation errors. -######## undefing constant causes a segfault in 5.6.1 [ID 20010906.019] -undef foo; -EXPECT -Can't modify constant item in undef operator at - line 1, near "foo;" -Execution of - aborted due to compilation errors. ######## (?{...}) compilation bounces on PL_rs -0 { @@ -746,11 +698,6 @@ BEGIN { print "ok\n" } EXPECT ok -######## read($var, FILE, 1) segfaults on 5.6.1 [ID 20011025.054] -read($bla, FILE, 1); -EXPECT -Can't modify constant item in read at - line 1, near "1)" -Execution of - aborted due to compilation errors. ######## scalar ref to file test operator segfaults on 5.6.1 [ID 20011127.155] # This only happens if the filename is 11 characters or less. $foo = \-f "blah"; ==== //depot/maint-5.8/perl/t/run/runenv.t#3 (text) ==== Index: perl/t/run/runenv.t --- perl/t/run/runenv.t#2~18126~ Sat Nov 9 11:00:47 2002 +++ perl/t/run/runenv.t Fri Nov 22 18:02:33 2002 @@ -16,13 +16,17 @@ use Test; -plan tests => 15; +plan tests => 17; my $STDOUT = './results-0'; my $STDERR = './results-1'; my $PERL = './perl'; my $FAILURE_CODE = 119; +delete $ENV{PERLLIB}; +delete $ENV{PERL5LIB}; +delete $ENV{PERL5OPT}; + # Run perl with specified environment and arguments returns a list. # First element is true if Perl's stdout and stderr match the # supplied $stdout and $stderr argument strings exactly. @@ -163,6 +167,18 @@ try({PERL5LIB => "foobar:42"}, ['-e', 'print grep { $_ eq "42" } @INC'], '42', + ''); + +try({PERL5LIB => "foo", + PERLLIB => "bar"}, + ['-e', 'print grep { $_ eq "foo" } @INC'], + 'foo', + ''); + +try({PERL5LIB => "foo", + PERLLIB => "bar"}, + ['-e', 'print grep { $_ eq "bar" } @INC'], + '', ''); # PERL5LIB tests with included arch directories still missing End of Patch.