summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2001-12-18 14:43:58 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2001-12-18 14:43:58 +0000
commit7b5d8bbce1bc254559797266031a88531cfece6b (patch)
tree499aba7e439f41ed3c81560919508efb404ade41
parentcddd4526476ba0ae3c81876684c5e7a648cb3265 (diff)
parent8218ea5d24f5de0a37393f19671aa5631c088be7 (diff)
downloadperl-7b5d8bbce1bc254559797266031a88531cfece6b.tar.gz
Integrate mainline
p4raw-id: //depot/perlio@13756
-rw-r--r--Changes419
-rw-r--r--MANIFEST26
-rw-r--r--README.aix27
-rw-r--r--ext/B/B/Deparse.pm4
-rw-r--r--ext/Devel/Peek/Peek.pm4
-rw-r--r--ext/POSIX/POSIX.pm35
-rw-r--r--ext/POSIX/t/posix.t27
-rw-r--r--lib/Benchmark.t3
-rw-r--r--lib/Exporter.pm43
-rw-r--r--lib/Exporter.t24
-rw-r--r--lib/ExtUtils/Installed.pm2
-rw-r--r--lib/ExtUtils/MM_Unix.pm183
-rw-r--r--lib/ExtUtils/t/Command.t (renamed from lib/ExtUtils/Command.t)0
-rw-r--r--lib/ExtUtils/t/Embed.t (renamed from lib/ExtUtils/Embed.t)0
-rw-r--r--lib/ExtUtils/t/ExtUtils.t (renamed from lib/ExtUtils.t)0
-rw-r--r--lib/ExtUtils/t/Installed.t (renamed from lib/ExtUtils/Installed.t)14
-rw-r--r--lib/ExtUtils/t/MM_Cygwin.t (renamed from lib/ExtUtils/MM_Cygwin.t)0
-rw-r--r--lib/ExtUtils/t/MM_Unix.t141
-rw-r--r--lib/ExtUtils/t/MM_VMS.t (renamed from lib/ExtUtils/MM_VMS.t)0
-rw-r--r--lib/ExtUtils/t/Manifest.t (renamed from lib/ExtUtils/Manifest.t)0
-rw-r--r--lib/ExtUtils/t/Mkbootstrap.t (renamed from lib/ExtUtils/Mkbootstrap.t)0
-rw-r--r--lib/ExtUtils/t/Packlist.t (renamed from lib/ExtUtils/Packlist.t)0
-rw-r--r--lib/ExtUtils/t/testlib.t (renamed from lib/ExtUtils/testlib.t)0
-rw-r--r--op.c2
-rw-r--r--patchlevel.h2
-rw-r--r--perl.c9
-rw-r--r--pod/perldiag.pod19
-rw-r--r--pod/perlrun.pod2
-rw-r--r--pod/perlsub.pod24
-rw-r--r--pod/perluniintro.pod81
-rw-r--r--pp.c3
-rw-r--r--pp_sort.c168
-rw-r--r--t/lib/warnings/utf813
-rw-r--r--t/op/alarm.t47
-rwxr-xr-xt/op/glob.t12
-rwxr-xr-xt/op/gv.t12
-rwxr-xr-xt/op/ord.t11
-rw-r--r--t/run/runenv.t11
-rw-r--r--toke.c4
-rw-r--r--utf8.c13
40 files changed, 990 insertions, 395 deletions
diff --git a/Changes b/Changes
index f4c32485d8..2bd9be1d3f 100644
--- a/Changes
+++ b/Changes
@@ -31,6 +31,425 @@ or any other branch.
Version v5.7.2 Development release working toward v5.8
--------------
____________________________________________________________________________
+[ 13745] By: jhi on 2001/12/17 20:12:37
+ Log: New test warrants a MANIFEST entry.
+ Branch: perl
+ ! MANIFEST
+____________________________________________________________________________
+[ 13744] By: jhi on 2001/12/17 19:27:40
+ Log: Subject: Re: [PATCH] ...while $var = glob(...)
+ From: Robin Houston <robin@kitsite.com>
+ Date: Mon, 17 Dec 2001 20:27:30 +0000
+ Message-ID: <20011217202730.A17817@puffinry.freeserve.co.uk>
+
+ Can't portably unlink open files.
+ Branch: perl
+ ! t/op/glob.t
+____________________________________________________________________________
+[ 13743] By: jhi on 2001/12/17 19:26:34
+ Log: perluniintro tweaks as suggested by Jeffrey Friedl.
+ Branch: perl
+ ! pod/perluniintro.pod
+____________________________________________________________________________
+[ 13742] By: jhi on 2001/12/17 19:18:52
+ Log: Move typeglob test from glob.t to gv.t.
+ Branch: perl
+ ! t/op/glob.t t/op/gv.t
+____________________________________________________________________________
+[ 13741] By: jhi on 2001/12/17 19:12:16
+ Log: Subject: Re: [PATCH] ...while $var = glob(...)
+ From: Robin Houston <robin@kitsite.com>
+ Date: Mon, 17 Dec 2001 20:07:02 +0000
+ Message-ID: <20011217200702.A17721@puffinry.freeserve.co.uk>
+ Branch: perl
+ ! t/op/glob.t
+____________________________________________________________________________
+[ 13740] By: jhi on 2001/12/17 19:11:29
+ Log: Demote the surrogate and non-character errors to warnings.
+ Branch: perl
+ ! pod/perldiag.pod t/lib/warnings/utf8 t/op/ord.t utf8.c
+____________________________________________________________________________
+[ 13739] By: jhi on 2001/12/17 18:47:41
+ Log: Subject: [PATCH] more POSIX tests, and more autoloading
+ From: Nicholas Clark <nick@ccl4.org>
+ Date: Mon, 17 Dec 2001 18:27:47 +0000
+ Message-ID: <20011217182747.D21702@plum.flirble.org>
+ Branch: perl
+ ! ext/POSIX/POSIX.pm ext/POSIX/t/posix.t
+____________________________________________________________________________
+[ 13738] By: jhi on 2001/12/17 18:43:55
+ Log: Subject: [PATCH] ...while $var = glob(...)
+ From: Robin Houston <robin@kitsite.com>
+ Date: Mon, 17 Dec 2001 15:51:54 +0000
+ Message-ID: <20011217155153.A311@robin.kitsite.com>
+ Branch: perl
+ ! op.c
+____________________________________________________________________________
+[ 13737] By: jhi on 2001/12/17 18:38:33
+ Log: Subject: [PATCH] -t and the core tests; -t and PERL5OPT
+ From: Rafael Garcia-Suarez <rgarciasuarez@free.fr>
+ Date: Mon, 17 Dec 2001 15:23:01 +0100
+ Message-ID: <20011217152301.A704@rafael>
+ Branch: perl
+ ! perl.c pod/perldiag.pod pod/perlrun.pod t/run/runenv.t
+____________________________________________________________________________
+[ 13736] By: jhi on 2001/12/17 18:36:20
+ Log: The system() vs $SIG{ARLM} is no more a todo.
+ Branch: perl
+ ! t/op/alarm.t
+____________________________________________________________________________
+[ 13735] By: jhi on 2001/12/17 18:34:43
+ Log: Subject: [PATCH t/op/alarm.t MANIFEST] alarm() test, take two
+ From: Michael G Schwern <schwern@pobox.com>
+ Date: Sun, 16 Dec 2001 23:59:01 -0500
+ Message-ID: <20011217045901.GL17232@blackrider>
+ Branch: perl
+ + t/op/alarm.t
+ ! MANIFEST
+____________________________________________________________________________
+[ 13734] By: jhi on 2001/12/17 17:54:19
+ Log: s/UNIX/Unix/
+ Branch: perl
+ ! MANIFEST
+____________________________________________________________________________
+[ 13733] By: jhi on 2001/12/17 17:50:22
+ Log: Move ExtUtils tests to lib/ExtUtils/t.
+ Branch: perl
+ + lib/ExtUtils/t/Command.t lib/ExtUtils/t/Embed.t
+ + lib/ExtUtils/t/ExtUtils.t lib/ExtUtils/t/Installed.t
+ + lib/ExtUtils/t/MM_Cygwin.t lib/ExtUtils/t/MM_Unix.t
+ + lib/ExtUtils/t/MM_VMS.t lib/ExtUtils/t/Manifest.t
+ + lib/ExtUtils/t/Mkbootstrap.t lib/ExtUtils/t/Packlist.t
+ + lib/ExtUtils/t/testlib.t
+ - lib/ExtUtils.t lib/ExtUtils/Command.t lib/ExtUtils/Embed.t
+ - lib/ExtUtils/Installed.t lib/ExtUtils/MM_Cygwin.t
+ - lib/ExtUtils/MM_Unix.t lib/ExtUtils/MM_VMS.t
+ - lib/ExtUtils/Manifest.t lib/ExtUtils/Mkbootstrap.t
+ - lib/ExtUtils/Packlist.t lib/ExtUtils/testlib.t
+ ! MANIFEST
+____________________________________________________________________________
+[ 13732] By: jhi on 2001/12/17 17:45:33
+ Log: Subject: [PATCH] MM_Unix tests, and some questions
+ From: Tels <perl_dummy@bloodgate.com>
+ Date: Sun, 16 Dec 2001 22:29:13 +0100 (CET)
+ Message-Id: <200112162132.XAA12694@tiku.hut.fi>
+
+ Subject: Re: [PATCH] MM_Unix tests, and some questions
+ From: Tels <perl_dummy@bloodgate.com>
+ Date: Mon, 17 Dec 2001 00:29:11 +0100 (CET)
+ Message-Id: <200112162332.BAA25411@tiku.hut.fi>
+ Branch: perl
+ + lib/ExtUtils/MM_Unix.t
+ ! MANIFEST lib/ExtUtils/MM_Unix.pm
+____________________________________________________________________________
+[ 13731] By: jhi on 2001/12/17 17:31:35
+ Log: Subject: [PATCH lib/ExtUtils/MM_Unix.pm] miniperl found before perl
+ From: Michael G Schwern <schwern@pobox.com>
+ Date: Sun, 16 Dec 2001 17:53:55 -0500
+ Message-ID: <20011216225354.GE8900@blackrider>
+ Branch: perl
+ ! lib/ExtUtils/MM_Unix.pm
+____________________________________________________________________________
+[ 13730] By: jhi on 2001/12/17 17:26:44
+ Log: Subject: [PATCH ext/B/B/Deparse.pm] Re: [ID 20011216.005] B::Deparse turns legal code into illegal ones.
+ From: Michael G Schwern <schwern@pobox.com>
+ Date: Sun, 16 Dec 2001 16:12:55 -0500
+ Message-ID: <20011216211255.GV8900@blackrider>
+ Branch: perl
+ ! ext/B/B/Deparse.pm
+____________________________________________________________________________
+[ 13729] By: jhi on 2001/12/17 17:25:09
+ Log: Subject: [PATCH] Exporter.pm
+ From: Nicholas Clark <nick@ccl4.org>
+ Date: Sun, 16 Dec 2001 19:24:25 +0000
+ Message-ID: <20011216192425.R21702@plum.flirble.org>
+ Branch: perl
+ ! lib/Exporter.pm
+____________________________________________________________________________
+[ 13728] By: jhi on 2001/12/17 17:20:51
+ Log: Subject: [PATCH] Exporter.t (and question)
+ From: Nicholas Clark <nick@ccl4.org>
+ Date: Sun, 16 Dec 2001 17:24:55 +0000
+ Message-ID: <20011216172455.P21702@plum.flirble.org>
+ Branch: perl
+ ! lib/Exporter.t
+____________________________________________________________________________
+[ 13727] By: jhi on 2001/12/17 17:18:21
+ Log: Subject: Re: perl@13661
+ From: "John P. Linderman" <jpl@research.att.com>
+ Date: Mon, 17 Dec 2001 07:11:27 -0500 (EST)
+ Message-Id: <200112171211.HAA71597@raptor.research.att.com>
+ Branch: perl
+ ! pp_sort.c
+____________________________________________________________________________
+[ 13726] By: jhi on 2001/12/17 16:57:57
+ Log: Subject: Will the real Unicode encoding please stand up?
+ From: Jeffrey Friedl <jfriedl@yahoo.com>
+ Date: Sun, 16 Dec 2001 11:36:32 -0800 (PST)
+ Message-Id: <200112161936.fBGJaWe41263@ventrue.corp.yahoo.com>
+ Branch: perl
+ ! pod/perluniintro.pod
+____________________________________________________________________________
+[ 13725] By: jhi on 2001/12/17 16:43:09
+ Log: Integrate perlio; interruptable system().
+ Branch: perl
+ !> util.c
+____________________________________________________________________________
+[ 13722] By: jhi on 2001/12/16 16:12:57
+ Log: Disallow also Unicode ranges 0xFDD0..0xFDEF and
+ 0xFFFE..0xFFFF. Ranges 0x...FFFE..0x...FFFF in general,
+ and characters beyond 0x10FFF should be disallowed, too,
+ but some tests would need changing, but more importantly some
+ APIs would need remodeling since one can easily generate such
+ characters either by bitwise complements, tr complements, or
+ v-strings.
+ Branch: perl
+ ! pod/perldiag.pod utf8.c
+____________________________________________________________________________
+[ 13721] By: jhi on 2001/12/16 15:34:52
+ Log: Make surrogates illegal also on EBCDIC.
+ Branch: perl
+ ! utf8.c
+____________________________________________________________________________
+[ 13720] By: jhi on 2001/12/16 14:49:18
+ Log: Subject: [patch @13687] Unicode::Collate 0.10
+ From: SADAHIRO Tomoyuki <bqw10602@nifty.com>
+ Date: Sun, 16 Dec 2001 21:22:12 +0900
+ Message-Id: <20011216211615.8ED5.BQW10602@nifty.com>
+ Branch: perl
+ ! lib/Unicode/Collate.pm lib/Unicode/Collate/Changes
+ ! lib/Unicode/Collate/README lib/Unicode/Collate/t/test.t
+____________________________________________________________________________
+[ 13719] By: jhi on 2001/12/16 14:39:34
+ Log: More documentation for the encoding pragma.
+ Branch: perl
+ ! lib/encoding.pm
+____________________________________________________________________________
+[ 13718] By: jhi on 2001/12/16 14:34:02
+ Log: Subject: [PATCH] lib/open.pm
+ From: Jeffrey Friedl <jfriedl@yahoo.com>
+ Date: Sat, 15 Dec 2001 23:07:42 -0800 (PST)
+ Message-Id: <200112160707.fBG77g896350@ventrue.corp.yahoo.com>
+ Branch: perl
+ ! lib/open.pm
+____________________________________________________________________________
+[ 13717] By: jhi on 2001/12/16 14:18:49
+ Log: Subject: [PATCH MANIFEST, lib/ExtUtils/Installed.t] Add tests for ExtUtils::Installed
+ From: chromatic <chromatic@rmci.net>
+ Date: Sat, 15 Dec 2001 23:24:40 -0700
+ Message-ID: <20011216062507.71492.qmail@onion.perl.org>
+ Branch: perl
+ + lib/ExtUtils/Installed.t
+ ! MANIFEST
+____________________________________________________________________________
+[ 13716] By: jhi on 2001/12/16 14:17:10
+ Log: Subject: [PATCH lib/diagnostics.pm] Little warning nit
+ From: Michael G Schwern <schwern@pobox.com>
+ Date: Sun, 16 Dec 2001 01:14:00 -0500
+ Message-ID: <20011216061400.GC8900@blackrider>
+ Branch: perl
+ ! lib/diagnostics.pm
+____________________________________________________________________________
+[ 13715] By: jhi on 2001/12/16 14:16:17
+ Log: Subject: [PATCH] Re: [PATCH t/test.pl] diagnostics to STDERR
+ From: Michael G Schwern <schwern@pobox.com>
+ Date: Sun, 16 Dec 2001 01:12:42 -0500
+ Message-ID: <20011216061242.GB8900@blackrider>
+ Branch: perl
+ ! t/test.pl
+____________________________________________________________________________
+[ 13714] By: jhi on 2001/12/16 04:21:53
+ Log: I sometimes outsmart myself.
+ Branch: perl
+ ! lib/ExtUtils/MM_Cygwin.t lib/ExtUtils/MM_VMS.t
+____________________________________________________________________________
+[ 13713] By: jhi on 2001/12/16 03:24:34
+ Log: Subject: [PATCH lib/AutoSplit.pm] Fwd: [russell-belfast-pm@futureless.org: Re: This is the __END__]
+ From: Michael G Schwern <schwern@pobox.com>
+ Date: Sat, 15 Dec 2001 15:08:29 -0500
+ Message-ID: <20011215200829.GK1548@blackrider>
+ Branch: perl
+ ! lib/AutoSplit.pm
+____________________________________________________________________________
+[ 13712] By: jhi on 2001/12/16 03:22:39
+ Log: perlunicode enchancements suggested by Jeffrey Friedl.
+ Branch: perl
+ ! pod/perlunicode.pod
+____________________________________________________________________________
+[ 13711] By: jhi on 2001/12/16 03:00:44
+ Log: Subject: [PATCH] perlunicode.pod
+ From: Jeffrey Friedl <jfriedl@yahoo.com>
+ Date: Sat, 15 Dec 2001 19:17:09 -0800 (PST)
+ Message-Id: <200112160317.fBG3H9M82618@ventrue.corp.yahoo.com>
+ Branch: perl
+ ! pod/perlunicode.pod
+____________________________________________________________________________
+[ 13710] By: jhi on 2001/12/16 02:57:09
+ Log: Subject: RESENT - [PATCH] utf8_heavy.pl
+ From: Jeffrey Friedl <jfriedl@yahoo.com>
+ Date: Sat, 15 Dec 2001 19:55:01 -0800 (PST)
+ Message-Id: <200112160355.fBG3t1t84835@ventrue.corp.yahoo.com>
+ Branch: perl
+ ! lib/utf8_heavy.pl
+____________________________________________________________________________
+[ 13709] By: jhi on 2001/12/16 02:47:36
+ Log: Can't create surrogates; so can't match them, either.
+ Branch: perl
+ ! pod/perlunicode.pod
+____________________________________________________________________________
+[ 13708] By: jhi on 2001/12/16 02:46:07
+ Log: Subject: [PATCH t/test.pl] diagnostics to STDERR
+ From: Michael G Schwern <schwern@pobox.com>
+ Date: Sat, 15 Dec 2001 21:20:35 -0500
+ Message-ID: <20011216022035.GE5672@blackrider>
+ Branch: perl
+ ! t/test.pl
+____________________________________________________________________________
+[ 13707] By: jhi on 2001/12/16 02:45:06
+ Log: Make creating UTF-8 surrogates a punishable act.
+ Branch: perl
+ ! pod/perldiag.pod pod/perlunicode.pod t/op/ord.t utf8.c
+____________________________________________________________________________
+[ 13706] By: jhi on 2001/12/15 23:00:56
+ Log: Support \p{All}, \p{IsAssigned}, \p{IsUnassigned}.
+ Branch: perl
+ + lib/unicore/In/172.pl lib/unicore/In/173.pl
+ ! MANIFEST lib/unicore/In.pl lib/unicore/In/164.pl
+ ! lib/unicore/In/165.pl lib/unicore/In/166.pl
+ ! lib/unicore/In/167.pl lib/unicore/In/168.pl
+ ! lib/unicore/In/169.pl lib/unicore/In/170.pl
+ ! lib/unicore/In/171.pl lib/unicore/mktables lib/utf8_heavy.pl
+____________________________________________________________________________
+[ 13705] By: jhi on 2001/12/15 22:17:10
+ Log: Subject: [PATCH B::Deparse] rcatline support ($_.=<ARGV>)
+ From: Rafael Garcia-Suarez <rgarciasuarez@free.fr>
+ Date: Sat, 15 Dec 2001 23:21:43 +0100
+ Message-ID: <20011215232143.A11790@rafael>
+ Branch: perl
+ ! ext/B/B/Deparse.pm ext/B/t/deparse.t
+____________________________________________________________________________
+[ 13704] By: jhi on 2001/12/15 22:09:20
+ Log: Make charnames more robust.
+ Branch: perl
+ ! lib/charnames.pm
+____________________________________________________________________________
+[ 13703] By: jhi on 2001/12/15 17:30:55
+ Log: The hoops one has to jump through.
+ Branch: perl
+ ! ext/I18N/Langinfo/Langinfo.pm
+____________________________________________________________________________
+[ 13702] By: jhi on 2001/12/15 17:18:49
+ Log: Subject: [PATCH] perlstyle.pod nit on warnings
+ From: Autrijus Tang <autrijus@egb.elixus.org>
+ Date: Sat, 15 Dec 2001 04:24:34 -0800
+ Message-ID: <20011215122434.GA1682@egb.elixus.org>
+ Branch: perl
+ ! pod/perlstyle.pod
+____________________________________________________________________________
+[ 13701] By: jhi on 2001/12/15 17:17:47
+ Log: I don't think we are in FooOS, Toto.
+ Branch: perl
+ ! lib/ExtUtils/MM_Cygwin.t lib/ExtUtils/MM_VMS.t
+____________________________________________________________________________
+[ 13700] By: jhi on 2001/12/15 17:15:50
+ Log: Subject: Re: Untested modules update: There's more than we thought
+ From: chromatic <chromatic@rmci.net>
+ Date: Fri, 14 Dec 2001 17:20:24 -0700
+ Message-ID: <20011215002049.37259.qmail@onion.perl.org>
+ Branch: perl
+ + lib/ExtUtils/MM_Cygwin.t
+ ! MANIFEST
+____________________________________________________________________________
+[ 13699] By: jhi on 2001/12/15 17:14:26
+ Log: Subject: [PATCH t/TEST] -bytecompile & -compile for testing perlcc
+ From: Michael G Schwern <schwern@pobox.com>
+ Date: Fri, 14 Dec 2001 20:59:42 -0500
+ Message-ID: <20011215015942.GF28596@blackrider>
+ Branch: perl
+ ! t/TEST
+____________________________________________________________________________
+[ 13698] By: jhi on 2001/12/15 17:13:35
+ Log: Subject: [PATCH MANIFEST ext/B/t/bblock.t] Compile test
+ From: Michael G Schwern <schwern@pobox.com>
+ Date: Fri, 14 Dec 2001 20:03:46 -0500
+ Message-ID: <20011215010346.GD28596@blackrider>
+ Branch: perl
+ + ext/B/t/bblock.t
+ ! MANIFEST
+____________________________________________________________________________
+[ 13697] By: jhi on 2001/12/15 17:12:32
+ Log: Subject: [PATCH ext/B/B/Bblock.pm] Some weak docs
+ From: Michael G Schwern <schwern@pobox.com>
+ Date: Fri, 14 Dec 2001 19:59:13 -0500
+ Message-ID: <20011215005913.GC28596@blackrider>
+ Branch: perl
+ ! ext/B/B/Bblock.pm
+____________________________________________________________________________
+[ 13696] By: jhi on 2001/12/15 17:11:32
+ Log: Subject: [PATCH MANIFEST ext/B/t/asmdata.t] B::Asmdata test
+ From: Michael G Schwern <schwern@pobox.com>
+ Date: Fri, 14 Dec 2001 19:36:12 -0500
+ Message-ID: <20011215003611.GA28596@blackrider>
+ Branch: perl
+ + ext/B/t/asmdata.t
+ ! MANIFEST
+____________________________________________________________________________
+[ 13695] By: jhi on 2001/12/15 17:10:05
+ Log: Subject: [PATCH bytecode.pl] Adding B::Asmdata docs
+ From: Michael G Schwern <schwern@pobox.com>
+ Date: Fri, 14 Dec 2001 19:14:14 -0500
+ Message-ID: <20011215001414.GA25077@blackrider>
+ Branch: perl
+ ! bytecode.pl ext/B/B/Asmdata.pm
+____________________________________________________________________________
+[ 13694] By: jhi on 2001/12/15 17:00:44
+ Log: Permissions.
+ Branch: perl
+ ! ext/Devel/PPPort/PPPort.xs ext/Devel/PPPort/module2.c
+ ! ext/Devel/PPPort/module3.c
+____________________________________________________________________________
+[ 13693] By: jhi on 2001/12/14 23:48:59
+ Log: Benchmark test from Nicholas Clark.
+ Branch: perl
+ + lib/Benchmark.t
+ ! MANIFEST lib/Benchmark.pm
+____________________________________________________________________________
+[ 13692] By: jhi on 2001/12/14 23:33:28
+ Log: Mithing.
+ Branch: perl
+ + lib/Attribute/Handlers/demo/demo2.pl
+ + lib/Attribute/Handlers/demo/demo3.pl
+ + lib/Attribute/Handlers/demo/demo4.pl
+____________________________________________________________________________
+[ 13691] By: jhi on 2001/12/14 21:26:08
+ Log: Silence compiler worries found by Schwern/Digital cc.
+ Branch: perl
+ ! perlio.c sv.c x2p/str.c
+____________________________________________________________________________
+[ 13690] By: jhi on 2001/12/14 20:26:51
+ Log: User may not have a valid home directory even if
+ getpwuid() succedds.
+ Branch: perl
+ ! ext/File/Glob/t/basic.t
+____________________________________________________________________________
+[ 13689] By: jhi on 2001/12/14 18:14:52
+ Log: Integrate with perlio. (No changes, but that's okay.)
+ Branch: perl
+ !> doio.c lib/Exporter.pm perlio.c perliol.h pod/perlmodlib.pod
+____________________________________________________________________________
+[ 13688] By: jhi on 2001/12/14 18:06:18
+ Log: Add a Configure hints file for VOS: the POSIX support
+ of VOS is getting close to the point where it can run
+ Configure (some Configure tweaks will be required).
+ Branch: perl
+ + hints/vos.sh
+ ! MANIFEST
+____________________________________________________________________________
+[ 13687] By: jhi on 2001/12/14 16:15:17
+ Log: Update Changes.
+ Branch: perl
+ ! Changes patchlevel.h
+____________________________________________________________________________
[ 13686] By: jhi on 2001/12/14 16:07:02
Log: Reintroduce Attribute::Handlers with Spider's fixes.
Branch: perl
diff --git a/MANIFEST b/MANIFEST
index a8ed7fbbec..8e8318b05a 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -3,8 +3,8 @@ Artistic The "Artistic License"
AUTHORS Contact info for contributors
av.c Array value code
av.h Array value header
-beos/beosish.h BeOS port
beos/beos.c BeOS port
+beos/beosish.h BeOS port
beos/nm.c BeOS port
bytecode.pl Produces ext/ByteLoader/byterun.h, ext/ByteLoader/byterun.c and ext/B/Asmdata.pm
cc_runtime.h Macros need by runtime of compiler-generated code
@@ -737,8 +737,8 @@ hints/unisysdynix.sh Hints for named architecture
hints/utekv.sh Hints for named architecture
hints/uts.sh Hints for named architecture
hints/uwin.sh Hints for named architecture
-hints/vos.sh Hints for named architecture
hints/vmesa.sh Hints for named architecture
+hints/vos.sh Hints for named architecture
hv.c Hash value code
hv.h Hash value header
INSTALL Detailed installation instructions
@@ -921,36 +921,37 @@ lib/exceptions.pl catch and throw routines
lib/Exporter.pm Exporter base class
lib/Exporter.t See if Exporter works
lib/Exporter/Heavy.pm Complicated routines for Exporter
-lib/ExtUtils.t See if extutils work
lib/ExtUtils/Command.pm Utilities for Make on non-UNIX platforms
-lib/ExtUtils/Command.t See if ExtUtils::Command works (Win32 only)
lib/ExtUtils/Constant.pm generate XS code to import C header constants
lib/ExtUtils/Embed.pm Utilities for embedding Perl in C programs
-lib/ExtUtils/Embed.t See if ExtUtils::Embed and embedding works
lib/ExtUtils/inst Give information about installed extensions
lib/ExtUtils/Install.pm Handles 'make install' on extensions
lib/ExtUtils/Installed.pm Information on installed extensions
-lib/ExtUtils/Installed.t See if ExtUtils::Installed works
lib/ExtUtils/Liblist.pm Locates libraries
lib/ExtUtils/MakeMaker.pm Write Makefiles for extensions
lib/ExtUtils/Manifest.pm Utilities to write MANIFEST files
lib/ExtUtils/MANIFEST.SKIP The default MANIFEST.SKIP
-lib/ExtUtils/Manifest.t See if ExtUtils::Manifest works
lib/ExtUtils/Mkbootstrap.pm Writes a bootstrap file (see MakeMaker)
-lib/ExtUtils/Mkbootstrap.t See if ExtUtils::Mkbootstrap works
lib/ExtUtils/Mksymlists.pm Writes a linker options file for extensions
lib/ExtUtils/MM_Cygwin.pm MakeMaker methods for Cygwin
-lib/ExtUtils/MM_Cygwin.t See if ExtUtils::MM_Cygwin works
lib/ExtUtils/MM_NW5.pm MakeMaker methods for NetWare
lib/ExtUtils/MM_OS2.pm MakeMaker methods for OS/2
lib/ExtUtils/MM_Unix.pm MakeMaker base class for Unix
lib/ExtUtils/MM_VMS.pm MakeMaker methods for VMS
-lib/ExtUtils/MM_VMS.t See if ExtUtils::MM_VMS works
lib/ExtUtils/MM_Win32.pm MakeMaker methods for Win32
lib/ExtUtils/Packlist.pm Manipulates .packlist files
-lib/ExtUtils/Packlist.t See if Packlist works
+lib/ExtUtils/t/Command.t See if ExtUtils::Command works (Win32 only)
+lib/ExtUtils/t/Embed.t See if ExtUtils::Embed and embedding works
+lib/ExtUtils/t/ExtUtils.t See if extutils work
+lib/ExtUtils/t/Installed.t See if ExtUtils::Installed works
+lib/ExtUtils/t/Manifest.t See if ExtUtils::Manifest works
+lib/ExtUtils/t/Mkbootstrap.t See if ExtUtils::Mkbootstrap works
+lib/ExtUtils/t/MM_Cygwin.t See if ExtUtils::MM_Cygwin works
+lib/ExtUtils/t/MM_Unix.t See if ExtUtils::MM_UNIX works
+lib/ExtUtils/t/MM_VMS.t See if ExtUtils::MM_VMS works
+lib/ExtUtils/t/Packlist.t See if Packlist works
+lib/ExtUtils/t/testlib.t Fixes up @INC to use just-built extension
lib/ExtUtils/testlib.pm Fixes up @INC to use just-built extension
-lib/ExtUtils/testlib.t Fixes up @INC to use just-built extension
lib/ExtUtils/typemap Extension interface types
lib/ExtUtils/xsubpp External subroutine preprocessor
lib/fastcwd.pl a faster but more dangerous getcwd
@@ -2175,6 +2176,7 @@ t/lib/warnings/universal Tests for universal.c for warnings.t
t/lib/warnings/utf8 Tests for utf8.c for warnings.t
t/lib/warnings/util Tests for util.c for warnings.t
t/op/64bitint.t See if 64 bit integers work
+t/op/alarm.t See if alarm works
t/op/anonsub.t See if anonymous subroutines work
t/op/append.t See if . works
t/op/args.t See if operations on @_ work
diff --git a/README.aix b/README.aix
index b58b668e15..a4134a0b81 100644
--- a/README.aix
+++ b/README.aix
@@ -57,17 +57,22 @@ show the base, but is not always complete:
=head2 Building Dynamic Extensions on AIX
-AIX supports dynamically loadable libraries (shared libraries).
-Shared libraries end with the suffix .a, which is a bit misleading,
-because *all* libraries are shared ;-).
-
-Note that starting from Perl 5.7.2 (and consequently 5.8.0) and AIX
-4.3 or newer Perl uses the AIX native dynamic loading interface
-instead of the emulated interface that was used in Perl releases 5.6.1
-and earlier or, for AIX releases 4.2 and earlier. This change will
-probably break backward compatibility with compiled modules.
-The change was made to make Perl more compliant with other applications
-like modperl which are using the AIX native interface.
+AIX supports dynamically loadable objects as well as shared libraries.
+Shared libraries by convention end with the suffix .a, which is a bit
+misleading, as an archive can contain static as well as dynamic members.
+For perl dynamically loaded objects we use the .so suffix also used on
+many other platforms.
+
+Note that starting from Perl 5.7.2 (and consequently 5.8.0) and AIX 4.3
+or newer Perl uses the AIX native dynamic loading interface in the so
+called runtime linking mode instead of the emulated interface that was
+used in Perl releases 5.6.1 and earlier or, for AIX releases 4.2 and
+earlier. This change does break backward compatibility with compiled
+modules from earlier perl releases. The change was made to make Perl
+more compliant with other applications like Apache/modperl which are
+using the AIX native interface. This change also enables the use of C++
+code with static constructors and destructors in perl extensions, which
+was not possible using the emulated interface.
=head2 The IBM ANSI C Compiler
diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm
index 7f7bf9b13e..fd8819167c 100644
--- a/ext/B/B/Deparse.pm
+++ b/ext/B/B/Deparse.pm
@@ -1145,8 +1145,8 @@ Carp::confess() if $gv->isa("B::CV");
} else {
$stash = $stash . "::";
}
- if ($name =~ /^\^../) {
- $name = "{$name}"; # ${^WARNING_BITS} etc
+ if ($name =~ /^(\^..|{)/) {
+ $name = "{$name}"; # ${^WARNING_BITS}, etc and ${
}
return $stash . $name;
}
diff --git a/ext/Devel/Peek/Peek.pm b/ext/Devel/Peek/Peek.pm
index b2b0fc7122..ecc44b7ca0 100644
--- a/ext/Devel/Peek/Peek.pm
+++ b/ext/Devel/Peek/Peek.pm
@@ -111,7 +111,7 @@ When perl is compiled with support for memory footprint debugging
Use mstat() function to emit a memory state statistic to the terminal.
For more information on the format of output of mstat() see
-L<perldebug/Using C<$ENV{PERL_DEBUG_MSTATS}>>.
+L<perldebguts/Using C<$ENV{PERL_DEBUG_MSTATS}>>.
Three additional functions allow access to this statistic from Perl.
First, use C<mstats_fillhash(%hash)> to get the information contained
@@ -124,7 +124,7 @@ Two additional fields C<free>, C<used> contain array references which
provide per-bucket count of free and used chunks. Two other fields
C<mem_size>, C<available_size> contain array references which provide
the information about the allocated size and usable size of chunks in
-each bucket. Again, see L<perldebug/Using C<$ENV{PERL_DEBUG_MSTATS}>>
+each bucket. Again, see L<perldebguts/Using C<$ENV{PERL_DEBUG_MSTATS}>>
for details.
Keep in mind that only the first several "odd-numbered" buckets are
diff --git a/ext/POSIX/POSIX.pm b/ext/POSIX/POSIX.pm
index 93366709ac..92a3182ad5 100644
--- a/ext/POSIX/POSIX.pm
+++ b/ext/POSIX/POSIX.pm
@@ -6,7 +6,7 @@ use AutoLoader;
use XSLoader ();
-our $VERSION = "1.04" ;
+our $VERSION = "1.05" ;
# Grandfather old foo_h form to new :foo_h form
my $loaded;
@@ -49,6 +49,13 @@ sub AUTOLOAD {
goto &$AUTOLOAD;
}
+sub POSIX::SigAction::new {
+ bless {HANDLER => $_[1], MASK => $_[2], FLAGS => $_[3] || 0}, $_[0];
+}
+
+1;
+__END__
+
sub usage {
my ($mess) = @_;
croak "Usage: POSIX::$mess";
@@ -65,18 +72,6 @@ sub unimpl {
croak "Unimplemented: POSIX::$mess";
}
-############################
-package POSIX::SigAction;
-
-sub new {
- bless {HANDLER => $_[1], MASK => $_[2], FLAGS => $_[3] || 0}, $_[0];
-}
-
-############################
-package POSIX; # return to package POSIX so AutoSplit is happy
-1;
-__END__
-
sub assert {
usage "assert(expr)" if @_ != 1;
if (!$_[0]) {
@@ -744,7 +739,7 @@ sub load_imports {
ctype_h => [qw(isalnum isalpha iscntrl isdigit isgraph islower
isprint ispunct isspace isupper isxdigit tolower toupper)],
- dirent_h => [qw()],
+ dirent_h => [],
errno_h => [qw(E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT
EAGAIN EALREADY EBADF EBUSY ECHILD ECONNABORTED
@@ -781,7 +776,7 @@ sub load_imports {
LDBL_MAX LDBL_MAX_10_EXP LDBL_MAX_EXP
LDBL_MIN LDBL_MIN_10_EXP LDBL_MIN_EXP)],
- grp_h => [qw()],
+ grp_h => [],
limits_h => [qw( ARG_MAX CHAR_BIT CHAR_MAX CHAR_MIN CHILD_MAX
INT_MAX INT_MIN LINK_MAX LONG_MAX LONG_MIN MAX_CANON
@@ -801,7 +796,7 @@ sub load_imports {
math_h => [qw(HUGE_VAL acos asin atan ceil cosh fabs floor fmod
frexp ldexp log10 modf pow sinh tan tanh)],
- pwd_h => [qw()],
+ pwd_h => [],
setjmp_h => [qw(longjmp setjmp siglongjmp sigsetjmp)],
@@ -813,7 +808,7 @@ sub load_imports {
SIG_IGN SIG_SETMASK SIG_UNBLOCK raise sigaction signal
sigpending sigprocmask sigsuspend)],
- stdarg_h => [qw()],
+ stdarg_h => [],
stddef_h => [qw(NULL offsetof)],
@@ -842,9 +837,9 @@ sub load_imports {
S_ISUID S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR
fstat mkfifo)],
- sys_times_h => [qw()],
+ sys_times_h => [],
- sys_types_h => [qw()],
+ sys_types_h => [],
sys_utsname_h => [qw(uname)],
@@ -882,7 +877,7 @@ sub load_imports {
getpid getuid isatty lseek pathconf pause setgid setpgid
setsid setuid sysconf tcgetpgrp tcsetpgrp ttyname)],
- utime_h => [qw()],
+ utime_h => [],
);
diff --git a/ext/POSIX/t/posix.t b/ext/POSIX/t/posix.t
index 81c97e5961..49357a6641 100644
--- a/ext/POSIX/t/posix.t
+++ b/ext/POSIX/t/posix.t
@@ -11,7 +11,7 @@ BEGIN {
}
require "./test.pl";
-plan(tests => 31);
+plan(tests => 38);
use POSIX qw(fcntl_h signal_h limits_h _exit getcwd open read strftime write
@@ -185,6 +185,31 @@ try_strftime("Fri Mar 31 00:00:00 2000 091", 0,0,0, 31,2,100);
}
}
+SKIP: {
+ skip("no kill() support on Mac OS", 1) if $Is_MacOS;
+ is (eval "kill 0", 0, "check we have CORE::kill")
+ or print "\$\@ is " . _qq($@) . "\n";
+}
+
+# Check that we can import the POSIX kill routine
+POSIX->import ('kill');
+my $result = eval "kill 0";
+is ($result, undef, "we should now have POSIX::kill");
+# Check usage.
+like ($@, qr/^Usage: POSIX::kill\(pid, sig\)/, "check its usage message");
+
+# Check unimplemented.
+$result = eval {POSIX::offsetof};
+is ($result, undef, "offsetof should fail");
+like ($@, qr/^Unimplemented: POSIX::offsetof\(\) is C-specific/,
+ "check its unimplemented message");
+
+# Check reimplemented.
+$result = eval {POSIX::fgets};
+is ($result, undef, "fgets should fail");
+like ($@, qr/^Use method IO::Handle::gets\(\) instead/,
+ "check its redef message");
+
$| = 0;
# The following line assumes buffered output, which may be not true:
print '@#!*$@(!@#$' unless ($Is_MacOS || $Is_OS2 || $Is_UWin || $Is_OS390 ||
diff --git a/lib/Benchmark.t b/lib/Benchmark.t
index 2b5e1b4fb3..22a91bc3f8 100644
--- a/lib/Benchmark.t
+++ b/lib/Benchmark.t
@@ -281,7 +281,8 @@ sub check_graph_consistency {
pass ("slow rate is less than fast rate");
ok ($slowfast < 0 && $slowfast > -100,
"slowfast should be less than zero, and > -100");
- ok ($fastslow > 100, "fastslow should be > 100");
+ ok ($fastslow > 100, "fastslow should be > 100") ||
+ print STDERR "# fastslow $fastslow\n";
} else {
is ($slowrate, $fastrate,
"slow rate isn't less than fast rate, so should be the same");
diff --git a/lib/Exporter.pm b/lib/Exporter.pm
index 6459312d75..bd55160f87 100644
--- a/lib/Exporter.pm
+++ b/lib/Exporter.pm
@@ -1,6 +1,6 @@
package Exporter;
-require 5.001;
+require 5.006;
use strict;
no strict 'refs';
@@ -8,7 +8,7 @@ no strict 'refs';
our $Debug = 0;
our $ExportLevel = 0;
our $Verbose ||= 0;
-our $VERSION = '5.564';
+our $VERSION = '5.565';
$Carp::Internal{Exporter} = 1;
sub export_to_level {
@@ -35,33 +35,34 @@ sub import {
my $pkg = shift;
my $callpkg = caller($ExportLevel);
- my($exports, $export_cache) = (\@{"$pkg\::EXPORT"},
- \%{"$pkg\::EXPORT"});
# We *need* to treat @{"$pkg\::EXPORT_FAIL"} since Carp uses it :-(
- my($fail) = \@{"$pkg\::EXPORT_FAIL"};
+ my($exports, $export_cache, $fail)
+ = (\@{"$pkg\::EXPORT"}, \%{"$pkg\::EXPORT"}, \@{"$pkg\::EXPORT_FAIL"});
return export $pkg, $callpkg, @_
if $Verbose or $Debug or @$fail > 1;
my $args = @_ or @_ = @$exports;
-
+
+ local $_;
if ($args and not %$export_cache) {
- foreach my $sym (@$exports, @{"$pkg\::EXPORT_OK"}) {
- $sym =~ s/^&//;
- $export_cache->{$sym} = 1;
- }
+ s/^&//, $export_cache->{$_} = 1
+ foreach (@$exports, @{"$pkg\::EXPORT_OK"});
}
- if ($Verbose or $Debug
- or grep {/\W/ or $args and not exists $export_cache->{$_}
- or @$fail and $_ eq $fail->[0]
- or (@{"$pkg\::EXPORT_OK"}
- and $_ eq ${"$pkg\::EXPORT_OK"}[0])} @_) {
- return export $pkg, $callpkg, ($args ? @_ : ());
+ my $heavy;
+ # Try very hard not to use {} and hence have to enter scope on the foreach
+ # We bomb out of the loop with last as soon as heavy is set.
+ if ($args or $fail) {
+ ($heavy = (/\W/ or $args and not exists $export_cache->{$_}
+ or @$fail and $_ eq $fail->[0])) and last
+ foreach (@_);
+ } else {
+ ($heavy = /\W/) and last
+ foreach (@_);
}
+ return export $pkg, $callpkg, ($args ? @_ : ()) if $heavy;
local $SIG{__WARN__} =
sub {require Carp; &Carp::carp};
- foreach my $sym (@_) {
- # shortcut for the common case of no type character
- *{"$callpkg\::$sym"} = \&{"$pkg\::$sym"};
- }
+ # shortcut for the common case of no type character
+ *{"$callpkg\::$_"} = \&{"$pkg\::$_"} foreach @_;
}
@@ -80,7 +81,7 @@ sub require_version {
1;
-
+__END__
=head1 NAME
diff --git a/lib/Exporter.t b/lib/Exporter.t
index f2771db3f5..d2a9289c61 100644
--- a/lib/Exporter.t
+++ b/lib/Exporter.t
@@ -21,7 +21,7 @@ sub ok ($;$) {
}
-print "1..19\n";
+print "1..24\n";
require Exporter;
ok( 1, 'Exporter compiled' );
@@ -50,7 +50,7 @@ foreach my $meth (@::Exporter_Methods) {
That => [qw(Above the @wailing)],
tray => [qw(Fasten $seatbelt)],
);
-@EXPORT = qw(lifejacket);
+@EXPORT = qw(lifejacket is);
@EXPORT_OK = qw(under &your $seat);
$VERSION = '1.05';
@@ -72,6 +72,8 @@ $seat = 'seat';
@wailing = qw(AHHHHHH);
%left = ( left => "right" );
+BEGIN {*is = \&Is};
+sub Is { 'Is' };
Exporter::export_ok_tags;
@@ -89,6 +91,24 @@ Testing->import;
::ok( defined &lifejacket, 'simple import' );
+my $got = eval {&lifejacket};
+::ok ( $@ eq "", 'check we can call the imported subroutine')
+ or print STDERR "# \$\@ is $@\n";
+::ok ( $got eq 'lifejacket', 'and that it gave the correct result')
+ or print STDERR "# expected 'lifejacket', got " .
+ (defined $got ? "'$got'" : "undef") . "\n";
+
+# The string eval is important. It stops $Foo::{is} existing when
+# Testing->import is called.
+::ok( eval "defined &is",
+ "Import a subroutine where exporter must create the typeglob" );
+my $got = eval "&is";
+::ok ( $@ eq "", 'check we can call the imported autoloaded subroutine')
+ or chomp ($@), print STDERR "# \$\@ is $@\n";
+::ok ( $got eq 'Is', 'and that it gave the correct result')
+ or print STDERR "# expected 'Is', got " .
+ (defined $got ? "'$got'" : "undef") . "\n";
+
package Bar;
my @imports = qw($seatbelt &Above stuff @wailing %left);
diff --git a/lib/ExtUtils/Installed.pm b/lib/ExtUtils/Installed.pm
index a0eeaf4555..bb744b0702 100644
--- a/lib/ExtUtils/Installed.pm
+++ b/lib/ExtUtils/Installed.pm
@@ -85,7 +85,7 @@ if ($DOSISH)
# Read the core packlist
$self->{Perl}{packlist} =
- ExtUtils::Packlist->new("$installarchlib/.packlist");
+ ExtUtils::Packlist->new( File::Spec->catfile($installarchlib, '.packlist') );
$self->{Perl}{version} = $Config{version};
# Read the module packlists
diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm
index f2b6ef2b25..103854fc9a 100644
--- a/lib/ExtUtils/MM_Unix.pm
+++ b/lib/ExtUtils/MM_Unix.pm
@@ -10,7 +10,7 @@ use strict;
our ($Is_Mac,$Is_OS2,$Is_VMS,$Is_Win32,$Is_Dos,
$Verbose,%pm,%static,$Xsubpp_Version);
-our $VERSION = '1.12603';
+our $VERSION = '1.12604';
require ExtUtils::MakeMaker;
ExtUtils::MakeMaker->import(qw($Verbose &neatvalue));
@@ -162,86 +162,84 @@ sub updir {
return "..";
}
-sub ExtUtils::MM_Unix::c_o ;
-sub ExtUtils::MM_Unix::clean ;
-sub ExtUtils::MM_Unix::const_cccmd ;
-sub ExtUtils::MM_Unix::const_config ;
-sub ExtUtils::MM_Unix::const_loadlibs ;
-sub ExtUtils::MM_Unix::constants ;
-sub ExtUtils::MM_Unix::depend ;
-sub ExtUtils::MM_Unix::dir_target ;
-sub ExtUtils::MM_Unix::dist ;
-sub ExtUtils::MM_Unix::dist_basics ;
-sub ExtUtils::MM_Unix::dist_ci ;
-sub ExtUtils::MM_Unix::dist_core ;
-sub ExtUtils::MM_Unix::dist_dir ;
-sub ExtUtils::MM_Unix::dist_test ;
-sub ExtUtils::MM_Unix::dlsyms ;
-sub ExtUtils::MM_Unix::dynamic ;
-sub ExtUtils::MM_Unix::dynamic_bs ;
-sub ExtUtils::MM_Unix::dynamic_lib ;
-sub ExtUtils::MM_Unix::exescan ;
-sub ExtUtils::MM_Unix::export_list ;
-sub ExtUtils::MM_Unix::extliblist ;
-sub ExtUtils::MM_Unix::file_name_is_absolute ;
-sub ExtUtils::MM_Unix::find_perl ;
-sub ExtUtils::MM_Unix::fixin ;
-sub ExtUtils::MM_Unix::force ;
-sub ExtUtils::MM_Unix::guess_name ;
-sub ExtUtils::MM_Unix::has_link_code ;
-sub ExtUtils::MM_Unix::htmlifypods ;
-sub ExtUtils::MM_Unix::init_dirscan ;
-sub ExtUtils::MM_Unix::init_main ;
-sub ExtUtils::MM_Unix::init_others ;
-sub ExtUtils::MM_Unix::install ;
-sub ExtUtils::MM_Unix::installbin ;
-sub ExtUtils::MM_Unix::libscan ;
-sub ExtUtils::MM_Unix::linkext ;
-sub ExtUtils::MM_Unix::lsdir ;
-sub ExtUtils::MM_Unix::macro ;
-sub ExtUtils::MM_Unix::makeaperl ;
-sub ExtUtils::MM_Unix::makefile ;
-sub ExtUtils::MM_Unix::manifypods ;
-sub ExtUtils::MM_Unix::maybe_command ;
-sub ExtUtils::MM_Unix::maybe_command_in_dirs ;
-sub ExtUtils::MM_Unix::needs_linking ;
-sub ExtUtils::MM_Unix::nicetext ;
-sub ExtUtils::MM_Unix::parse_version ;
-sub ExtUtils::MM_Unix::pasthru ;
-sub ExtUtils::MM_Unix::path ;
-sub ExtUtils::MM_Unix::perl_archive;
-sub ExtUtils::MM_Unix::perl_archive_after;
-sub ExtUtils::MM_Unix::perl_script ;
-sub ExtUtils::MM_Unix::perldepend ;
-sub ExtUtils::MM_Unix::pm_to_blib ;
-sub ExtUtils::MM_Unix::post_constants ;
-sub ExtUtils::MM_Unix::post_initialize ;
-sub ExtUtils::MM_Unix::postamble ;
-sub ExtUtils::MM_Unix::ppd ;
-sub ExtUtils::MM_Unix::prefixify ;
-sub ExtUtils::MM_Unix::processPL ;
-sub ExtUtils::MM_Unix::quote_paren ;
-sub ExtUtils::MM_Unix::realclean ;
-sub ExtUtils::MM_Unix::replace_manpage_separator ;
-sub ExtUtils::MM_Unix::static ;
-sub ExtUtils::MM_Unix::static_lib ;
-sub ExtUtils::MM_Unix::staticmake ;
-sub ExtUtils::MM_Unix::subdir_x ;
-sub ExtUtils::MM_Unix::subdirs ;
-sub ExtUtils::MM_Unix::test ;
-sub ExtUtils::MM_Unix::test_via_harness ;
-sub ExtUtils::MM_Unix::test_via_script ;
-sub ExtUtils::MM_Unix::tool_autosplit ;
-sub ExtUtils::MM_Unix::tool_xsubpp ;
-sub ExtUtils::MM_Unix::tools_other ;
-sub ExtUtils::MM_Unix::top_targets ;
-sub ExtUtils::MM_Unix::writedoc ;
-sub ExtUtils::MM_Unix::xs_c ;
-sub ExtUtils::MM_Unix::xs_cpp ;
-sub ExtUtils::MM_Unix::xs_o ;
-sub ExtUtils::MM_Unix::xsubpp_version ;
-
-package ExtUtils::MM_Unix;
+sub c_o;
+sub clean;
+sub const_cccmd;
+sub const_config;
+sub const_loadlibs;
+sub constants;
+sub depend;
+sub dir_target;
+sub dist;
+sub dist_basics;
+sub dist_ci;
+sub dist_core;
+sub dist_dir;
+sub dist_test;
+sub dlsyms;
+sub dynamic;
+sub dynamic_bs;
+sub dynamic_lib;
+sub exescan;
+sub export_list;
+sub extliblist;
+sub file_name_is_absolute;
+sub find_perl;
+sub fixin;
+sub force;
+sub guess_name;
+sub has_link_code;
+sub htmlifypods;
+sub init_dirscan;
+sub init_main;
+sub init_others;
+sub install;
+sub installbin;
+sub libscan;
+sub linkext;
+sub lsdir;
+sub macro;
+sub makeaperl;
+sub makefile;
+sub manifypods;
+sub maybe_command;
+sub maybe_command_in_dirs;
+sub needs_linking;
+sub nicetext;
+sub parse_version;
+sub pasthru;
+sub path;
+sub perl_archive;
+sub perl_archive_after;
+sub perl_script;
+sub perldepend;
+sub pm_to_blib;
+sub post_constants;
+sub post_initialize;
+sub postamble;
+sub ppd;
+sub prefixify;
+sub processPL;
+sub quote_paren;
+sub realclean;
+sub replace_manpage_separator;
+sub static;
+sub static_lib;
+sub staticmake;
+sub subdir_x;
+sub subdirs;
+sub test;
+sub test_via_harness;
+sub test_via_script;
+sub tool_autosplit;
+sub tool_xsubpp;
+sub tools_other;
+sub top_targets;
+sub writedoc;
+sub xs_c;
+sub xs_cpp;
+sub xs_o;
+sub xsubpp_version;
use SelfLoader;
@@ -2035,16 +2033,27 @@ usually solves this kind of problem.
# --- Initialize Perl Binary Locations
# Find Perl 5. The only contract here is that both 'PERL' and 'FULLPERL'
- # will be working versions of perl 5. miniperl has priority over perl
- # for PERL to ensure that $(PERL) is usable while building ./ext/*
+ # will be working versions of perl 5.
my ($component,@defpath);
- foreach $component ($self->{PERL_SRC}, $self->path(), $Config::Config{binexp}) {
+ foreach $component ($self->{PERL_SRC}, $self->path(),
+ $Config::Config{binexp})
+ {
push @defpath, $component if defined $component;
}
+
+ my @perls = ($self->canonpath($^X), 'perl', 'perl5', "perl$Config{version}");
+
+ # miniperl has priority over all but the cannonical perl when in the
+ # core. Otherwise its a last resort.
+ if( $self->{PERL_CORE} ) {
+ splice @perls, 1, 0, 'miniperl';
+ }
+ else {
+ push @perls, 'miniperl';
+ }
+
$self->{PERL} ||=
- $self->find_perl(5.0, [ $self->canonpath($^X), 'miniperl',
- 'perl','perl5',"perl$Config{version}" ],
- \@defpath, $Verbose );
+ $self->find_perl(5.0, \@perls, \@defpath, $Verbose );
# don't check if perl is executable, maybe they have decided to
# supply switches with perl
diff --git a/lib/ExtUtils/Command.t b/lib/ExtUtils/t/Command.t
index 7115bea503..7115bea503 100644
--- a/lib/ExtUtils/Command.t
+++ b/lib/ExtUtils/t/Command.t
diff --git a/lib/ExtUtils/Embed.t b/lib/ExtUtils/t/Embed.t
index 24b6a17362..24b6a17362 100644
--- a/lib/ExtUtils/Embed.t
+++ b/lib/ExtUtils/t/Embed.t
diff --git a/lib/ExtUtils.t b/lib/ExtUtils/t/ExtUtils.t
index 24d85d3221..24d85d3221 100644
--- a/lib/ExtUtils.t
+++ b/lib/ExtUtils/t/ExtUtils.t
diff --git a/lib/ExtUtils/Installed.t b/lib/ExtUtils/t/Installed.t
index f6bd21b4a3..ca3e9afbef 100644
--- a/lib/ExtUtils/Installed.t
+++ b/lib/ExtUtils/t/Installed.t
@@ -88,13 +88,15 @@ SKIP: {
# avoid warning and death by localizing glob
local *ExtUtils::Installed::Config;
+ my $fake_mod_dir = File::Spec->catdir(cwd(), 'auto', 'FakeMod');
%ExtUtils::Installed::Config = (
- archlib => cwd(),
- sitearch => cwd() . 'auto/FakeMod',
+ archlib => cwd(),
+ installarchlib => cwd(),
+ sitearch => $fake_mod_dir,
);
# necessary to fool new()
- push @INC, cwd() . '/auto/FakeMod';
+ push @INC, $fake_mod_dir;
my $realei = ExtUtils::Installed->new();
ok( exists $realei->{FakeMod}, 'new() should find modules with .packlists');
@@ -111,9 +113,9 @@ is( join(' ', $ei->modules()), 'abc def ghi',
# files
$ei->{goodmod} = {
packlist => {
- $Config{installman1dir} . '/foo' => 1,
- $Config{installman3dir} . '/bar' => 1,
- $Config{prefix} . '/foobar' => 1,
+ File::Spec->catdir($Config{installman1dir}, 'foo') => 1,
+ File::Spec->catdir($Config{installman3dir}, 'bar') => 1,
+ File::Spec->catdir($Config{prefix}, 'foobar') => 1,
foobaz => 1,
},
};
diff --git a/lib/ExtUtils/MM_Cygwin.t b/lib/ExtUtils/t/MM_Cygwin.t
index 17ae269fda..17ae269fda 100644
--- a/lib/ExtUtils/MM_Cygwin.t
+++ b/lib/ExtUtils/t/MM_Cygwin.t
diff --git a/lib/ExtUtils/t/MM_Unix.t b/lib/ExtUtils/t/MM_Unix.t
new file mode 100644
index 0000000000..1b918e8014
--- /dev/null
+++ b/lib/ExtUtils/t/MM_Unix.t
@@ -0,0 +1,141 @@
+#!./perl -w
+
+# 2001-12-16 Tels first version
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
+BEGIN {
+ use Test::More;
+
+ if( $^O =~ /^VMS|os2|MacOS|MSWin32|cygwin$/ ) {
+ plan skip_all => 'Non-Unix platform';
+ }
+ else {
+ plan tests => 90;
+ }
+}
+
+BEGIN { use_ok( 'ExtUtils::MM_Unix' ); }
+
+use strict;
+use File::Spec;
+
+my $class = 'ExtUtils::MM_Unix';
+
+# only one of the following can be true
+# test should be removed if MM_Unix ever stops handling other OS than Unix
+my $os = ($ExtUtils::MM_Unix::Is_OS2 || 0)
+ + ($ExtUtils::MM_Unix::Is_Mac || 0)
+ + ($ExtUtils::MM_Unix::Is_Win32 || 0)
+ + ($ExtUtils::MM_Unix::Is_Dos || 0)
+ + ($ExtUtils::MM_Unix::Is_VMS || 0);
+ok ( $os <= 1, 'There can be only one (or none)');
+
+is ($ExtUtils::MM_Unix::VERSION, '1.12604', 'Should be that version');
+
+# when the following calls like canonpath, catdir etc are replaced by
+# File::Spec calls, the test's become a bit pointless
+
+foreach ( qw( xx/ ./xx/ xx/././xx xx///xx) )
+ {
+ is ($class->canonpath($_), File::Spec->canonpath($_), "canonpath $_");
+ }
+
+is ($class->catdir('xx','xx'), File::Spec->catdir('xx','xx'),
+ 'catdir(xx, xx) => xx/xx');
+is ($class->catfile('xx','xx','yy'), File::Spec->catfile('xx','xx','yy'),
+ 'catfile(xx, xx) => xx/xx');
+
+foreach (qw/updir curdir rootdir/)
+ {
+ is ($class->$_(), File::Spec->$_(), $_ );
+ }
+
+foreach ( qw /
+ c_o
+ clean
+ const_cccmd
+ const_config
+ const_loadlibs
+ constants
+ depend
+ dir_target
+ dist
+ dist_basics
+ dist_ci
+ dist_core
+ dist_dir
+ dist_test
+ dlsyms
+ dynamic
+ dynamic_bs
+ dynamic_lib
+ exescan
+ export_list
+ extliblist
+ file_name_is_absolute
+ find_perl
+ fixin
+ force
+ guess_name
+ has_link_code
+ htmlifypods
+ init_dirscan
+ init_main
+ init_others
+ install
+ installbin
+ libscan
+ linkext
+ lsdir
+ macro
+ makeaperl
+ makefile
+ manifypods
+ maybe_command
+ maybe_command_in_dirs
+ needs_linking
+ nicetext
+ parse_version
+ pasthru
+ path
+ perl_archive
+ perl_archive_after
+ perl_script
+ perldepend
+ pm_to_blib
+ post_constants
+ post_initialize
+ postamble
+ ppd
+ prefixify
+ processPL
+ quote_paren
+ realclean
+ replace_manpage_separator
+ static
+ static_lib
+ staticmake
+ subdir_x
+ subdirs
+ test
+ test_via_harness
+ test_via_script
+ tool_autosplit
+ tool_xsubpp
+ tools_other
+ top_targets
+ writedoc
+ xs_c
+ xs_cpp
+ xs_o
+ xsubpp_version
+ / )
+ {
+ ok ($class->can ($_), "can $_");
+ }
+
+
diff --git a/lib/ExtUtils/MM_VMS.t b/lib/ExtUtils/t/MM_VMS.t
index 784008aecb..784008aecb 100644
--- a/lib/ExtUtils/MM_VMS.t
+++ b/lib/ExtUtils/t/MM_VMS.t
diff --git a/lib/ExtUtils/Manifest.t b/lib/ExtUtils/t/Manifest.t
index f531406a44..f531406a44 100644
--- a/lib/ExtUtils/Manifest.t
+++ b/lib/ExtUtils/t/Manifest.t
diff --git a/lib/ExtUtils/Mkbootstrap.t b/lib/ExtUtils/t/Mkbootstrap.t
index 571c158c09..571c158c09 100644
--- a/lib/ExtUtils/Mkbootstrap.t
+++ b/lib/ExtUtils/t/Mkbootstrap.t
diff --git a/lib/ExtUtils/Packlist.t b/lib/ExtUtils/t/Packlist.t
index 3e455b7ad2..3e455b7ad2 100644
--- a/lib/ExtUtils/Packlist.t
+++ b/lib/ExtUtils/t/Packlist.t
diff --git a/lib/ExtUtils/testlib.t b/lib/ExtUtils/t/testlib.t
index e0ef990f99..e0ef990f99 100644
--- a/lib/ExtUtils/testlib.t
+++ b/lib/ExtUtils/t/testlib.t
diff --git a/op.c b/op.c
index cb891c4792..a35c91966c 100644
--- a/op.c
+++ b/op.c
@@ -4073,7 +4073,7 @@ Perl_newLOOPOP(pTHX_ I32 flags, I32 debuggable, OP *expr, OP *block)
case OP_SASSIGN:
if (k1->op_type == OP_READDIR
|| k1->op_type == OP_GLOB
- || (k1->op_type == OP_NULL && k1->op_targ == OP_NULL)
+ || (k1->op_type == OP_NULL && k1->op_targ == OP_GLOB)
|| k1->op_type == OP_EACH)
expr = newUNOP(OP_DEFINED, 0, expr);
break;
diff --git a/patchlevel.h b/patchlevel.h
index bd3787e716..f079fdd4fd 100644
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -70,7 +70,7 @@
#if !defined(PERL_PATCHLEVEL_H_IMPLICIT) && !defined(LOCAL_PATCH_COUNT)
static char *local_patches[] = {
NULL
- ,"DEVEL13686"
+ ,"DEVEL13745"
,NULL
};
diff --git a/perl.c b/perl.c
index a27620a41d..d75b20dff7 100644
--- a/perl.c
+++ b/perl.c
@@ -1297,7 +1297,7 @@ print \" \\@INC:\\n @INC\\n\";");
d = s;
if (!*s)
break;
- if (!strchr("DIMUdmw", *s))
+ if (!strchr("DIMUdmtw", *s))
Perl_croak(aTHX_ "Illegal switch in PERL5OPT: -%c", *s);
while (++s && *s) {
if (isSPACE(*s)) {
@@ -1310,7 +1310,12 @@ print \" \\@INC:\\n @INC\\n\";");
break;
}
}
- moreswitches(d);
+ if (*d == 't') {
+ PL_tainting = TRUE;
+ PL_taint_warn = TRUE;
+ } else {
+ moreswitches(d);
+ }
}
}
}
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 7a7661a8c6..1935550821 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -1639,7 +1639,7 @@ Interpretation of the octal number stopped before the 8 or 9.
=item Illegal switch in PERL5OPT: %s
(X) The PERL5OPT environment variable may only be used to set the
-following switches: B<-[DIMUdmw]>.
+following switches: B<-[DIMUdmtw]>.
=item Ill-formed CRTL environ value "%s"
@@ -3605,8 +3605,9 @@ representative, who probably put it there in the first place.
=item Unicode character %s is illegal
-Certain Unicode characters have been designated off-limits by the
-Unicode standard and should not be generated.
+(W utf8) Certain Unicode characters have been designated off-limits by
+the Unicode standard and should not be generated. If you really know
+what you are doing you can turn off this warning by C<no warnings 'utf8';>.
=item Unknown BYTEORDER
@@ -4004,11 +4005,13 @@ removed in a future version.
=item UTF-16 surrogate %s
-(F) You tried to generate half of an UTF-16 surrogate by requesting
-a Unicode character between the code points 0xD800 and 0xDFFF (inclusive).
-That range is reserved exclusively for the use of UTF-16 encoding
-(by having two 16-bit UCS-2 characters); but Perl encodes its characters
-in UTF-8, so what you got is a very illegal character.
+(W utf8) You tried to generate half of an UTF-16 surrogate by
+requesting a Unicode character between the code points 0xD800 and
+0xDFFF (inclusive). That range is reserved exclusively for the use of
+UTF-16 encoding (by having two 16-bit UCS-2 characters); but Perl
+encodes its characters in UTF-8, so what you got is a very illegal
+character. If you really know what you are doing you can turn off
+this warning by C<no warnings 'utf8';>.
=item Value of %s can be "0"; test with defined()
diff --git a/pod/perlrun.pod b/pod/perlrun.pod
index 9de9a3e710..726a69dad8 100644
--- a/pod/perlrun.pod
+++ b/pod/perlrun.pod
@@ -837,7 +837,7 @@ The program should instead say:
=item PERL5OPT
Command-line options (switches). Switches in this variable are taken
-as if they were on every Perl command line. Only the B<-[DIMUdmw]>
+as if they were on every Perl command line. Only the B<-[DIMUdmtw]>
switches are allowed. When running taint checks (because the program
was running setuid or setgid, or the B<-T> switch was used), this
variable is ignored. If PERL5OPT begins with B<-T>, tainting will be
diff --git a/pod/perlsub.pod b/pod/perlsub.pod
index 4329c161ff..efadf8f848 100644
--- a/pod/perlsub.pod
+++ b/pod/perlsub.pod
@@ -1194,6 +1194,30 @@ a properly written override. For a fully functional example of overriding
C<glob>, study the implementation of C<File::DosGlob> in the standard
library.
+When you override a built-in, your replacement should be consistent (if
+possible) with the built-in native syntax. You can achieve this by using
+a suitable prototype. To get the prototype of an overridable built-in,
+use the C<prototype> function with an argument of C<"CORE::builtin_name">
+(see L<perlfunc/prototype>).
+
+Note however that some built-ins can't have their syntax expressed by a
+prototype (such as C<system> or C<chomp>). If you override them you won't
+be able to fully mimic their original syntax.
+
+The built-ins C<do>, C<require> and C<glob> can also be overriden, but due
+to special magic, their original syntax is preserved, and you don't have
+to define a prototype for their replacements. (You can't override the
+C<do BLOCK> syntax, though).
+
+C<require> has special additional dark magic: if you invoke your
+C<require> replacement as C<require Foo::Bar>, it will actually receive
+the argument C<"Foo/Bar.pm"> in @_. See L<perlfunc/require>.
+
+And, as you'll have noticed from the previous example, if you override
+C<glob>, the C<E<lt>*E<gt>> glob operator is overriden as well.
+
+Finally, some built-ins (e.g. C<exists> or C<grep>) can't be overriden.
+
=head2 Autoloading
If you call a subroutine that is undefined, you would ordinarily
diff --git a/pod/perluniintro.pod b/pod/perluniintro.pod
index 0ecfba0662..775609c269 100644
--- a/pod/perluniintro.pod
+++ b/pod/perluniintro.pod
@@ -139,9 +139,33 @@ that Perl tries to keep its data as eight-bit bytes for as long as
possible, but as soon as Unicodeness cannot be avoided, the data is
transparently upgraded to Unicode.
-The internal encoding of Unicode in Perl is UTF-8. The internal
-encoding is normally hidden, however, and one need not and should not
-worry about the internal encoding at all: it is all just characters.
+Internally, Perl currently uses either whatever the native eight-bit
+character set of the platform (for example Latin-1) or UTF-8 to encode
+Unicode strings. Specifically, if all code points in the string are
+0xFF or less, Perl uses Latin-1. Otherwise, it uses UTF-8.
+
+A user of Perl does not normally need to know nor care how Perl happens
+to encodes its internal strings, but it becomes relevant when outputting
+Unicode strings to a stream without a discipline (one with the "default
+default"). In such a case, the raw bytes used internally (the native
+character set or UTF-8, as appropriate for each string) will be used,
+and if warnings are turned on, a "Wide character" warning will be issued
+if those strings contain a character beyond 0x00FF.
+
+For example,
+
+ perl -w -e 'print "\x{DF}\n", "\x{0100}\x{DF}\n"'
+
+produces a fairly useless mixture of native bytes and UTF-8, as well
+as a warning.
+
+To output UTF-8 always, use the ":utf8" output discipline. Prepending
+
+ binmode(STDOUT, ":utf8");
+
+to this sample program ensures the output is completely UTF-8, and
+of course, removes the warning. Another way to achieve this is the
+L<encoding> pragma, discussed later in L</Legacy Encodings>.
Perl 5.8.0 will also support Unicode on EBCDIC platforms. There the
support is somewhat harder to implement since additional conversions
@@ -149,12 +173,14 @@ are needed at every step. Because of these difficulties the Unicode
support won't be quite as full as in other, mainly ASCII-based,
platforms (the Unicode support will be better than in the 5.6 series,
which didn't work much at all for EBCDIC platform). On EBCDIC
-platforms the internal encoding form used is UTF-EBCDIC.
+platforms the internal encoding form used is UTF-EBCDIC instead
+of UTF-8 (the difference is that as UTF-8 is "ASCII-safe" in that
+ASCII characters encode to UTF-8 as-is, UTF-EBCDIC is "EBCDIC-safe").
=head2 Creating Unicode
-To create Unicode literals, use the C<\x{...}> notation in
-doublequoted strings:
+To create Unicode literals for code points above 0xFF, use the
+C<\x{...}> notation in doublequoted strings:
my $smiley = "\x{263a}";
@@ -358,18 +384,23 @@ its argument so that Unicode characters with code points greater than
255 are displayed as "\x{...}", control characters (like "\n") are
displayed as "\x..", and the rest of the characters as themselves.
-sub nice_string {
- join("",
- map { $_ > 255 ? # if wide character...
- sprintf("\\x{%x}", $_) : # \x{...}
- chr($_) =~ /[[:cntrl:]]/ ? # else if control character ...
- sprintf("\\x%02x", $_) : # \x..
- chr($_) } # else as themselves
- unpack("U*", $_[0])); # unpack Unicode characters
-}
+ sub nice_string {
+ join("",
+ map { $_ > 255 ? # if wide character...
+ sprintf("\\x{%x}", $_) : # \x{...}
+ chr($_) =~ /[[:cntrl:]]/ ? # else if control character ...
+ sprintf("\\x%02x", $_) : # \x..
+ chr($_) # else as themselves
+ } unpack("U*", $_[0])); # unpack Unicode characters
+ }
+
+For example,
+
+ nice_string("foo\x{100}bar\n")
+
+will return:
-For example, C<nice_string("foo\x{100}bar\n")> will return
-C<"foo\x{100}bar\x0a">.
+ "foo\x{100}bar\x0a"
=head2 Special Cases
@@ -423,7 +454,7 @@ C<LATIN CAPITAL LETTER A>?)
The short answer is that by default Perl compares equivalence
(C<eq>, C<ne>) based only on code points of the characters.
-In the above case, no (because 0x00C1 != 0x0041). But sometimes any
+In the above case, the answer is no (because 0x00C1 != 0x0041). But sometimes any
CAPITAL LETTER As being considered equal, or even any As of any case,
would be desirable.
@@ -433,7 +464,7 @@ Reports #15 and #21, I<Unicode Normalization Forms> and I<Case
Mappings>, http://www.unicode.org/unicode/reports/tr15/
http://www.unicode.org/unicode/reports/tr21/
-As of Perl 5.8.0, the's regular expression case-ignoring matching
+As of Perl 5.8.0, regular expression case-ignoring matching
implements only 1:1 semantics: one character matches one character.
In I<Case Mappings> both 1:N and N:1 matches are defined.
@@ -447,9 +478,9 @@ parlance goes, collated. But again, what do you mean by collate?
(Does C<LATIN CAPITAL LETTER A WITH ACUTE> come before or after
C<LATIN CAPITAL LETTER A WITH GRAVE>?)
-The short answer is that by default Perl compares strings (C<lt>,
+The short answer is that by default, Perl compares strings (C<lt>,
C<le>, C<cmp>, C<ge>, C<gt>) based only on the code points of the
-characters. In the above case, after, since 0x00C1 > 0x00C0.
+characters. In the above case, the answer is "after", since 0x00C1 > 0x00C0.
The long answer is that "it depends", and a good answer cannot be
given without knowing (at the very least) the language context.
@@ -468,12 +499,12 @@ Character Ranges
Character ranges in regular expression character classes (C</[a-z]/>)
and in the C<tr///> (also known as C<y///>) operator are not magically
-Unicode-aware. What this means that C<[a-z]> will not magically start
+Unicode-aware. What this means that C<[A-Za-z]> will not magically start
to mean "all alphabetic letters" (not that it does mean that even for
8-bit characters, you should be using C</[[:alpha]]/> for that).
-For specifying things like that in regular expressions you can use the
-various Unicode properties, C<\pL> in this particular case. You can
+For specifying things like that in regular expressions, you can use the
+various Unicode properties, C<\pL> or perhaps C<\p{Alphabetic}>, in this particular case. You can
use Unicode code points as the end points of character ranges, but
that means that particular code point range, nothing more. For
further information, see L<perlunicode>.
@@ -485,7 +516,7 @@ String-To-Number Conversions
Unicode does define several other decimal (and numeric) characters
than just the familiar 0 to 9, such as the Arabic and Indic digits.
Perl does not support string-to-number conversion for digits other
-than the 0 to 9 (and a to f for hexadecimal).
+than ASCII 0 to 9 (and ASCII a to f for hexadecimal).
=back
diff --git a/pp.c b/pp.c
index 9237a8b219..23bf1ffad2 100644
--- a/pp.c
+++ b/pp.c
@@ -15,6 +15,7 @@
#include "EXTERN.h"
#define PERL_IN_PP_C
#include "perl.h"
+#include "keywords.h"
/* variations on pp_null */
@@ -365,6 +366,8 @@ PP(pp_prototype)
I32 oa;
char str[ MAX_ARGS_OP * 2 + 2 ]; /* One ';', one '\0' */
+ if (code == -KEY_chop || code == -KEY_chomp)
+ goto set;
while (i < MAXO) { /* The slow way. */
if (strEQ(s + 6, PL_op_name[i])
|| strEQ(s + 6, PL_op_desc[i]))
diff --git a/pp_sort.c b/pp_sort.c
index fa76c3e57b..e758984167 100644
--- a/pp_sort.c
+++ b/pp_sort.c
@@ -245,164 +245,9 @@ dynprep(pTHX_ gptr *list1, gptr *list2, size_t nmemb, SVCOMPARE_t cmp)
}
-/* Overview of bmerge variables:
-**
-** list1 and list2 address the main and auxiliary arrays.
-** They swap identities after each merge pass.
-** Base points to the original list1, so we can tell if
-** the pointers ended up where they belonged (or must be copied).
-**
-** When we are merging two lists, f1 and f2 are the next elements
-** on the respective lists. l1 and l2 mark the end of the lists.
-** tp2 is the current location in the merged list.
-**
-** p1 records where f1 started.
-** After the merge, a new descriptor is built there.
-**
-** p2 is a ``parallel'' pointer in (what starts as) descriptor space.
-** It is used to identify and delimit the runs.
-**
-** In the heat of determining where q, the greater of the f1/f2 elements,
-** belongs in the other list, b, t and p, represent bottom, top and probe
-** locations, respectively, in the other list.
-** They make convenient temporary pointers in other places.
-*/
-
-STATIC void
-S_mergesortsv(pTHX_ gptr *list1, size_t nmemb, SVCOMPARE_t cmp)
-{
- int i, run;
- int sense;
- register gptr *f1, *f2, *t, *b, *p, *tp2, *l1, *l2, *q;
- gptr *aux, *list2, *p2, *last;
- gptr *base = list1;
- gptr *p1;
- gptr small[SMALLSORT];
-
- if (nmemb <= 1) return; /* sorted trivially */
- if (nmemb <= SMALLSORT) list2 = small; /* use stack for aux array */
- else { New(799,list2,nmemb,gptr); } /* allocate auxilliary array */
- aux = list2;
- dynprep(aTHX_ list1, list2, nmemb, cmp);
- last = PINDEX(list2, nmemb);
- while (NEXT(list2) != last) {
- /* More than one run remains. Do some merging to reduce runs. */
- l2 = p1 = list1;
- for (tp2 = p2 = list2; p2 != last;) {
- /* The new first run begins where the old second list ended.
- ** Use the p2 ``parallel'' pointer to identify the end of the run.
- */
- f1 = l2;
- t = NEXT(p2);
- f2 = l1 = POTHER(t, list2, list1);
- if (t != last) t = NEXT(t);
- l2 = POTHER(t, list2, list1);
- p2 = t;
- while (f1 < l1 && f2 < l2) {
- /* If head 1 is larger than head 2, find ALL the elements
- ** in list 2 strictly less than head1, write them all,
- ** then head 1. Then compare the new heads, and repeat,
- ** until one or both lists are exhausted.
- **
- ** In all comparisons (after establishing
- ** which head to merge) the item to merge
- ** (at pointer q) is the first operand of
- ** the comparison. When we want to know
- ** if ``q is strictly less than the other'',
- ** we can't just do
- ** cmp(q, other) < 0
- ** because stability demands that we treat equality
- ** as high when q comes from l2, and as low when
- ** q was from l1. So we ask the question by doing
- ** cmp(q, other) <= sense
- ** and make sense == 0 when equality should look low,
- ** and -1 when equality should look high.
- */
-
-
- if (cmp(aTHX_ *f1, *f2) <= 0) {
- q = f2; b = f1; t = l1;
- sense = -1;
- } else {
- q = f1; b = f2; t = l2;
- sense = 0;
- }
-
-
- /* ramp up
- **
- ** Leave t at something strictly
- ** greater than q (or at the end of the list),
- ** and b at something strictly less than q.
- */
- for (i = 1, run = 0 ;;) {
- if ((p = PINDEX(b, i)) >= t) {
- /* off the end */
- if (((p = PINDEX(t, -1)) > b) &&
- (cmp(aTHX_ *q, *p) <= sense))
- t = p;
- else b = p;
- break;
- } else if (cmp(aTHX_ *q, *p) <= sense) {
- t = p;
- break;
- } else b = p;
- if (++run >= RTHRESH) i += i;
- }
-
-
- /* q is known to follow b and must be inserted before t.
- ** Increment b, so the range of possibilities is [b,t).
- ** Round binary split down, to favor early appearance.
- ** Adjust b and t until q belongs just before t.
- */
-
- b++;
- while (b < t) {
- p = PINDEX(b, (PNELEM(b, t) - 1) / 2);
- if (cmp(aTHX_ *q, *p) <= sense) {
- t = p;
- } else b = p + 1;
- }
-
-
- /* Copy all the strictly low elements */
-
- if (q == f1) {
- FROMTOUPTO(f2, tp2, t);
- *tp2++ = *f1++;
- } else {
- FROMTOUPTO(f1, tp2, t);
- *tp2++ = *f2++;
- }
- }
-
-
- /* Run out remaining list */
- if (f1 == l1) {
- if (f2 < l2) FROMTOUPTO(f2, tp2, l2);
- } else FROMTOUPTO(f1, tp2, l1);
- p1 = NEXT(p1) = POTHER(tp2, list2, list1);
- }
- t = list1;
- list1 = list2;
- list2 = t;
- last = PINDEX(list2, nmemb);
- }
- if (base == list2) {
- last = PINDEX(list1, nmemb);
- FROMTOUPTO(list1, list2, last);
- }
- if (aux != small) Safefree(aux); /* free iff allocated */
- return;
-}
-
-
-/* What perl needs (least) is another sort implementation in the core.
- * So what's the story? The short (by jpl's standards) story is that
- * the merge sort above, in use since 5.7, is as fast as, or faster than,
+/* The original merge sort, in use since 5.7, was as fast as, or faster than,
* qsort on many platforms, but slower than qsort, conspicuously so,
- * on others. The most likely explanation is platform-specific
+ * on others. The most likely explanation was platform-specific
* differences in cache sizes and relative speeds.
*
* The quicksort divide-and-conquer algorithm guarantees that, as the
@@ -411,7 +256,7 @@ S_mergesortsv(pTHX_ gptr *list1, size_t nmemb, SVCOMPARE_t cmp)
* many levels of cache exist, quicksort will "find" them, and,
* as long as smaller is faster, take advanatge of them.
*
- * By contrast, consider how the quicksort algorithm above works.
+ * By contrast, consider how the original mergesort algorithm worked.
* Suppose we have five runs (each typically of length 2 after dynprep).
*
* pass base aux
@@ -478,9 +323,6 @@ S_mergesortsv(pTHX_ gptr *list1, size_t nmemb, SVCOMPARE_t cmp)
* The actual cache-friendly implementation will use a pseudo-stack
* to avoid recursion, and will unroll processing of runs of length 2,
* but it is otherwise similar to the recursive implementation.
- * If it's as good as the original mergesort implementation on all
- * platforms, it should replace that implementation. For benchmarking,
- * though, it is convenient to have both implementations available.
*/
typedef struct {
@@ -489,7 +331,7 @@ typedef struct {
} off_runs; /* pseudo-stack element */
STATIC void
-S_cfmergesortsv(pTHX_ gptr *base, size_t nmemb, SVCOMPARE_t cmp)
+S_mergesortsv(pTHX_ gptr *base, size_t nmemb, SVCOMPARE_t cmp)
{
IV i, run, runs, offset;
I32 sense, level;
@@ -1548,7 +1390,7 @@ Perl_sortsv(pTHX_ SV **array, size_t nmemb, SVCOMPARE_t cmp)
sortsvp = S_qsortsv;
else {
if (hints & HINT_SORT_MERGESORT)
- sortsvp = S_cfmergesortsv;
+ sortsvp = S_mergesortsv;
else
sortsvp = S_mergesortsv;
}
diff --git a/t/lib/warnings/utf8 b/t/lib/warnings/utf8
index 9a7dbafdee..fa7041b938 100644
--- a/t/lib/warnings/utf8
+++ b/t/lib/warnings/utf8
@@ -33,3 +33,16 @@ EXPECT
Malformed UTF-8 character (unexpected non-continuation byte 0x73 after start byte 0xf8) at - line 9.
Malformed UTF-8 character (unexpected non-continuation byte 0x73 after start byte 0xf8) at - line 14.
########
+use warnings 'utf8';
+my $surr = chr(0xD800);
+my $fff3 = chr(0xFFFE);
+my $ffff = chr(0xFFFF);
+no warnings 'utf8';
+$surr = chr(0xD800);
+$fffe = chr(0xFFFE);
+$ffff = chr(0xFFFF);
+EXPECT
+UTF-16 surrogate 0xd800 at - line 2.
+Unicode character 0xfffe is illegal at - line 3.
+Unicode character 0xffff is illegal at - line 4.
+########
diff --git a/t/op/alarm.t b/t/op/alarm.t
new file mode 100644
index 0000000000..12c8c264c4
--- /dev/null
+++ b/t/op/alarm.t
@@ -0,0 +1,47 @@
+#!./perl
+
+BEGIN {
+ chdir 't';
+ @INC = '../lib';
+ require './test.pl';
+}
+
+BEGIN {
+ use Config;
+ if( !$Config{d_alarm} ) {
+ skip_all("alarm() not implemented on this platform");
+ }
+}
+
+plan tests => 4;
+my $Perl = which_perl();
+
+my $start_time = time;
+eval {
+ local $SIG{ALRM} = sub { die "ALARM!\n" };
+ alarm 3;
+
+ # perlfunc recommends against using sleep in combination with alarm.
+ 1 while (time - $start_time < 6);
+};
+alarm 0;
+my $diff = time - $start_time;
+
+# alarm time might be one second less than you said.
+is( $@, "ALARM!\n", 'alarm w/$SIG{ALRM} vs inf loop' );
+ok( $diff == 3 || $diff == 2, ' right time' );
+
+
+my $start_time = time;
+eval {
+ local $SIG{ALRM} = sub { die "ALARM!\n" };
+ alarm 3;
+ system(qq{$Perl -e "sleep 6"});
+};
+alarm 0;
+$diff = time - $start_time;
+
+# alarm time might be one second less than you said.
+is( $@, "ALARM!\n", 'alarm w/$SIG{ALRM} vs system()' );
+
+ok( $diff == 3 || $diff == 2, ' right time' );
diff --git a/t/op/glob.t b/t/op/glob.t
index 8bdf64f932..bc43323375 100755
--- a/t/op/glob.t
+++ b/t/op/glob.t
@@ -5,7 +5,7 @@ BEGIN {
@INC = '../lib';
}
-print "1..10\n";
+print "1..8\n";
@oops = @ops = <op/*>;
@@ -53,10 +53,8 @@ for (1..2) {
}
print $i == 2 ? "ok 7\n" : "not ok 7\n";
-# [ID 20010526.001] localized glob loses value when assigned to
+# ... while ($var = glob(...)) should test definedness not truth
-$j=1; %j=(a=>1); @j=(1); local *j=*j; *j = sub{};
-
-print $j == 1 ? "ok 8\n" : "not ok 8\n";
-print $j{a} == 1 ? "ok 9\n" : "not ok 9\n";
-print $j[0] == 1 ? "ok 10\n" : "not ok 10\n";
+my $ok = "not ok 8\n";
+$ok = "ok 8\n" while my $var = glob("0");
+print $ok;
diff --git a/t/op/gv.t b/t/op/gv.t
index a423cb49ed..9380735a1d 100755
--- a/t/op/gv.t
+++ b/t/op/gv.t
@@ -11,7 +11,7 @@ BEGIN {
use warnings;
-print "1..41\n";
+print "1..44\n";
# type coersion on assignment
$foo = 'foo';
@@ -177,6 +177,14 @@ print {*x{IO}} "ok 23\n";
}
+# [ID 20010526.001] localized glob loses value when assigned to
+
+$j=1; %j=(a=>1); @j=(1); local *j=*j; *j = sub{};
+
+print $j == 1 ? "ok 41\n" : "not ok 41\n";
+print $j{a} == 1 ? "ok 42\n" : "not ok 42\n";
+print $j[0] == 1 ? "ok 43\n" : "not ok 43\n";
+
# does pp_readline() handle glob-ness correctly?
{
@@ -186,4 +194,4 @@ print {*x{IO}} "ok 23\n";
}
__END__
-ok 41
+ok 44
diff --git a/t/op/ord.t b/t/op/ord.t
index f7460553cc..ff51c18f8c 100755
--- a/t/op/ord.t
+++ b/t/op/ord.t
@@ -2,11 +2,11 @@
BEGIN {
chdir 't' if -d 't';
- @INC = '.';
+ @INC = qw(.);
require "test.pl";
}
-print "1..8\n";
+plan tests => 7;
# compile time evaluation
@@ -33,10 +33,3 @@ is(ord("\x{1234}"), 0x1234, 'compile time ord \x{....}');
$x = "\x{1234}";
is(ord($x), 0x1234, 'runtime ord \x{....}');
-{
- eval 'my $surrogate = chr(0xD800)';
-
- like($@, qr/^UTF-16 surrogate 0xd800 /, "surrogates bad");
-}
-
-
diff --git a/t/run/runenv.t b/t/run/runenv.t
index 55c48f03b3..236f84eabb 100644
--- a/t/run/runenv.t
+++ b/t/run/runenv.t
@@ -16,7 +16,7 @@ BEGIN {
use Test;
-plan tests => 10;
+plan tests => 11;
my $STDOUT = './results-0';
my $STDERR = './results-1';
@@ -24,7 +24,7 @@ my $PERL = './perl';
my $FAILURE_CODE = 119;
# Run perl with specified environment and arguments returns a list.
-# First element is true iff Perl's stdout and stderr match the
+# First element is true if Perl's stdout and stderr match the
# supplied $stdout and $stderr argument strings exactly.
# second element is an explanation of the failure
sub runperl {
@@ -79,7 +79,7 @@ sub try {
# PERL5OPT Command-line options (switches). Switches in
# this variable are taken as if they were on
-# every Perl command line. Only the -[DIMUdmw]
+# every Perl command line. Only the -[DIMUdmtw]
# switches are allowed. When running taint
# checks (because the program was running setuid
# or setgid, or the -T switch was used), this
@@ -140,6 +140,11 @@ try({PERL5OPT => '-w -w'},
'-w -w',
'');
+try({PERL5OPT => '-t'},
+ ['-e', 'print ${^TAINT}'],
+ '1',
+ '');
+
END {
1 while unlink $STDOUT;
1 while unlink $STDERR;
diff --git a/toke.c b/toke.c
index 314753f584..1527daaff2 100644
--- a/toke.c
+++ b/toke.c
@@ -5330,12 +5330,12 @@ Perl_keyword(pTHX_ register char *d, I32 len)
if (strEQ(d,"cos")) return -KEY_cos;
break;
case 4:
- if (strEQ(d,"chop")) return KEY_chop;
+ if (strEQ(d,"chop")) return -KEY_chop;
break;
case 5:
if (strEQ(d,"close")) return -KEY_close;
if (strEQ(d,"chdir")) return -KEY_chdir;
- if (strEQ(d,"chomp")) return KEY_chomp;
+ if (strEQ(d,"chomp")) return -KEY_chomp;
if (strEQ(d,"chmod")) return -KEY_chmod;
if (strEQ(d,"chown")) return -KEY_chown;
if (strEQ(d,"crypt")) return -KEY_crypt;
diff --git a/utf8.c b/utf8.c
index 0979506f76..af365927e2 100644
--- a/utf8.c
+++ b/utf8.c
@@ -46,11 +46,14 @@ is the recommended Unicode-aware way of saying
U8 *
Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv)
{
- if (UNICODE_IS_SURROGATE(uv))
- Perl_croak(aTHX_ "UTF-16 surrogate 0x%04"UVxf, uv);
- else if ((uv >= 0xFDD0 && uv <= 0xFDEF) ||
- (uv == 0xFFFE || uv == 0xFFFF))
- Perl_croak(aTHX_ "Unicode character 0x%04"UVxf" is illegal", uv);
+ if (ckWARN_d(WARN_UTF8)) {
+ if (UNICODE_IS_SURROGATE(uv))
+ Perl_warner(aTHX_ WARN_UTF8, "UTF-16 surrogate 0x%04"UVxf, uv);
+ else if ((uv >= 0xFDD0 && uv <= 0xFDEF) ||
+ (uv == 0xFFFE || uv == 0xFFFF))
+ Perl_warner(aTHX_ WARN_UTF8,
+ "Unicode character 0x%04"UVxf" is illegal", uv);
+ }
if (UNI_IS_INVARIANT(uv)) {
*d++ = UTF_TO_NATIVE(uv);
return d;