summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1998-11-17 11:46:56 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1998-11-17 11:46:56 +0000
commitf8d6f981d8f0a94ca1086ebaba0e57541e43e531 (patch)
tree256bafdbaf58aa8387f2b105e03389318b3a083b
parent5cc3184f095c2423ebcaec0ecbd6015ae414670e (diff)
parentc6e96bcb406bc8b8d8610606459ff606ad6883aa (diff)
downloadperl-f8d6f981d8f0a94ca1086ebaba0e57541e43e531.tar.gz
Integrate from mainperl.
p4raw-id: //depot/cfgperl@2247
-rw-r--r--Changes375
-rw-r--r--README.win326
-rw-r--r--embed.h1
-rwxr-xr-xembed.pl10
-rw-r--r--global.sym1
-rw-r--r--globvar.sym1
-rw-r--r--lib/warning.pm112
-rw-r--r--op.c6
-rw-r--r--perl.c4
-rw-r--r--pod/perldiag.pod12
-rw-r--r--pp_ctl.c2
-rw-r--r--regexec.c22
-rwxr-xr-xt/op/groups.t72
-rwxr-xr-xt/op/sort.t29
-rwxr-xr-xt/pragma/overload.t4
-rw-r--r--t/pragma/warn/pp_ctl18
-rw-r--r--t/pragma/warn/toke12
-rw-r--r--thrdvar.h2
-rw-r--r--toke.c13
-rw-r--r--utf8.h6
-rw-r--r--warning.h56
-rw-r--r--warning.pl5
-rw-r--r--win32/config.bc2
-rw-r--r--win32/config.gc2
-rw-r--r--win32/config.vc2
25 files changed, 616 insertions, 159 deletions
diff --git a/Changes b/Changes
index 9a6b251f1e..379e13c8a4 100644
--- a/Changes
+++ b/Changes
@@ -75,7 +75,380 @@ indicator:
----------------
-Version 5.005_53 Development release working toward 5.006
+Version 5.005_54 Development release working toward 5.006
+----------------
+
+____________________________________________________________________________
+[ 2230] By: jhi on 1998/11/12 17:07:45
+ Log: Allow hints file override for d_socket
+ (based on Sequent-induced change #2229).
+ Branch: cfgperl
+ ! Configure
+____________________________________________________________________________
+[ 2229] By: jhi on 1998/11/12 16:32:33
+ Log:
+ From: "Martin J. Bligh" <mbligh@sequent.com>
+ To: jhi@iki.fi
+ cc: gbarr@ti.com, gbarr@pobox.com, gsar@umich.edu
+ Subject: Re: Making Perl work on DYNIX/ptx
+ Date: Tue, 10 Nov 1998 16:24:26 -0800
+ Message-ID: <181999655.910715066@w-186d219.rhe.sequent.com>
+ Branch: cfgperl
+ ! hints/dynixptx.sh
+____________________________________________________________________________
+[ 2228] By: jhi on 1998/11/12 11:40:37
+ Log: From: "Martin J. Bligh" <mbligh@sequent.com>
+ Message-ID: <187803647.910720870@w-186d219.rhe.sequent.com>
+ To: jhi@iki.fi
+ cc: gbarr@ti.com, gbarr@pobox.com, gsar@umich.edu
+ Subject: Re: Making Perl work on DYNIX/ptx
+ Date: Tue, 10 Nov 1998 18:01:10 -0800
+ Branch: cfgperl
+ + ext/DB_File/hints/dynixptx.pl ext/POSIX/hints/dynixptx.pl
+____________________________________________________________________________
+[ 2227] By: jhi on 1998/11/12 11:17:42
+ Log: Integrate from mainperl.
+ Branch: cfgperl
+ !> Changes XSUB.h av.c embed.h embed.pl embedvar.h
+ !> ext/IPC/SysV/Msg.pm global.sym hv.c lib/Text/Wrap.pm objXSUB.h
+ !> perl.c perl.h pod/perlfunc.pod pod/perlvar.pod pp_sys.c
+ !> proto.h regexec.c t/op/array.t util.c win32/makedef.pl
+ !> win32/win32.c x2p/s2p.PL
+____________________________________________________________________________
+[ 2226] By: gsar on 1998/11/11 21:05:42
+ Log: provide -DPERL_POLLUTE
+ Branch: perl
+ ! embed.pl embedvar.h
+____________________________________________________________________________
+[ 2225] By: jhi on 1998/11/09 07:45:12
+ Log: From: Hans Mulder <hansm@icgroup.nl>
+ To: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Cc: gsar@engin.umich.edu (Gurusamy Sarathy), jhi@iki.fi,
+ perl5-porters@perl.org
+ Subject: Re: [PATCH] Re: Not OK: perl 5.00553 on OPENSTEP-Mach 4_1
+ (UNINSTALLED)
+ Date: Sun, 8 Nov 98 22:20:23 +0100
+ Message-Id: <9811082119.AA11802@icgned.icgroup.nl>
+ Branch: cfgperl
+ ! malloc.c perl.h
+____________________________________________________________________________
+[ 2224] By: gsar on 1998/11/09 03:13:14
+ Log: avoid endless loops in Text::Wrap (from a suggestion by Lupe
+ Christoph <lupe@alanya.m.isar.de>)
+ Branch: perl
+ ! lib/Text/Wrap.pm
+____________________________________________________________________________
+[ 2223] By: gsar on 1998/11/09 02:09:06
+ Log: fix misplaced brace in s2p (as suggested by Lionel Fourquaux
+ <lionel.fourquaux@wanadoo.fr>)
+ Branch: perl
+ ! x2p/s2p.PL
+____________________________________________________________________________
+[ 2222] By: gsar on 1998/11/09 01:56:24
+ Log: patches from Hugo van der Sanden <hv@crypt.compulink.co.uk>
+ Date: Wed, 04 Nov 1998 12:19:44 +0000
+ Message-Id: <199811041219.MAA05451@crypt.compulink.co.uk>
+ Subject: [PATCH] Re: [5.005_53] read overflow?
+ --
+ Date: Wed, 04 Nov 1998 13:15:18 +0000
+ Message-Id: <199811041315.NAA05711@crypt.compulink.co.uk>
+ Subject: [PATCH 5.005_53] perl -V fix
+ Branch: perl
+ ! perl.c regexec.c
+____________________________________________________________________________
+[ 2221] By: gsar on 1998/11/09 01:34:56
+ Log: From: jan.dubois@ibm.net (Jan Dubois)
+ Date: Sun, 01 Nov 1998 00:05:01 +0100
+ Message-ID: <364294bd.18052307@smtp1.ibm.net>
+ Subject: [PATCH v5.5.53, WIN32] PL_block_type undefined unless DEBUGGING
+ Branch: perl
+ ! Changes win32/makedef.pl
+____________________________________________________________________________
+[ 2220] By: gsar on 1998/11/08 21:13:07
+ Log: integrate changes#2120,2168,2218 from maint-5.005;
+ add new vtbls; s/\bvtbl_/PL_vtbl_/; remove trailing comma in
+ enum; make regen_headers
+ Branch: perl
+ ! XSUB.h embed.h embedvar.h ext/IPC/SysV/Msg.pm global.sym
+ ! objXSUB.h perl.h pod/perlfunc.pod proto.h util.c win32/win32.c
+____________________________________________________________________________
+[ 2219] By: gsar on 1998/11/08 19:42:57
+ Log: integrate cfgperl changes into mainline
+ Branch: perl
+ +> README.vmesa
+ !> Configure MANIFEST Porting/Glossary Porting/config.sh
+ !> Porting/config_H config_h.SH ext/Thread/Thread.xs
+ !> hints/hpux.sh hints/vmesa.sh lib/Math/Complex.pm malloc.c
+ !> perl.h pod/perlfunc.pod pod/perllocale.pod pod/perlport.pod
+ !> pp_sys.c sv.c t/lib/complex.t t/op/groups.t t/op/lex_assign.t
+ !> thread.h vms/subconfigure.com vos/config.h
+____________________________________________________________________________
+[ 2218] By: gbarr on 1998/11/08 16:48:44
+ Log: From: Graham Barr <gbarr@ti.com>
+ Date: Mon, 2 Nov 1998 07:38:52 -0600
+ Message-ID: <19981102073852.A12751@asic.sc.ti.com>
+ Subject: [PATCH 5.005_*] Re: IPC::Msg 1.03
+ Branch: maint-5.005/perl
+ ! ext/IPC/SysV/Msg.pm
+____________________________________________________________________________
+[ 2215] By: gsar on 1998/11/08 02:52:52
+ Log: set close-on-exec bit on pipe() FDs
+ Branch: perl
+ ! pod/perlfunc.pod pod/perlvar.pod pp_sys.c
+____________________________________________________________________________
+[ 2214] By: gsar on 1998/11/08 02:27:57
+ Log: typo in newHVhv()
+ Branch: perl
+ ! hv.c
+____________________________________________________________________________
+[ 2211] By: jhi on 1998/11/07 21:14:18
+ Log: Finalize the Mach CThreads support.
+
+ From: Hans Mulder <hansm@icgroup.nl>
+ Date: Sat, 7 Nov 98 22:06:20 +0100
+ To: Gurusamy Sarathy <gsar@engin.umich.edu>
+ Cc: jhi@iki.fi, perl5-porters@perl.org
+ Subject: [PATCH] Re: Not OK: perl 5.00553 on OPENSTEP-Mach 4_1 (UNINSTALLED)
+ Message-Id: <9811072105.AA07794@icgned.icgroup.nl>
+ Branch: cfgperl
+ ! malloc.c perl.h
+____________________________________________________________________________
+[ 2210] By: gsar on 1998/11/06 20:36:50
+ Log: fix AvREALISH bogusness
+ Branch: perl
+ ! av.c t/op/array.t
+____________________________________________________________________________
+[ 2209] By: jhi on 1998/11/06 08:05:31
+ Log: Renamed malloc.c ASSERT() macro to P_ASSERT() because
+ ASSERT() causes problems in {NeXTStep,OpenStep}.
+
+ From: Hans Mulder <hansm@icgroup.nl>
+ To: Jarkko Hietaniemi <jhi@cc.hut.fi>
+ Subject: Re: Not OK: perl 5.00553 on OPENSTEP-Mach 4_1 (UNINSTALLED)
+ Date: Fri, 6 Nov 98 01:27:41 +0100
+ Message-Id: <9811060025.AA27389@icgned.icgroup.nl>
+
+ and
+
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Subject: Re: ASSERT() in malloc.c
+ To: jhi@iki.fi
+ Date: Fri, 6 Nov 1998 02:59:29 -0500 (EST)
+ Message-Id: <199811060759.CAA18915@monk.mps.ohio-state.edu>
+ Branch: cfgperl
+ ! malloc.c
+____________________________________________________________________________
+[ 2208] By: jhi on 1998/11/06 07:55:38
+ Log: Mach CThreads needs #include <mach/cthreads.h>.
+ Branch: cfgperl
+ ! perl.h
+____________________________________________________________________________
+[ 2206] By: jhi on 1998/11/05 14:54:52
+ Log: PERL_BADLANG wrongly documented.
+
+ From: ts <decoux@moulon.inra.fr>
+ To: jhi@cc.hut.fi
+ Subject: Re: Locale warning messages
+ Date: Thu, 5 Nov 1998 14:34:19 +0100 (MET)
+ Message-Id: <199811051334.OAA24863@moulon.inra.fr>
+
+ and
+
+ From: Ilya Zakharevich <ilya@math.ohio-state.edu>
+ Subject: Re: PERL_BADLANG
+ To: jhi@iki.fi
+ Subject: Re: PERL_BADLANG
+ Date: Thu, 5 Nov 1998 09:49:00 -0500 (EST)
+ Message-Id: <199811051449.JAA04238@monk.mps.ohio-state.edu>
+ Branch: cfgperl
+ ! pod/perllocale.pod
+____________________________________________________________________________
+[ 2205] By: jhi on 1998/11/05 14:24:33
+ Log: Document all the control flow keywords in perlfunc
+ so that "perlfunc -f while" works.
+ Branch: cfgperl
+ ! pod/perlfunc.pod
+____________________________________________________________________________
+[ 2204] By: jhi on 1998/11/05 12:46:02
+ Log: Configure update. Remove last trace of PTHREADS_CREATED_JOINABLE
+ (from vos/config.h). Update Porting/{Glossary,config*}.
+ Branch: cfgperl
+ ! Configure Porting/Glossary Porting/config.sh Porting/config_H
+ ! config_h.SH vos/config.h
+____________________________________________________________________________
+[ 2203] By: jhi on 1998/11/05 08:34:39
+ Log: VM/ESA and VMS sig_num_init (change#2101) catchup.
+ Branch: cfgperl
+ ! hints/vmesa.sh vms/subconfigure.com
+____________________________________________________________________________
+[ 2202] By: jhi on 1998/11/05 08:03:20
+ Log: Integrate from mainperl.
+ Branch: cfgperl
+ !> Changes cop.h doop.c gv.c mg.c perl.c pp_ctl.c sv.c util.c
+ !> win32/Makefile win32/makefile.mk win32/win32.c
+____________________________________________________________________________
+[ 2201] By: gsar on 1998/11/05 04:40:44
+ Log: another POPSTACK victim
+ Branch: perl
+ ! cop.h sv.c
+____________________________________________________________________________
+[ 2196] By: gsar on 1998/11/05 02:07:54
+ Log: fix a location affected by change#2191, add note about POPSTACK
+ Branch: perl
+ ! cop.h gv.c pp_ctl.c
+____________________________________________________________________________
+[ 2195] By: gsar on 1998/11/05 02:04:45
+ Log: makefile notes
+ Branch: perl
+ ! win32/Makefile win32/makefile.mk
+____________________________________________________________________________
+[ 2192] By: gsar on 1998/11/04 23:48:53
+ Log: indeterminate order-of-evaluation fixes
+ Branch: perl
+ ! mg.c
+____________________________________________________________________________
+[ 2191] By: gsar on 1998/11/04 23:02:16
+ Log: refetch local stack pointer in POPSTACK
+ Branch: perl
+ ! cop.h perl.c
+____________________________________________________________________________
+[ 2190] By: jhi on 1998/11/04 08:50:40
+ Log: Configure update.
+ Sequent DYNIX/ptx updates: osvers=$4 (instead of $3) of uname -a,
+
+ From: Andy Dougherty <doughera@lafcol.lafayette.edu>
+ To: Martin Bligh <mbligh@sequent.com>
+ Cc: Jarkko Hietaniemi <jhi@iki.fi>
+ Subject: Re: Perl 5's configure on DYNIX/ptx
+ Message-Id: <Pine.SUN.3.96.981103090824.5533B-100000@newton.phys>
+ Date: Tue, 3 Nov 1998 09:35:26 -0500 (EST)
+
+ find sockets also from libsocket, not just libnet.
+ OS390: $compile_ok instead of $compile for <inttypes.h>,
+
+ From: pvhp@forte.com (Peter Prymmer)
+ To: Thomas.Dorner@start.de, jhi@iki.fi, neale@VMA.TABNSW.COM.AU
+ Subject: _53 not OK on os390 but looking better than ever
+ Date: Tue, 3 Nov 98 17:33:22 PST
+ Message-Id: <9811040133.AA09450@forte.com>
+ Branch: cfgperl
+ ! Configure
+____________________________________________________________________________
+[ 2189] By: jhi on 1998/11/04 07:43:58
+ Log: sysio.t failure: fix undefined order of evaluation, from
+
+ From: Spider Boardman <spider@web.zk3.dec.com>
+ Subject: Not OK: perl 5.00553 on alpha-thread 5.0 [PATCH]
+ To: perlbug@perl.com
+ Date: 4 Nov 1998 01:22:30 +0200
+ Message-ID: <MLIST_199811032227.RAA143892@web.zk3.dec.com>
+ Branch: cfgperl
+ ! pp_sys.c
+____________________________________________________________________________
+[ 2188] By: gsar on 1998/11/04 02:59:16
+ Log: fix return value of win32_pclose()
+ Branch: perl
+ ! win32/win32.c
+____________________________________________________________________________
+[ 2187] By: gsar on 1998/11/04 02:56:34
+ Log: s/sv_upgrade/SvUPGRADE/ a couple of places
+ Branch: perl
+ ! Changes doop.c gv.c util.c
+____________________________________________________________________________
+[ 2186] By: jhi on 1998/11/03 08:17:52
+ Log: Document quads in pack.
+ Branch: cfgperl
+ ! pod/perlfunc.pod
+____________________________________________________________________________
+[ 2185] By: jhi on 1998/11/03 07:49:35
+ Log: (IV) vs (I32) vs I_V()
+
+ Subject: [PATCH 5.005_53] Reverting typecast in sv_upgrade()
+ From: Anton Berezin <tobez@plab.ku.dk>
+ To: "p5p" <perl5-porters@perl.org>
+ Date: 01 Nov 1998 15:09:11 +0100
+ Message-ID: <86hfwjtshk.fsf@lion.plab.ku.dk>
+
+ and
+
+ From: Andy Dougherty <doughera@lafcol.lafayette.edu>
+ Date: Mon, 2 Nov 1998 10:17:34 -0500 (EST)
+ Message-Id: <Pine.SUN.3.96.981102101433.4479B-100000@newton.phys>
+ Branch: cfgperl
+ ! sv.c
+____________________________________________________________________________
+[ 2184] By: jhi on 1998/11/03 07:42:46
+ Log: VM/ESA updates.
+ Branch: cfgperl
+ + README.vmesa
+ ! MANIFEST pod/perlfunc.pod pod/perlport.pod
+____________________________________________________________________________
+[ 2183] By: jhi on 1998/11/02 12:58:13
+ Log: The id(1)-parsing is real fun.
+ Branch: cfgperl
+ ! t/op/groups.t
+____________________________________________________________________________
+[ 2182] By: jhi on 1998/11/02 12:07:43
+ Log: Decommission the symlink test.
+ Branch: cfgperl
+ ! t/op/lex_assign.t
+____________________________________________________________________________
+[ 2181] By: jhi on 1998/11/02 12:03:08
+ Log: Replace ATTR_JOINABLE with true Configure probe
+ for PTHREAD_CREATE_JOINABLE (or equivalent:
+ PTHREAD_CREATE_UNDETACHED or __UNDETACHED).
+ Remove ATTR_JOINABLE itself: Thread.xs uses
+ PTHREAD_CREATE_JOINABLE (or equivalent) directly.
+
+ Really scan for <mach/cthreads.h> only if usethreads.
+ Branch: cfgperl
+ ! Configure config_h.SH ext/Thread/Thread.xs thread.h
+____________________________________________________________________________
+[ 2180] By: jhi on 1998/11/02 11:07:34
+ Log: In HP-UX 10.X usethreads only if the required files are present.
+ Branch: cfgperl
+ ! hints/hpux.sh
+____________________________________________________________________________
+[ 2179] By: jhi on 1998/11/02 09:10:33
+ Log: Prefer groups(1).
+ id -Gn can be broken.
+ id -a can save the day.
+ Branch: cfgperl
+ ! t/op/groups.t
+____________________________________________________________________________
+[ 2178] By: jhi on 1998/11/02 08:35:29
+ Log: Detrail enum comma.
+ Branch: cfgperl
+ ! perl.h
+____________________________________________________________________________
+[ 2177] By: jhi on 1998/11/02 08:24:12
+ Log: 0**0 = 1, from
+
+ From: d-lewart@uiuc.edu (Daniel S. Lewart)
+ Subject: Math::Complex 0**0 patches
+ Date: Sun, 1 Nov 1998 19:21:48 -0600 (CST)
+ Message-Id: <199811020121.TAA28310@staff2.cso.uiuc.edu>
+ To: jhi@iki.fi (Jarkko Hietaniemi),
+ Raphael_Manfredi@grenoble.hp.com (Raphael Manfredi)
+ Branch: cfgperl
+ ! lib/Math/Complex.pm t/lib/complex.t
+____________________________________________________________________________
+[ 2168] By: gbarr on 1998/11/01 01:58:58
+ Log: From: jan.dubois@ibm.net (Jan Dubois)
+ Date: Fri, 09 Oct 1998 23:28:31 +0200
+ Message-ID: <36217b7f.3193091@smtp1.ibm.net>
+ Subject: [PATCH 5.005_02] Allow XS access to vtbl_*s when compiled with PERL_OBJECT
+ Branch: maint-5.005/perl
+ ! XSUB.h
+____________________________________________________________________________
+[ 2164] By: jhi on 1998/10/31 15:50:02
+ Log: Integrate from mainperl.
+ Branch: cfgperl
+ +> t/op/lex_assign.t
+ !> (integrate 45 files)
+
+----------------
+Version 5.005_53
----------------
____________________________________________________________________________
diff --git a/README.win32 b/README.win32
index 35c8100f01..7fcc58fa4e 100644
--- a/README.win32
+++ b/README.win32
@@ -211,9 +211,9 @@ perl95.exe will have esoteric problems with extensions like perl/Tk that
themselves use the C Runtime heavily, or want to free() pointers
malloc()-ed by perl.
-You can avoid the perl95.exe problems completely if you use Borland
-C++ for building perl (perl95.exe is not needed and will not be built
-in that case).
+You can avoid the perl95.exe problems completely if you either enable
+USE_PERLCRT with Visual C++, or use Borland C++ for building perl. In
+those cases, perl95.exe is not needed and will not be built.
=back
diff --git a/embed.h b/embed.h
index c240a9815a..4150e9ba57 100644
--- a/embed.h
+++ b/embed.h
@@ -964,7 +964,6 @@
#define utf8_distance Perl_utf8_distance
#define utf8_hop Perl_utf8_hop
#define utf8_to_uv Perl_utf8_to_uv
-#define utf8skip Perl_utf8skip
#define utilize Perl_utilize
#define uv_to_utf8 Perl_uv_to_utf8
#define vivify_defelem Perl_vivify_defelem
diff --git a/embed.pl b/embed.pl
index 709acc60e0..e318df10f3 100755
--- a/embed.pl
+++ b/embed.pl
@@ -365,17 +365,7 @@ my @extras = qw(
fprintf
);
-my %skip;
-
-for $sym (qw[
- utf8skip
- ])
-{
- $skip{$sym}++;
-}
-
for $sym (sort(keys(%global),@extras)) {
- next if exists $skip{$sym};
print EM embedobj($sym);
}
diff --git a/global.sym b/global.sym
index 95c2b0a8c5..38e6998514 100644
--- a/global.sym
+++ b/global.sym
@@ -611,7 +611,6 @@ utf16_to_utf8_reversed
utf8_distance
utf8_hop
utf8_to_uv
-utf8skip
utilize
uv_to_utf8
vivify_defelem
diff --git a/globvar.sym b/globvar.sym
index 91329ca47b..0bf1fee262 100644
--- a/globvar.sym
+++ b/globvar.sym
@@ -36,6 +36,7 @@ psig_name
psig_ptr
regkind
simple
+utf8skip
varies
vtbl_sv
vtbl_env
diff --git a/lib/warning.pm b/lib/warning.pm
index c81e644410..f2fa38d288 100644
--- a/lib/warning.pm
+++ b/lib/warning.pm
@@ -45,70 +45,70 @@ use Carp ;
%Bits = (
'all' => "\x55\x55\x55\x55\x55\x55\x55\x55", # [0..31]
- 'ambiguous' => "\x00\x00\x00\x00\x10\x00\x00\x00", # [18]
- 'closed' => "\x00\x00\x00\x00\x00\x40\x00\x00", # [23]
- 'closure' => "\x00\x04\x00\x00\x00\x00\x00\x00", # [5]
- 'default' => "\x00\x00\x10\x00\x00\x00\x00\x00", # [10]
+ 'ambiguous' => "\x00\x00\x00\x04\x00\x00\x00\x00", # [13]
+ 'closed' => "\x10\x00\x00\x00\x00\x00\x00\x00", # [2]
+ 'closure' => "\x00\x00\x00\x00\x00\x40\x00\x00", # [23]
+ 'default' => "\x01\x00\x00\x00\x00\x00\x00\x00", # [0]
'deprecated' => "\x00\x00\x00\x10\x00\x00\x00\x00", # [14]
- 'exec' => "\x00\x00\x00\x00\x00\x00\x01\x00", # [24]
- 'io' => "\x00\x00\x00\x00\x00\x54\x15\x00", # [21..26]
- 'misc' => "\x00\x00\x00\x00\x00\x00\x00\x04", # [29]
- 'newline' => "\x00\x00\x00\x00\x00\x10\x00\x00", # [22]
- 'numeric' => "\x00\x00\x04\x00\x00\x00\x00\x00", # [9]
- 'octal' => "\x00\x00\x00\x00\x04\x00\x00\x00", # [17]
- 'once' => "\x00\x00\x40\x00\x00\x00\x00\x00", # [11]
- 'parenthesis' => "\x00\x00\x00\x00\x40\x00\x00\x00", # [19]
- 'pipe' => "\x00\x00\x00\x00\x00\x00\x10\x00", # [26]
- 'precedence' => "\x00\x00\x00\x00\x00\x01\x00\x00", # [20]
- 'printf' => "\x00\x00\x00\x00\x01\x00\x00\x00", # [16]
- 'recursion' => "\x00\x00\x00\x00\x00\x00\x00\x01", # [28]
- 'redefine' => "\x01\x00\x00\x00\x00\x00\x00\x00", # [0]
- 'reserved' => "\x00\x00\x00\x04\x00\x00\x00\x00", # [13]
- 'semicolon' => "\x00\x00\x00\x40\x00\x00\x00\x00", # [15]
- 'signal' => "\x00\x40\x00\x00\x00\x00\x00\x00", # [7]
- 'substr' => "\x00\x01\x00\x00\x00\x00\x00\x00", # [4]
+ 'exec' => "\x40\x00\x00\x00\x00\x00\x00\x00", # [3]
+ 'io' => "\x54\x15\x00\x00\x00\x00\x00\x00", # [1..6]
+ 'misc' => "\x00\x40\x00\x00\x00\x00\x00\x00", # [7]
+ 'newline' => "\x00\x01\x00\x00\x00\x00\x00\x00", # [4]
+ 'numeric' => "\x00\x00\x01\x00\x00\x00\x00\x00", # [8]
+ 'octal' => "\x00\x00\x00\x40\x00\x00\x00\x00", # [15]
+ 'once' => "\x00\x00\x04\x00\x00\x00\x00\x00", # [9]
+ 'parenthesis' => "\x00\x00\x00\x00\x01\x00\x00\x00", # [16]
+ 'pipe' => "\x00\x04\x00\x00\x00\x00\x00\x00", # [5]
+ 'precedence' => "\x00\x00\x00\x00\x04\x00\x00\x00", # [17]
+ 'printf' => "\x00\x00\x00\x00\x10\x00\x00\x00", # [18]
+ 'recursion' => "\x00\x00\x10\x00\x00\x00\x00\x00", # [10]
+ 'redefine' => "\x00\x00\x40\x00\x00\x00\x00\x00", # [11]
+ 'reserved' => "\x00\x00\x00\x00\x40\x00\x00\x00", # [19]
+ 'semicolon' => "\x00\x00\x00\x00\x00\x01\x00\x00", # [20]
+ 'signal' => "\x00\x00\x00\x00\x00\x00\x01\x00", # [24]
+ 'substr' => "\x00\x00\x00\x00\x00\x00\x04\x00", # [25]
'syntax' => "\x00\x00\x00\x55\x55\x01\x00\x00", # [12..20]
- 'taint' => "\x40\x00\x00\x00\x00\x00\x00\x00", # [3]
- 'uninitialized' => "\x00\x00\x00\x00\x00\x00\x40\x00", # [27]
- 'unopened' => "\x00\x00\x00\x00\x00\x00\x04\x00", # [25]
- 'unsafe' => "\x50\x55\x01\x00\x00\x00\x00\x00", # [2..8]
- 'untie' => "\x00\x10\x00\x00\x00\x00\x00\x00", # [6]
- 'utf8' => "\x00\x00\x01\x00\x00\x00\x00\x00", # [8]
- 'void' => "\x04\x00\x00\x00\x00\x00\x00\x00", # [1]
+ 'taint' => "\x00\x00\x00\x00\x00\x00\x10\x00", # [26]
+ 'uninitialized' => "\x00\x00\x00\x00\x00\x04\x00\x00", # [21]
+ 'unopened' => "\x00\x10\x00\x00\x00\x00\x00\x00", # [6]
+ 'unsafe' => "\x00\x00\x00\x00\x00\x50\x55\x01", # [22..28]
+ 'untie' => "\x00\x00\x00\x00\x00\x00\x40\x00", # [27]
+ 'utf8' => "\x00\x00\x00\x00\x00\x00\x00\x01", # [28]
+ 'void' => "\x00\x00\x00\x00\x00\x00\x00\x04", # [29]
);
%DeadBits = (
'all' => "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", # [0..31]
- 'ambiguous' => "\x00\x00\x00\x00\x20\x00\x00\x00", # [18]
- 'closed' => "\x00\x00\x00\x00\x00\x80\x00\x00", # [23]
- 'closure' => "\x00\x08\x00\x00\x00\x00\x00\x00", # [5]
- 'default' => "\x00\x00\x20\x00\x00\x00\x00\x00", # [10]
+ 'ambiguous' => "\x00\x00\x00\x08\x00\x00\x00\x00", # [13]
+ 'closed' => "\x20\x00\x00\x00\x00\x00\x00\x00", # [2]
+ 'closure' => "\x00\x00\x00\x00\x00\x80\x00\x00", # [23]
+ 'default' => "\x02\x00\x00\x00\x00\x00\x00\x00", # [0]
'deprecated' => "\x00\x00\x00\x20\x00\x00\x00\x00", # [14]
- 'exec' => "\x00\x00\x00\x00\x00\x00\x02\x00", # [24]
- 'io' => "\x00\x00\x00\x00\x00\xa8\x2a\x00", # [21..26]
- 'misc' => "\x00\x00\x00\x00\x00\x00\x00\x08", # [29]
- 'newline' => "\x00\x00\x00\x00\x00\x20\x00\x00", # [22]
- 'numeric' => "\x00\x00\x08\x00\x00\x00\x00\x00", # [9]
- 'octal' => "\x00\x00\x00\x00\x08\x00\x00\x00", # [17]
- 'once' => "\x00\x00\x80\x00\x00\x00\x00\x00", # [11]
- 'parenthesis' => "\x00\x00\x00\x00\x80\x00\x00\x00", # [19]
- 'pipe' => "\x00\x00\x00\x00\x00\x00\x20\x00", # [26]
- 'precedence' => "\x00\x00\x00\x00\x00\x02\x00\x00", # [20]
- 'printf' => "\x00\x00\x00\x00\x02\x00\x00\x00", # [16]
- 'recursion' => "\x00\x00\x00\x00\x00\x00\x00\x02", # [28]
- 'redefine' => "\x02\x00\x00\x00\x00\x00\x00\x00", # [0]
- 'reserved' => "\x00\x00\x00\x08\x00\x00\x00\x00", # [13]
- 'semicolon' => "\x00\x00\x00\x80\x00\x00\x00\x00", # [15]
- 'signal' => "\x00\x80\x00\x00\x00\x00\x00\x00", # [7]
- 'substr' => "\x00\x02\x00\x00\x00\x00\x00\x00", # [4]
+ 'exec' => "\x80\x00\x00\x00\x00\x00\x00\x00", # [3]
+ 'io' => "\xa8\x2a\x00\x00\x00\x00\x00\x00", # [1..6]
+ 'misc' => "\x00\x80\x00\x00\x00\x00\x00\x00", # [7]
+ 'newline' => "\x00\x02\x00\x00\x00\x00\x00\x00", # [4]
+ 'numeric' => "\x00\x00\x02\x00\x00\x00\x00\x00", # [8]
+ 'octal' => "\x00\x00\x00\x80\x00\x00\x00\x00", # [15]
+ 'once' => "\x00\x00\x08\x00\x00\x00\x00\x00", # [9]
+ 'parenthesis' => "\x00\x00\x00\x00\x02\x00\x00\x00", # [16]
+ 'pipe' => "\x00\x08\x00\x00\x00\x00\x00\x00", # [5]
+ 'precedence' => "\x00\x00\x00\x00\x08\x00\x00\x00", # [17]
+ 'printf' => "\x00\x00\x00\x00\x20\x00\x00\x00", # [18]
+ 'recursion' => "\x00\x00\x20\x00\x00\x00\x00\x00", # [10]
+ 'redefine' => "\x00\x00\x80\x00\x00\x00\x00\x00", # [11]
+ 'reserved' => "\x00\x00\x00\x00\x80\x00\x00\x00", # [19]
+ 'semicolon' => "\x00\x00\x00\x00\x00\x02\x00\x00", # [20]
+ 'signal' => "\x00\x00\x00\x00\x00\x00\x02\x00", # [24]
+ 'substr' => "\x00\x00\x00\x00\x00\x00\x08\x00", # [25]
'syntax' => "\x00\x00\x00\xaa\xaa\x02\x00\x00", # [12..20]
- 'taint' => "\x80\x00\x00\x00\x00\x00\x00\x00", # [3]
- 'uninitialized' => "\x00\x00\x00\x00\x00\x00\x80\x00", # [27]
- 'unopened' => "\x00\x00\x00\x00\x00\x00\x08\x00", # [25]
- 'unsafe' => "\xa0\xaa\x02\x00\x00\x00\x00\x00", # [2..8]
- 'untie' => "\x00\x20\x00\x00\x00\x00\x00\x00", # [6]
- 'utf8' => "\x00\x00\x02\x00\x00\x00\x00\x00", # [8]
- 'void' => "\x08\x00\x00\x00\x00\x00\x00\x00", # [1]
+ 'taint' => "\x00\x00\x00\x00\x00\x00\x20\x00", # [26]
+ 'uninitialized' => "\x00\x00\x00\x00\x00\x08\x00\x00", # [21]
+ 'unopened' => "\x00\x20\x00\x00\x00\x00\x00\x00", # [6]
+ 'unsafe' => "\x00\x00\x00\x00\x00\xa0\xaa\x02", # [22..28]
+ 'untie' => "\x00\x00\x00\x00\x00\x00\x80\x00", # [27]
+ 'utf8' => "\x00\x00\x00\x00\x00\x00\x00\x02", # [28]
+ 'void' => "\x00\x00\x00\x00\x00\x00\x00\x08", # [29]
);
diff --git a/op.c b/op.c
index 75c7d9f7d2..a64b435761 100644
--- a/op.c
+++ b/op.c
@@ -4680,6 +4680,10 @@ ck_fun(OP *o)
op_free(kid);
kid = newop;
}
+ else if (kid->op_type == OP_READLINE) {
+ /* neophyte patrol: open(<FH>), close(<FH>) etc. */
+ bad_type(numargs, "HANDLE", PL_op_desc[o->op_type], kid);
+ }
else {
kid->op_sibling = 0;
kid = newUNOP(OP_RV2GV, 0, scalar(kid));
@@ -5049,6 +5053,8 @@ ck_sort(OP *o)
kid->op_next = k;
o->op_flags |= OPf_SPECIAL;
}
+ else if (kid->op_type == OP_RV2SV || kid->op_type == OP_PADSV)
+ null(cLISTOPo->op_first->op_sibling);
}
return o;
diff --git a/perl.c b/perl.c
index d2ee055816..bf86fef8be 100644
--- a/perl.c
+++ b/perl.c
@@ -354,6 +354,7 @@ perl_destruct(register PerlInterpreter *sv_interp)
PL_main_start = Nullop;
SvREFCNT_dec(PL_main_cv);
PL_main_cv = Nullcv;
+ PL_dirty = TRUE;
if (PL_sv_objcount) {
/*
@@ -361,8 +362,6 @@ perl_destruct(register PerlInterpreter *sv_interp)
* destructors and destructees still exist. Some sv's might remain.
* Non-referenced objects are on their own.
*/
-
- PL_dirty = TRUE;
sv_clean_objs();
}
@@ -1872,6 +1871,7 @@ init_interp(void)
PL_profiledata = NULL; \
PL_rsfp = Nullfp; \
PL_rsfp_filters = Nullav; \
+ PL_dirty = FALSE; \
} STMT_END
I_REINIT;
#else
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 4e09da0930..29ed89796d 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -143,6 +143,18 @@ Perl yourself.
instead of Perl. Check the #! line, or manually feed your script
into Perl yourself.
+=item (in cleanup) %s
+
+(W) This prefix usually indicates that a DESTROY() method raised
+the indicated exception. Since destructors are usually called by
+the system at arbitrary points during execution, and often a vast
+number of times, the warning is issued only once for any number
+of failures that would otherwise result in the same message being
+repeated.
+
+Failure of user callbacks dispatched using the C<G_KEEPERR> flag
+could also result in this warning. See L<perlcall/G_KEEPERR>.
+
=item (Missing semicolon on previous line?)
(S) This is an educated guess made in conjunction with the message "%s
diff --git a/pp_ctl.c b/pp_ctl.c
index 0f02c662e9..e4b8a739fa 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1253,6 +1253,8 @@ die_where(char *message)
SvGROW(err, SvCUR(err)+sizeof(prefix)+klen);
sv_catpvn(err, prefix, sizeof(prefix)-1);
sv_catpvn(err, message, klen);
+ if (ckWARN(WARN_UNSAFE))
+ warner(WARN_UNSAFE, SvPVX(err));
}
sv_inc(*svp);
}
diff --git a/regexec.c b/regexec.c
index 83db7b5472..841b9008c2 100644
--- a/regexec.c
+++ b/regexec.c
@@ -417,7 +417,7 @@ regexec_flags(register regexp *prog, char *stringarg, register char *strend,
if (s > startpos)
s--;
while (s < strend) {
- if (*s++ == '\n') { /* don't need utf8skip here */
+ if (*s++ == '\n') { /* don't need PL_utf8skip here */
if (s < strend && regtry(prog, s))
goto got_it;
}
@@ -1185,7 +1185,7 @@ regmatch(regnode *prog)
break;
case SANYUTF8:
if (nextchr & 0x80) {
- locinput += utf8skip[nextchr];
+ locinput += PL_utf8skip[nextchr];
if (locinput > PL_regeol)
sayNO;
nextchr = UCHARAT(locinput);
@@ -1202,7 +1202,7 @@ regmatch(regnode *prog)
break;
case ANYUTF8:
if (nextchr & 0x80) {
- locinput += utf8skip[nextchr];
+ locinput += PL_utf8skip[nextchr];
if (locinput > PL_regeol)
sayNO;
nextchr = UCHARAT(locinput);
@@ -1278,7 +1278,7 @@ regmatch(regnode *prog)
sayNO;
if (locinput >= PL_regeol)
sayNO;
- locinput += utf8skip[nextchr];
+ locinput += PL_utf8skip[nextchr];
nextchr = UCHARAT(locinput);
break;
case ANYOF:
@@ -1315,7 +1315,7 @@ regmatch(regnode *prog)
{
sayNO;
}
- locinput += utf8skip[nextchr];
+ locinput += PL_utf8skip[nextchr];
nextchr = UCHARAT(locinput);
break;
}
@@ -1348,7 +1348,7 @@ regmatch(regnode *prog)
{
sayNO;
}
- locinput += utf8skip[nextchr];
+ locinput += PL_utf8skip[nextchr];
nextchr = UCHARAT(locinput);
break;
}
@@ -1420,7 +1420,7 @@ regmatch(regnode *prog)
{
sayNO;
}
- locinput += utf8skip[nextchr];
+ locinput += PL_utf8skip[nextchr];
nextchr = UCHARAT(locinput);
break;
}
@@ -1453,7 +1453,7 @@ regmatch(regnode *prog)
{
sayNO;
}
- locinput += utf8skip[nextchr];
+ locinput += PL_utf8skip[nextchr];
nextchr = UCHARAT(locinput);
break;
}
@@ -1471,7 +1471,7 @@ regmatch(regnode *prog)
if (nextchr & 0x80) {
if (!(swash_fetch(PL_utf8_digit,(U8*)locinput)))
sayNO;
- locinput += utf8skip[nextchr];
+ locinput += PL_utf8skip[nextchr];
nextchr = UCHARAT(locinput);
break;
}
@@ -1492,7 +1492,7 @@ regmatch(regnode *prog)
if (nextchr & 0x80) {
if (swash_fetch(PL_utf8_digit,(U8*)locinput))
sayNO;
- locinput += utf8skip[nextchr];
+ locinput += PL_utf8skip[nextchr];
nextchr = UCHARAT(locinput);
break;
}
@@ -1503,7 +1503,7 @@ regmatch(regnode *prog)
case CLUMP:
if (locinput >= PL_regeol || swash_fetch(PL_utf8_mark,(U8*)locinput))
sayNO;
- locinput += utf8skip[nextchr];
+ locinput += PL_utf8skip[nextchr];
while (locinput < PL_regeol && swash_fetch(PL_utf8_mark,(U8*)locinput))
locinput += UTF8SKIP(locinput);
if (locinput > PL_regeol)
diff --git a/t/op/groups.t b/t/op/groups.t
index 6f7f8c478c..78a748fddd 100755
--- a/t/op/groups.t
+++ b/t/op/groups.t
@@ -1,6 +1,6 @@
#!./perl
-$ENV{PATH} = '/usr/xpg4/bin:/bin:/usr/bin:/usr/ucb';
+$ENV{PATH} = '/bin:/usr/bin:/usr/xpg4/bin:/usr/ucb';
# We have to find a command that prints all (effective
# and real) group names (not ids). The known commands are:
@@ -10,23 +10,44 @@ $ENV{PATH} = '/usr/xpg4/bin:/bin:/usr/bin:/usr/ucb';
# Beware 1: some systems do just 'id -G' even when 'id -Gn' is used.
# Beware 2: id -Gn or id -a format might be id(name) or name(id).
# Beware 3: the groups= might be anywhere in the id output.
+# Beware 4: groups can have spaces ('id -a' being the only defense against this)
#
# That is, we might meet the following:
#
-# foo bar zot # accept
-# 1 2 3 # reject
-# groups=foo(1),bar(2),zot(3) # parse
-# groups=1(foo),2(bar),3(zot) # parse
+# foo bar zot # accept
+# foo 22 42 bar zot # accept
+# 1 22 42 2 3 # reject
+# groups=(42),foo(1),bar(2),zot me(3) # parse
+# groups=22,42,1(foo),2(bar),3(zot me) # parse
#
# and the groups= might be after, before, or between uid=... and gid=...
GROUPS: {
- last GROUPS if ($groups = `groups 2>/dev/null`) ne '';
- if ($groups = `id -Gn 2>/dev/null` ne '') {
- last GROUPS unless $groups =~ /^(\d+)(\s+\d)*$/;
+ # prefer 'id' over 'groups' (is this ever wrong anywhere?)
+ # and 'id -a' over 'id -Gn' (the former is good about spaces in group names)
+ if (($groups = `id -a 2>/dev/null`) ne '') {
+ # $groups is of the form:
+ # uid=39957(gsar) gid=22(users) groups=33536,39181,22(users),0(root),1067(dev)
+ last GROUPS;
+ }
+ if (($groups = `id -Gn 2>/dev/null`) ne '') {
+ # $groups could be of the form:
+ # users 33536 39181 root dev
+ last GROUPS if $groups !~ /^(\d|\s)+$/;
}
- if ($groups = `id -a 2>/dev/null` ne '') {
- # Grok format soon.
+ if (($groups = `groups 2>/dev/null`) ne '') {
+ # may not reflect all groups in some places, so do a sanity check
+ if (-d '/afs') {
+ print <<EOM;
+# These test results *may* be bogus, as you appear to have AFS,
+# and I can't find a working 'id' in your PATH (which I have set
+# to '$ENV{PATH}').
+#
+# If these tests fail, report the particular incantation you use
+# on this platform to find *all* the groups that an arbitrary
+# luser may belong to, using the 'perlbug' program.
+EOM
+ }
last GROUPS;
}
# Okay, not today.
@@ -36,21 +57,28 @@ GROUPS: {
# Remember that group names can contain whitespace, '-', et cetera.
# That is: do not \w, do not \S.
-if ($groups =~ /groups=((.+?\(.+?\))(,.+?\(.+?\))*)( [ug]id=|$)/) {
+if ($groups =~ /groups=(.+)( [ug]id=|$)/) {
my $gr = $1;
- my @g0 = $gr =~ /(.+?)\((.+?)\),?/g;
- my @g1 = @g0[ map { $_ * 2 } 0..$#g0/2 ];
- my @g2 = @g0[ map { $_ * 2 + 1 } 0..$#g0/2 ];
+ my @g0 = split /,/, $gr;
+ my @g1;
+ # prefer names over numbers
+ for (@g0) {
+ # 42(zot me)
+ if (/^(\d+)(?:\(([^)]+)\))?$/) {
+ push @g1, ($2 || $1);
+ }
+ # zot me(42)
+ elsif (/^([^(]*)\((\d+)\)$/) {
+ push @g1, ($1 || $2);
+ }
+ else {
+ print "# ignoring group entry [$_]\n";
+ }
+ }
+ print "# groups=$gr\n";
print "# g0 = @g0\n";
print "# g1 = @g1\n";
- print "# g2 = @g2\n";
- if (grep /\D/, @g1) {
- $groups = join(" ", @g1);
- } elsif (grep /\D/, @g2) {
- $groups = join(" ", @g2);
- } else {
- # Let's fail. We want to parse the output. Really.
- }
+ $groups = "@g1";
}
print "1..2\n";
diff --git a/t/op/sort.t b/t/op/sort.t
index 70341b9106..aca99a629d 100755
--- a/t/op/sort.t
+++ b/t/op/sort.t
@@ -1,8 +1,6 @@
#!./perl
-# $RCSfile: sort.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:24 $
-
-print "1..21\n";
+print "1..27\n";
sub backwards { $a lt $b ? 1 : $a gt $b ? -1 : 0 }
@@ -125,3 +123,28 @@ eval <<'CODE';
my @result = sort 'one', 'two';
CODE
print $@ ? "not ok 21\n# $@" : "ok 21\n";
+
+{
+ my $sortsub = \&backwards;
+ my $sortglob = *backwards;
+ my $sortname = 'backwards';
+ @b = sort $sortsub 4,1,3,2;
+ print ("@b" eq '4 3 2 1' ? "ok 22\n" : "not ok 22 |@b|\n");
+ @b = sort $sortglob 4,1,3,2;
+ print ("@b" eq '4 3 2 1' ? "ok 23\n" : "not ok 23 |@b|\n");
+ @b = sort $sortname 4,1,3,2;
+ print ("@b" eq '4 3 2 1' ? "ok 24\n" : "not ok 24 |@b|\n");
+}
+
+{
+ local $sortsub = \&backwards;
+ local $sortglob = *backwards;
+ local $sortname = 'backwards';
+ @b = sort $sortsub 4,1,3,2;
+ print ("@b" eq '4 3 2 1' ? "ok 25\n" : "not ok 22 |@b|\n");
+ @b = sort $sortglob 4,1,3,2;
+ print ("@b" eq '4 3 2 1' ? "ok 26\n" : "not ok 23 |@b|\n");
+ @b = sort $sortname 4,1,3,2;
+ print ("@b" eq '4 3 2 1' ? "ok 27\n" : "not ok 24 |@b|\n");
+}
+
diff --git a/t/pragma/overload.t b/t/pragma/overload.t
index da857715b3..c013a7cb36 100755
--- a/t/pragma/overload.t
+++ b/t/pragma/overload.t
@@ -778,8 +778,8 @@ test($c, "bareword"); # 135
test "@sorted", '22 11 5 2 1'; # 189
# Scalar
test $$deref, 123; # 190
- # Glob
- @sorted = sort $deref 11, 2, 5, 1, 22;
+ # Code
+ @sorted = sort $srt 11, 2, 5, 1, 22;
test "@sorted", '22 11 5 2 1'; # 191
# Array
test "@$deref", '11 12 13'; # 192
diff --git a/t/pragma/warn/pp_ctl b/t/pragma/warn/pp_ctl
index e017d8a0a8..70c67fa598 100644
--- a/t/pragma/warn/pp_ctl
+++ b/t/pragma/warn/pp_ctl
@@ -53,6 +53,10 @@
goto &fred()
+ (in cleanup) foo bar
+ package Foo;
+ DESTROY { die "foo bar" }
+ { bless [], 'Foo' for 1..10 }
__END__
# pp_ctl.c
@@ -86,7 +90,7 @@ Exiting subroutine via last at - line 3.
########
# pp_ctl.c
use warning 'unsafe' ;
-{ eval "last" }
+{ eval "last;" }
print STDERR $@ ;
EXPECT
Exiting eval via last at (eval 1) line 1.
@@ -119,10 +123,10 @@ Exiting subroutine via last at - line 3.
########
# pp_ctl.c
use warning 'unsafe' ;
-joe: { eval "last joe" }
+joe: { eval "last joe;" }
print STDERR $@ ;
EXPECT
-Exiting eval via last at (eval 1) line 2.
+Exiting eval via last at (eval 1) line 1.
########
# pp_ctl.c
use warning 'unsafe' ;
@@ -143,3 +147,11 @@ sub fred
goto &fred()
EXPECT
Deep recursion on subroutine "main::fred" at - line 6.
+########
+# pp_ctl.c
+use warning 'unsafe' ;
+package Foo;
+DESTROY { die "@{$_[0]} foo bar" }
+{ bless ['A'], 'Foo' for 1..10 }
+EXPECT
+ (in cleanup) A foo bar at - line 4.
diff --git a/t/pragma/warn/toke b/t/pragma/warn/toke
index 6cc4a500a4..da6c0dc9ae 100644
--- a/t/pragma/warn/toke
+++ b/t/pragma/warn/toke
@@ -290,9 +290,10 @@ Misplaced _ in number at - line 4.
########
# toke.c
use warning 'unsafe' ;
+#line 25 "bar"
$a = FRED:: ;
EXPECT
-Bareword "FRED::" refers to nonexistent package at - line 3.
+Bareword "FRED::" refers to nonexistent package at bar line 25.
########
# toke.c
use warning 'ambiguous' ;
@@ -303,9 +304,14 @@ Ambiguous call resolved as CORE::time(), qualify as such or use & at - line 4.
########
# toke.c
use warning 'utf8' ;
-$_ = " \x{123} " ;
+eval <<'EOE';
+{
+#line 30 "foo"
+ $_ = " \x{123} " ;
+}
+EOE
EXPECT
-Use of \x{} without utf8 declaration at - line 3.
+Use of \x{} without utf8 declaration at foo line 30.
########
# toke.c
use warning 'utf8' ;
diff --git a/thrdvar.h b/thrdvar.h
index fb45e47f52..51f68ea6d5 100644
--- a/thrdvar.h
+++ b/thrdvar.h
@@ -85,7 +85,7 @@ PERLVAR(Trestartop, OP *) /* propagating an error from croak? */
PERLVARI(Tcurcop, COP * VOL, &PL_compiling)
PERLVAR(Tin_eval, VOL int) /* trap "fatal" errors? */
PERLVAR(Tdelaymagic, int) /* ($<,$>) = ... */
-PERLVAR(Tdirty, bool) /* in the middle of tearing things down? */
+PERLVARI(Tdirty, bool, FALSE) /* in the middle of tearing things down? */
PERLVAR(Tlocalizing, int) /* are we processing a local() list? */
PERLVAR(Tcurstack, AV *) /* THE STACK */
diff --git a/toke.c b/toke.c
index 6755b8aaef..fb54cee87c 100644
--- a/toke.c
+++ b/toke.c
@@ -445,13 +445,20 @@ skipspace(register char *s)
}
for (;;) {
STRLEN prevlen;
- while (s < PL_bufend && isSPACE(*s))
- s++;
+ while (s < PL_bufend && isSPACE(*s)) {
+ if (*s++ == '\n' && PL_in_eval && !PL_rsfp)
+ incline(s);
+ }
if (s < PL_bufend && *s == '#') {
while (s < PL_bufend && *s != '\n')
s++;
- if (s < PL_bufend)
+ if (s < PL_bufend) {
s++;
+ if (PL_in_eval && !PL_rsfp) {
+ incline(s);
+ continue;
+ }
+ }
}
if (s < PL_bufend || !PL_rsfp || PL_lex_state != LEX_NORMAL)
return s;
diff --git a/utf8.h b/utf8.h
index 50892b0ffb..51d0143b63 100644
--- a/utf8.h
+++ b/utf8.h
@@ -8,7 +8,7 @@
*/
#ifdef DOINIT
-EXTCONST unsigned char utf8skip[] = {
+EXTCONST unsigned char PL_utf8skip[] = {
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ascii */
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ascii */
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ascii */
@@ -19,9 +19,9 @@ EXTCONST unsigned char utf8skip[] = {
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,7,8, /* cjk etc. */
};
#else
-EXTCONST unsigned char utf8skip[];
+EXTCONST unsigned char PL_utf8skip[];
#endif
#define IN_UTF8 (PL_curcop->op_private & HINT_UTF8)
-#define UTF8SKIP(s) utf8skip[*(U8*)s]
+#define UTF8SKIP(s) PL_utf8skip[*(U8*)s]
diff --git a/warning.h b/warning.h
index 3220bde608..dde254d942 100644
--- a/warning.h
+++ b/warning.h
@@ -61,36 +61,36 @@
#define WARN_NONE NULL
#define WARN_ALL (&PL_sv_yes)
-#define WARN_REDEFINE 0
-#define WARN_VOID 1
-#define WARN_UNSAFE 2
-#define WARN_TAINT 3
-#define WARN_SUBSTR 4
-#define WARN_CLOSURE 5
-#define WARN_UNTIE 6
-#define WARN_SIGNAL 7
-#define WARN_UTF8 8
-#define WARN_NUMERIC 9
-#define WARN_DEFAULT 10
-#define WARN_ONCE 11
+#define WARN_DEFAULT 0
+#define WARN_IO 1
+#define WARN_CLOSED 2
+#define WARN_EXEC 3
+#define WARN_NEWLINE 4
+#define WARN_PIPE 5
+#define WARN_UNOPENED 6
+#define WARN_MISC 7
+#define WARN_NUMERIC 8
+#define WARN_ONCE 9
+#define WARN_RECURSION 10
+#define WARN_REDEFINE 11
#define WARN_SYNTAX 12
-#define WARN_RESERVED 13
+#define WARN_AMBIGUOUS 13
#define WARN_DEPRECATED 14
-#define WARN_SEMICOLON 15
-#define WARN_PRINTF 16
-#define WARN_OCTAL 17
-#define WARN_AMBIGUOUS 18
-#define WARN_PARENTHESIS 19
-#define WARN_PRECEDENCE 20
-#define WARN_IO 21
-#define WARN_NEWLINE 22
-#define WARN_CLOSED 23
-#define WARN_EXEC 24
-#define WARN_UNOPENED 25
-#define WARN_PIPE 26
-#define WARN_UNINITIALIZED 27
-#define WARN_RECURSION 28
-#define WARN_MISC 29
+#define WARN_OCTAL 15
+#define WARN_PARENTHESIS 16
+#define WARN_PRECEDENCE 17
+#define WARN_PRINTF 18
+#define WARN_RESERVED 19
+#define WARN_SEMICOLON 20
+#define WARN_UNINITIALIZED 21
+#define WARN_UNSAFE 22
+#define WARN_CLOSURE 23
+#define WARN_SIGNAL 24
+#define WARN_SUBSTR 25
+#define WARN_TAINT 26
+#define WARN_UNTIE 27
+#define WARN_UTF8 28
+#define WARN_VOID 29
#define WARNsize 8
#define WARN_ALLstring "\125\125\125\125\125\125\125\125"
diff --git a/warning.pl b/warning.pl
index 59dac2fcdd..86faf9625c 100644
--- a/warning.pl
+++ b/warning.pl
@@ -59,8 +59,8 @@ sub walk
my @list = () ;
my ($k, $v) ;
- while (($k, $v) = each %$tre) {
-
+ foreach $k (sort keys %$tre) {
+ $v = $tre->{$k};
die "duplicate key $k\n" if defined $list{$k} ;
$Value{$index} = uc $k ;
push @{ $list{$k} }, $index ++ ;
@@ -70,7 +70,6 @@ sub walk
}
return @list ;
-
}
###########################################################################
diff --git a/win32/config.bc b/win32/config.bc
index d91fbb977a..c460453782 100644
--- a/win32/config.bc
+++ b/win32/config.bc
@@ -546,7 +546,7 @@ shrpenv=''
shsharp='true'
sig_name='ZERO NUM01 INT QUIT ILL NUM05 NUM06 NUM07 FPE KILL NUM10 SEGV NUM12 PIPE ALRM TERM USR1 USR2 CHLD NUM19 USR3 BREAK ABRT STOP NUM24 CONT CLD'
sig_name_init='"ZERO", "NUM01", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "USR1", "USR2", "CHLD", "NUM19", "USR3", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0'
-sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 18 0'
+sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 18 '
sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 18, 0'
signal_t='void'
sitearch='~INST_TOP~\site~INST_VER~\lib\~archname~'
diff --git a/win32/config.gc b/win32/config.gc
index 745d407f21..703bf041d7 100644
--- a/win32/config.gc
+++ b/win32/config.gc
@@ -546,7 +546,7 @@ shrpenv=''
shsharp='true'
sig_name='ZERO NUM01 INT QUIT ILL NUM05 NUM06 NUM07 FPE KILL NUM10 SEGV NUM12 PIPE ALRM TERM NUM16 NUM17 NUM18 NUM19 CHLD BREAK ABRT STOP NUM24 CONT CLD'
sig_name_init='"ZERO", "NUM01", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "NUM16", "NUM17", "NUM18", "NUM19", "CHLD", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0'
-sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 20 0'
+sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 20 '
sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0'
signal_t='void'
sitearch='~INST_TOP~\site~INST_VER~\lib\~archname~'
diff --git a/win32/config.vc b/win32/config.vc
index 1a99dd99e4..81bd72435e 100644
--- a/win32/config.vc
+++ b/win32/config.vc
@@ -546,7 +546,7 @@ shrpenv=''
shsharp='true'
sig_name='ZERO NUM01 INT QUIT ILL NUM05 NUM06 NUM07 FPE KILL NUM10 SEGV NUM12 PIPE ALRM TERM NUM16 NUM17 NUM18 NUM19 CHLD BREAK ABRT STOP NUM24 CONT CLD'
sig_name_init='"ZERO", "NUM01", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "NUM16", "NUM17", "NUM18", "NUM19", "CHLD", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0'
-sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 20 0'
+sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 20 '
sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0'
signal_t='void'
sitearch='~INST_TOP~\site~INST_VER~\lib\~archname~'