This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
13 years ago[perl #74798] test Data::Dumper with all latin1 characters
Slaven Rezic [Mon, 27 Sep 2010 10:36:58 +0000 (12:36 +0200)]
[perl #74798] test Data::Dumper with all latin1 characters

13 years agoFix IPC::Open3’s fd.t to work on Windows
Father Chrysostomos [Mon, 27 Sep 2010 23:48:57 +0000 (16:48 -0700)]
Fix IPC::Open3’s fd.t to work on Windows

13 years ago[perl #78088] [PATCH] Upgrade to threads 1.81
Jerry D. Hedden [Mon, 27 Sep 2010 23:29:31 +0000 (00:29 +0100)]
[perl #78088] [PATCH] Upgrade to threads 1.81

  [DELTA]

  The attached patch makes the CPAN distribution of 'threads'
  compatible with with v5.13.2 and later.

13 years agoRemove empty preprocessor directive in embed.fnc
Andy Dougherty [Mon, 27 Sep 2010 18:01:45 +0000 (14:01 -0400)]
Remove empty preprocessor directive in embed.fnc

13 years agoMove OP prototypes from pp_proto.h to proto.h
Nicholas Clark [Mon, 27 Sep 2010 16:25:24 +0000 (17:25 +0100)]
Move OP prototypes from pp_proto.h to proto.h

Make embed.pl fully responsible for generating prototypes and embedding macros
for pp_* and ck_* functions, placing them in embed.h and proto.h
opcode.pl no longer generates pp_proto.h
Remove the (effectively) duplicate explicit entries for (all but 2) ck_*
functions from embed.fnc

We can't actually remove pp_proto.h from the distribution *yet*, as
ExtUtils::MM_Unix and ExtUtils::MM_VMS have hardcoded lists of the installed
headers. Once this is resolved, we can.

13 years agoMove the generation of {START,END}_EXTERN_C from embed.fnc to embed.pl
Nicholas Clark [Mon, 27 Sep 2010 10:00:43 +0000 (11:00 +0100)]
Move the generation of {START,END}_EXTERN_C from embed.fnc to embed.pl

13 years ago* Don't allow extra newlines in number type example in perlfaq4
brian d foy [Mon, 27 Sep 2010 15:45:19 +0000 (10:45 -0500)]
* Don't allow extra newlines in number type example in perlfaq4
    + How do I determine whether a scalar is a number/whole/integer/float?

13 years agoCorrect pod syntax in perldelta
Father Chrysostomos [Mon, 27 Sep 2010 14:05:03 +0000 (07:05 -0700)]
Correct pod syntax in perldelta

13 years agoAdd Aaron Crane’s other e-mail address to checkAUTHORS.pl
Father Chrysostomos [Mon, 27 Sep 2010 14:03:26 +0000 (07:03 -0700)]
Add Aaron Crane’s other e-mail address to checkAUTHORS.pl

13 years agoSkip ext/IPC-Open3/t/fd.t on stdio
Father Chrysostomos [Mon, 27 Sep 2010 13:47:43 +0000 (06:47 -0700)]
Skip ext/IPC-Open3/t/fd.t on stdio

13 years agoperldelta entry for mingw64 and gccversion
Father Chrysostomos [Mon, 27 Sep 2010 13:39:16 +0000 (06:39 -0700)]
perldelta entry for mingw64 and gccversion

13 years ago[perl #73374] gccversion not always set with MinGW
Sisyphus [Mon, 27 Sep 2010 13:34:48 +0000 (06:34 -0700)]
[perl #73374] gccversion not always set with MinGW

13 years agoClarification of perldelta entry for [perl #72434]
Father Chrysostomos [Mon, 27 Sep 2010 13:24:18 +0000 (06:24 -0700)]
Clarification of perldelta entry for [perl #72434]

13 years agoVersion bump and perldelta for Carp
Father Chrysostomos [Mon, 27 Sep 2010 13:21:53 +0000 (06:21 -0700)]
Version bump and perldelta for Carp

13 years ago[perl #78082] Carp.pm: Avoid autovivification of CORE::GLOBAL::caller
Aaron Crane [Mon, 27 Sep 2010 11:02:01 +0000 (12:02 +0100)]
[perl #78082] Carp.pm: Avoid autovivification of CORE::GLOBAL::caller

And add a test to prevent this happening again.

13 years agoDon't delete the *previous* perldelta in the clean target on VMS.
Craig A. Berry [Mon, 27 Sep 2010 12:23:13 +0000 (07:23 -0500)]
Don't delete the *previous* perldelta in the clean target on VMS.

Since only the current one is copied from perldelta.pod, deleting
the previous one makes it disappear completely.

13 years agoRemove redundant function macros from vms/vmsish.h.
Craig A. Berry [Mon, 27 Sep 2010 12:13:20 +0000 (07:13 -0500)]
Remove redundant function macros from vms/vmsish.h.

my_setenv, do_spawn, and do_aspawn are already in embed.h, though
they probably weren't when these were originally put in vmsish.h.

This change is a required follow-up to e64ca59f2852bc5d0450eea5ed412609a046829d;
without it the macro definitions differ in the non-multiplicity case.

13 years agoFix compilation with c++ compilers
Florian Ragwitz [Mon, 27 Sep 2010 07:05:17 +0000 (09:05 +0200)]
Fix compilation with c++ compilers

13 years ago[perl #72990] Mac OS X and setruid, etc.
Father Chrysostomos [Mon, 27 Sep 2010 05:27:29 +0000 (22:27 -0700)]
[perl #72990] Mac OS X and setruid, etc.

hints/darwin.sh pretends that setruid and similar functions do not
exist, as they were buggy in earlier versions of Mac OS X. Leopard and
Snow Leopard (I don’t know about Tiger) are fine. The attached patch
re-enables those on recent versions.

13 years agoperldelta for [perl #73754] and [perl #77362]
Father Chrysostomos [Mon, 27 Sep 2010 05:23:19 +0000 (22:23 -0700)]
perldelta for [perl #73754] and [perl #77362]

(77362 is the same as 36051)

13 years agoMake gv.t pass on systems that do not support -T $glob with stdio
Father Chrysostomos [Mon, 27 Sep 2010 05:17:42 +0000 (22:17 -0700)]
Make gv.t pass on systems that do not support -T $glob with stdio

13 years agoRevert "From: Todd Rinaldo <toddr@cpanel.net>"
Father Chrysostomos [Mon, 27 Sep 2010 03:34:15 +0000 (20:34 -0700)]
Revert "From: Todd Rinaldo <toddr@cpanel.net>"

This reverts commit 213a5d2cb3aa3b5c246b024e7e9c9903eba9decf.

13 years agoRevert "Add new Locale::Maketext files to MANIFEST"
Father Chrysostomos [Mon, 27 Sep 2010 03:33:19 +0000 (20:33 -0700)]
Revert "Add new Locale::Maketext files to MANIFEST"

This reverts commit 6797b0fef2e51d44193184687a5343e7bd3b5874.

13 years ago[perl #73754] Better error message for PerlIO layer implementations
Tye McQueen [Mon, 27 Sep 2010 01:35:39 +0000 (18:35 -0700)]
[perl #73754] Better error message for PerlIO layer implementations

please find attached a patch against blead originating from [1] ,
that improves the "Layer does not match this perl" error message by
telling the user which IO layer failed and how. I've tested the
patch against a recent bleadperl and even without the modifications
to perldiag.t all tests pass. Still, for completeness, I've patched
perldiag.t as well.

The code is not mine, it was written and posted by Tye McQueen, I've
just tested it [2] and ferry the information. I'm aware that this
patch is too late for 5.12 , but in the sense of improving Perl in
the long run, I hope the change still makes it into a version of
Perl.

-max

[1] http://perlmonks.org/?node_id=829815
[2] Certified Works On My Machine, 2010

13 years agoAdd new Locale::Maketext files to MANIFEST
Father Chrysostomos [Mon, 27 Sep 2010 01:29:57 +0000 (18:29 -0700)]
Add new Locale::Maketext files to MANIFEST

13 years agoFrom: Todd Rinaldo <toddr@cpanel.net>
Father Chrysostomos [Mon, 27 Sep 2010 01:27:03 +0000 (18:27 -0700)]
From: Todd Rinaldo <toddr@cpanel.net>

Locale::Maketext - Import dev changes from CPAN

This patch imports the changes which are on CPAN but not already
pulled into blead for Locale::Maketext.

1. New test file t/70_fail_auto.t - Test for CPAN RT #25877
2. Convert t/30_local.t to Test::More (the other files were already
   done in blead. This one was missed.
3. Add a cookbook pod file.
4. Changelog entries which were on CPAN but not in blead.

13 years ago#!perl -C -w dies
Father Chrysostomos [Mon, 27 Sep 2010 00:36:51 +0000 (17:36 -0700)]
#!perl -C -w dies

parse_unicode_opts expects to end on '\0'. So #!perl -C -w causes an
‘Unknown Unicode option letter ' '’ error. The attached
patch fixes it.

13 years agoData::Dumper version bump and perldelta
Father Chrysostomos [Sun, 26 Sep 2010 23:35:45 +0000 (16:35 -0700)]
Data::Dumper version bump and perldelta

13 years ago$ perl5.6.2 -MData::Dumper -le' Data::Dumper->Dumpxs([*{*STDERR{IO}}])'
Father Chrysostomos [Sun, 26 Sep 2010 21:28:31 +0000 (14:28 -0700)]
$ perl5.6.2 -MData::Dumper -le' Data::Dumper->Dumpxs([*{*STDERR{IO}}])'
Bus error
Same in 5.11.4.
This is related to bug 71254. It turns out that globs *can* stringify
emptily (see bug 65582). This patch makes DD more resilient.

13 years agoFix assertion triggered by 13be902ce ([perl #77362] glob-to-lv assign)
Father Chrysostomos [Sun, 26 Sep 2010 19:19:06 +0000 (12:19 -0700)]
Fix assertion triggered by 13be902ce ([perl #77362] glob-to-lv assign)

13 years ago[perl #77362] Assigning glob to lvalue causes stringification
Father Chrysostomos [Sun, 26 Sep 2010 18:09:28 +0000 (11:09 -0700)]
[perl #77362] Assigning glob to lvalue causes stringification

This test from t/op/gv.t was added by change 22315/4ce457a6:

{
    # test the assignment of a GLOB to an LVALUE
    my $e = '';
    local $SIG{__DIE__} = sub { $e = $_[0] };
    my $v;
    sub f { $_[0] = 0; $_[0] = "a"; $_[0] = *DATA }
    f($v);
    is ($v, '*main::DATA');
    my $x = <$v>;
    is ($x, "perl\n");
}

That change was the one that made glob-to-lvalue assignment work to
begin with. But this test passes in perl version *prior* to that
change.

This patch fixes the test and adds tests to make sure what is assigned
is actually a glob, and not just a string.

It also happens to fix the stringification bug. In doing so, it essen-
tially ‘enables’ globs-as-PVLVs.

It turns out that many different parts of the perl source don’t fully
take this into account, so this patch also fixes the following to work
with them (I tried to make these into separate patches, but they are
so intertwined it just got too complicated):

• GvIO(gv) to make readline and other I/O ops work.

• Autovivification of glob slots.

• tie *$pvlv

• *$pvlv = undef, *$pvlv = $number, *$pvlv = $ref

• Duplicating a filehandle accessed through a PVLV glob when the
  stringified form of the glob cannot be used to access the file
  handle (!)

• Using a PVLV glob as a subroutine reference

• Coderef assignment when the glob is no longer in the symbol table

• open with a PVLV glob for the filehandle

• -t and -T

• Unopened file handle warnings

13 years agoVersion bump and perldelta for IPC::Open3 and [perl #76474]
Father Chrysostomos [Sun, 26 Sep 2010 13:48:34 +0000 (06:48 -0700)]
Version bump and perldelta for IPC::Open3 and [perl #76474]

13 years agoAdd Vernon Lyon to AUTHORS
Father Chrysostomos [Sun, 26 Sep 2010 13:43:07 +0000 (06:43 -0700)]
Add Vernon Lyon to AUTHORS

13 years agotests for [perl #76474]
Father Chrysostomos [Sun, 26 Sep 2010 13:40:52 +0000 (06:40 -0700)]
tests for [perl #76474]

13 years ago[perl #76474]: IPC::Open3 doesn't handle file descriptors correctly
Vernon Lyon [Sun, 26 Sep 2010 13:34:58 +0000 (06:34 -0700)]
[perl #76474]: IPC::Open3 doesn't handle file descriptors correctly

In the POD docs it says:
"The filehandles may also be integers, in which case they are under-
stood as file descriptors."

However IPC::Open3 doesn't handle the file descriptors correctly.
As an example, if we try to dup STDIN in a child process by using it's
file descriptor, we get:

> perl -MIPC::Open3 -wle 'open3("<&1", my $out, undef, $^X)'
close() on unopened filehandle 1 at /usr/share/perl/5.10/IPC/Open3.pm line 70.
open3: close(1) failed: Bad file descriptor at -e line 1

This is because in IPC::Open3 the subroutines xpipe*, xclose* and
xopen don't cater for descriptors being passed in instead of
filehandles.

13 years agomerge XS-APItest-KeywordRPN into XS-APItest
Zefram [Thu, 23 Sep 2010 22:49:50 +0000 (23:49 +0100)]
merge XS-APItest-KeywordRPN into XS-APItest

XS-APItest-KeywordRPN has turned out to be less useful as an independent
module than expected, and less strictly about RPN than it originally was.

13 years agomake PL_charclass available to modules under Win32
Tony Cook [Sun, 26 Sep 2010 02:12:55 +0000 (12:12 +1000)]
make PL_charclass available to modules under Win32

13 years agoUpdate perldelta for if change
Chris 'BinGOs' Williams [Sat, 25 Sep 2010 23:12:52 +0000 (00:12 +0100)]
Update perldelta for if change

13 years agoUpgrade Digest::MD5 from version 2.40 to 2.50
Florian Ragwitz [Sat, 25 Sep 2010 22:34:14 +0000 (00:34 +0200)]
Upgrade Digest::MD5 from version 2.40 to 2.50

13 years agoUpdate if to CPAN version 0.06
Chris 'BinGOs' Williams [Sat, 25 Sep 2010 22:59:08 +0000 (23:59 +0100)]
Update if to CPAN version 0.06

  [DELTA]

  Change to the documented email address

13 years agoUpdate Joshua Pritikin’s e-mail address
Father Chrysostomos [Sat, 25 Sep 2010 20:14:23 +0000 (13:14 -0700)]
Update Joshua Pritikin’s e-mail address

13 years agoLocale::Maketext version bump; MANIFEST, ChangeLog, perldelta updates
Father Chrysostomos [Sat, 25 Sep 2010 19:20:28 +0000 (12:20 -0700)]
Locale::Maketext version bump; MANIFEST, ChangeLog, perldelta updates

13 years agoThis patch with tests resolves CPAN RT #40727. The issue is an infi-
Todd Rinaldo [Sat, 25 Sep 2010 18:20:10 +0000 (11:20 -0700)]
This patch with tests resolves CPAN RT #40727. The issue is an infi-
nite loop during _compile when working with tainted values. The issue
was triggered by perlbugs 60378,27344. Both have been resolved but
they are still broken in perl 5.12.x and earlier.

The patch simply assigns $_[1] to a variable and uses that
from then on.

13 years agoTry once more to fix sigtrap.t
Father Chrysostomos [Sat, 25 Sep 2010 18:15:35 +0000 (11:15 -0700)]
Try once more to fix sigtrap.t

It produces output like this:
lib/sigtrap....................................................sh: line 1: 66151 Abort trap              ./perl "-I../lib" -Msigtrap=INT -e 'sub { kill q-INT-, $$ } -> (3)' 2>&1
ok

And is effectively skipped on Windows.

So this new revision of the test
• calls the signal handler directly, instead of trying to trigger it
  with a signal and
• overrides kill globally to stop sigtrap.pm from aborting.

13 years agohandy.h: Fix so x2p compiles
Karl Williamson [Sat, 25 Sep 2010 15:07:03 +0000 (09:07 -0600)]
handy.h: Fix so x2p compiles

The recent series of commits on handy.h causes x2p to not compile.
These commits had some differences from what I submitted, in that they
moved the new table to a new header file instead of the submitted
perl.h.   Unfortunately, this bypasses code in perl.h that figures
out about duplicate definitions, and externs, and so fails on programs
that include handy.h but not perl.h.

This patch changes things so that the table lookup is not used unless
perl.h is included.  This is essentially my original patch, but adding
an #include of the new header file.

13 years agoFixed 5.14 release dates to have the correct year.
Jesse Vincent [Sat, 25 Sep 2010 12:39:13 +0000 (08:39 -0400)]
Fixed 5.14 release dates to have the correct year.

13 years agoRemove targets depending on the removed emacs/ dir
Florian Ragwitz [Sat, 25 Sep 2010 11:37:57 +0000 (13:37 +0200)]
Remove targets depending on the removed emacs/ dir

13 years agohandy.h: Add isFOO_L1() macros, using table lookup
Karl Williamson [Fri, 24 Sep 2010 05:14:58 +0000 (23:14 -0600)]
handy.h: Add isFOO_L1() macros, using table lookup

This patch adds *_L1() macros for character class lookup, using table
lookup for O(1) performance.  These force a Latin-1 interpretation on
ASCII platforms.

There were a couple existing macros that had the suffix U for Unicode
semantics.  I thought that those names might be confusing, so settled on
L1 as the least bad name.  The older names are kept as synonyms for
backward compatibility.  The problem with those names is that these are
actually macros, not functions, and hence can be called with any int,
including any Unicode code point.  The U suffix might be mistaken for
indicating they are more general purpose, whereas they are really only
valid for the latin1 subset of Unicode (including the EBCDIC isomorphs).
When called with something outside the latin1 range, they will return
false.

This patch necessitated rearranging a few things in the file.  I added
documentation for several more macros, and intend to document the rest.

(This commit was modified from its original form by Steffen.)

13 years agohandy.h: Make isWORDCHAR() primary documentation
Karl Williamson [Fri, 24 Sep 2010 03:26:47 +0000 (21:26 -0600)]
handy.h: Make isWORDCHAR() primary documentation

This macro is clearer as to intent over isALNUM, and isn't confusable
with isALNUMC.  So document it primarily.

13 years agohandy.h: Slightly change the pod
Karl Williamson [Fri, 24 Sep 2010 03:21:20 +0000 (21:21 -0600)]
handy.h: Slightly change the pod

13 years agohandy.h: alphabetize pod entries
Karl Williamson [Fri, 24 Sep 2010 03:12:51 +0000 (21:12 -0600)]
handy.h: alphabetize pod entries

There are a number of macros missing from the documentation.  This helps
me figure out which ones.

13 years agohandy.h: Change isFOO_A() to be O(1) performance
Karl Williamson [Fri, 24 Sep 2010 03:04:58 +0000 (21:04 -0600)]
handy.h: Change isFOO_A() to be O(1) performance

This patch changes the macros whose names end in _A to use table lookup
except for the one (isASCII) which always has only one comparison.

The table is in l1_char_class_tab.h.

The advantage of this is speed.  It replaces some fairly complicated
expressions with an O(1) look-up and a mask.

It uses the FITS_IN_8_BITS() macro to guarantee that the table bounds
are not exceeded.  For legal inputs that are byte size, the optimizer
should get rid of this macro leaving only the lookup and mask.

(This commit was changed from its original form by Steffen.)

13 years agoAdd 256 word bit table of character classes
Karl Williamson [Fri, 24 Sep 2010 02:47:03 +0000 (20:47 -0600)]
Add 256 word bit table of character classes

This patch adds a table for looking up character classes.  It is 256
words long, in l1_char_class_tab.h, with each word corresponding to the
ordinal of a Latin1 character, and each word contains a bit map of all
the properties that character matches.  Each property has a bit or two.
Ones named _CC_property_A are true only if the character is also in the
ASCII character set.  Ones named CC_property_L1 do not have this
restriction.  (L1 stands for Latin1.)

Also added is a script that generates the table.  It is not anticipated
that this will need to be used often.

(This commit was changed from its original form by Steffen.)

13 years agohandy.h: EBCDIC should use native isalpha()
Karl Williamson [Fri, 24 Sep 2010 02:42:40 +0000 (20:42 -0600)]
handy.h: EBCDIC should use native isalpha()

13 years agohandy.h: Add isFOO_A() macros for ASCII range matches
Karl Williamson [Fri, 24 Sep 2010 02:27:32 +0000 (20:27 -0600)]
handy.h: Add isFOO_A() macros for ASCII range matches

These macros return true only if the parameter is an ASCII character.

13 years agohandy.h: should use EBCDIC libc isdigit()
Karl Williamson [Thu, 23 Sep 2010 21:40:21 +0000 (15:40 -0600)]
handy.h: should use EBCDIC libc isdigit()

as is better optimized and suitable for the purpose.

13 years agohandy.h: move macro in file
Karl Williamson [Thu, 23 Sep 2010 21:08:06 +0000 (15:08 -0600)]
handy.h: move macro in file

13 years agoSubject: handy.h: Add isWORDCHAR() for clarity
Karl Williamson [Thu, 23 Sep 2010 20:40:42 +0000 (14:40 -0600)]
Subject: handy.h: Add isWORDCHAR() for clarity

The name isALNUM() is problematic, as it is very close to isALNUMC(),
and doesn't mean exactly what most people might think.  I presume the C
in isALNUMC stands for C language or libc, but am not sure.  Others
don't know either.  But in any event, isALNUM is different from the C
isalnum(), in that it matches the Perl concept of \w, which differs from
the C definition in exactly one place.  Perl includes the underscore
character, '_'.

So, I'm adding a isWORDCHAR() macro for future code to use to be more
clear.  I thought also about isWORD(), but I think confusion can arise
from thinking that means a whole word.  isWORDCHAR_L1() matches in the
Latin1 range, to be equivalent to isALNUMU().  The motivation for using
L1 instead of U will be explained in a commit message for the other L1
macros that are to be added.

13 years agoAdd a comment; clarify another
Karl Williamson [Thu, 23 Sep 2010 20:30:54 +0000 (14:30 -0600)]
Add a comment; clarify another

13 years agoIndent a comment better
Karl Williamson [Thu, 23 Sep 2010 20:27:57 +0000 (14:27 -0600)]
Indent a comment better

13 years agoSubject: handy.h: Reorder #defines alphabetically
Karl Williamson [Thu, 23 Sep 2010 20:26:51 +0000 (14:26 -0600)]
Subject: handy.h: Reorder #defines alphabetically

The only change here is that I sorted these #defines within their
groups, to make it much easier to follow what's going on.

13 years agohandy.h: isSPACE() is wrong for EBCDIC
Karl Williamson [Thu, 23 Sep 2010 20:14:09 +0000 (14:14 -0600)]
handy.h: isSPACE() is wrong for EBCDIC

It didn't include the Latin1 space components.

13 years agohandy.h: EBCDIC isBLANK() is wrong
Karl Williamson [Thu, 23 Sep 2010 19:57:51 +0000 (13:57 -0600)]
handy.h: EBCDIC isBLANK() is wrong

It doesn't include NBSP

13 years agohandy.h: isPSXSPC() is wrong for EBCDIC
Karl Williamson [Thu, 23 Sep 2010 19:45:58 +0000 (13:45 -0600)]
handy.h: isPSXSPC() is wrong for EBCDIC

The macro was using the ASCII definition, which doesn't include NEL nor
NBSP.  But, libc contains the correct definition, which is usable on
EBCDIC since we don't worry about locales there.

13 years agoSubject: handy.h: Move defn's outside #ifndef EBCDIC
Karl Williamson [Thu, 23 Sep 2010 19:41:52 +0000 (13:41 -0600)]
Subject: handy.h: Move defn's outside #ifndef EBCDIC

Commit 4125141464884619e852c7b0986a51eba8fe1636 improperly got rid of
EBCDIC handling, as it combined the ASCII and EBCDIC versions, but left
the result in the ASCII-only branch.  Just move to the common code.

13 years agocharnames.pm: reformat comments
Karl Williamson [Mon, 13 Sep 2010 04:19:54 +0000 (22:19 -0600)]
charnames.pm: reformat comments

Now that have less indent, don't need so many lines.  The only changes
in this commit are several blocks of comments to occupy more of each
line.  No wording changes are involved.

13 years agocharnames.pm: indent less to fit in 80 columns
Karl Williamson [Mon, 13 Sep 2010 04:17:35 +0000 (22:17 -0600)]
charnames.pm: indent less to fit in 80 columns

This patch changes white space only.  It lessens the indent of certain
lines that were made longer in an earlier commit, and now most of them
fit into 80 columns.

13 years agoTeach Perl about Unicode named character sequences
Karl Williamson [Mon, 13 Sep 2010 03:33:12 +0000 (21:33 -0600)]
Teach Perl about Unicode named character sequences

mktables is changed to process the Unicode named sequence file.
charnames.pm is changed to cache the looked-up values in utf8.  A new
function, string_vianame is created that can handle named sequences, as
the interface for vianame cannot.  The subroutine lookup_name() is
slightly refactored to do almost all of the common work for \N{} and the
vianame routines.  It now understands named sequences as created my
mktables..

tests and documentation are added.  In the randomized testing section,
half use vianame() and half string_vianame().

13 years agocharnames.pm: Nits in pod
Karl Williamson [Sun, 12 Sep 2010 18:46:07 +0000 (12:46 -0600)]
charnames.pm: Nits in pod

13 years agoperlrecharclass.pod: Add caveat about multi-char sequences
Karl Williamson [Sun, 12 Sep 2010 16:47:56 +0000 (10:47 -0600)]
perlrecharclass.pod: Add caveat about multi-char sequences

Inside a bracketed character class, any \N{name} which expands to more
than one character will have only the first one considered.  This
doesn't need named character sequences, as user-defined aliases have
long been able to be multi-char.

13 years agocharnames.pm: Clarify comments
Karl Williamson [Sun, 12 Sep 2010 16:27:36 +0000 (10:27 -0600)]
charnames.pm: Clarify comments

13 years agocharnames.t: Add output message
Karl Williamson [Sun, 12 Sep 2010 15:50:15 +0000 (09:50 -0600)]
charnames.t: Add output message

13 years agocharnames.t: Clarify message
Karl Williamson [Sat, 11 Sep 2010 19:35:23 +0000 (13:35 -0600)]
charnames.t: Clarify message

13 years agocharnames.t: Clarify value is hex
Karl Williamson [Sat, 11 Sep 2010 19:11:44 +0000 (13:11 -0600)]
charnames.t: Clarify value is hex

13 years agocharnames.t: Add tests for NameAliases
Karl Williamson [Sat, 11 Sep 2010 19:10:37 +0000 (13:10 -0600)]
charnames.t: Add tests for NameAliases

13 years agoFix casing, wording
Karl Williamson [Sat, 11 Sep 2010 17:17:03 +0000 (11:17 -0600)]
Fix casing, wording

13 years agoFix spelling
Karl Williamson [Sat, 11 Sep 2010 15:20:04 +0000 (09:20 -0600)]
Fix spelling

13 years agocharnames.pm: Change variable name
Karl Williamson [Fri, 10 Sep 2010 17:38:25 +0000 (11:38 -0600)]
charnames.pm: Change variable name

This is an intermediate commit in preparation for handling named
sequences

13 years agocharnames.t: Add code so can test 100% of names
Karl Williamson [Fri, 10 Sep 2010 16:47:47 +0000 (10:47 -0600)]
charnames.t: Add code so can test 100% of names

If the percentage of characters to test is changed to 100%, add code to
make the block size 1.  This guarantees each character gets tested in
spite of randomness

13 years agocharnames.t: clarify comments
Karl Williamson [Fri, 10 Sep 2010 16:47:15 +0000 (10:47 -0600)]
charnames.t: clarify comments

13 years agocharnames.t: Don't call srand(undef)
Karl Williamson [Fri, 10 Sep 2010 00:06:22 +0000 (18:06 -0600)]
charnames.t: Don't call srand(undef)

srand(undef) is the same as srand(0).  The code is trying to get random
seeds, not a fixed one.

13 years agocharnames: Remove unnecessary \t in Name.pl
Karl Williamson [Thu, 9 Sep 2010 23:50:16 +0000 (17:50 -0600)]
charnames: Remove unnecessary \t in Name.pl

The double \t\t is unnecessary, and so we can remove one of them,
shortening the table.

13 years agocharnames.pm: Small performance enhancements
Karl Williamson [Thu, 9 Sep 2010 23:16:53 +0000 (17:16 -0600)]
charnames.pm: Small performance enhancements

mktables is changed to output 5 digit code points, which means that
charnames doesn't have to go looking for the boundaries, which gives a
slight performance enhancement.

13 years agomktables: Remove stubbed out code
Karl Williamson [Thu, 9 Sep 2010 22:34:55 +0000 (16:34 -0600)]
mktables: Remove stubbed out code

This commented out code will never be used, as a different solution was
done in charnames.

It was to automatically handle parenthesized character names.  Unicode
is extremely unlikely to ever add new names like this, and all the
existing names are now hard-coded in charnames.pm

13 years agoUse the same $func to Perl_$func macros independent of multiplicity.
Nicholas Clark [Wed, 22 Sep 2010 15:31:16 +0000 (16:31 +0100)]
Use the same $func to Perl_$func macros independent of multiplicity.

The macros of the form #define foo(a, b) Perl_foo(aTHX_ a, b) will also work
under non-multiplicity. There's no issue with adding explicit arguments in
the non-multiplicity case, because it changes one form of compile-time error
into another. (Function Perl_foo passed the wrong number of arguments into
macro foo passed the wrong number of arguments.)

13 years agoMake the new sigtrap.t test more tolerant of OS differences
Father Chrysostomos [Sat, 25 Sep 2010 06:12:00 +0000 (23:12 -0700)]
Make the new sigtrap.t test more tolerant of OS differences

13 years agodefine SvTRUE_nomg for compilers other than gcc
Father Chrysostomos [Sat, 25 Sep 2010 05:22:26 +0000 (22:22 -0700)]
define SvTRUE_nomg for compilers other than gcc

This time I *really* broke the Windows build!

13 years agoperldelta entries for the double-magic fixes [perl #76814]
Father Chrysostomos [Sat, 25 Sep 2010 03:42:54 +0000 (20:42 -0700)]
perldelta entries for the double-magic fixes [perl #76814]

13 years ago[perl #76814] FETCH called twice - y
Father Chrysostomos [Sat, 25 Sep 2010 03:33:47 +0000 (20:33 -0700)]
[perl #76814] FETCH called twice - y

This patch stops y from calling get-magic twice. (This has caused
double magick since as far back as 5.6.2.)

13 years ago[perl #76814] FETCH called twice - m and s
Father Chrysostomos [Sat, 25 Sep 2010 03:33:42 +0000 (20:33 -0700)]
[perl #76814] FETCH called twice - m and s

This fixes m and s. It modifies pp_regcomp to avoid extra magic. It
also corrects a bug in sv_catsv_flags, which would still call
mg_get(ssv) even without the SV_GMAGIC flag set.

13 years ago[perl #76814] FETCH called twice - !
Father Chrysostomos [Sat, 25 Sep 2010 03:33:03 +0000 (20:33 -0700)]
[perl #76814] FETCH called twice - !

This fixes ! by changing sv_2bool to sv_2bool_flags (with a macro
wrapper) and adding SvTRUE_nomg. It also corrects the docs that state
incorrectly that SvTRUE does not handle magic.

13 years ago[perl #76814] FETCH called twice - string comparison ops
Father Chrysostomos [Sat, 25 Sep 2010 03:31:28 +0000 (20:31 -0700)]
[perl #76814] FETCH called twice - string comparison ops

This patch changes sv_eq, sv_cmp, sv_cmp_locale and sv_collxfrm
to _flags forms, with macros under the old names for sv_eq and
sv_collxfrm, but functions for sv_cmp* since pp_sort.c needs them.

13 years agoCommitting the current freeze and release plan for 5.14. khw++ for
Jesse Vincent [Fri, 24 Sep 2010 23:20:29 +0000 (19:20 -0400)]
Committing the current freeze and release plan for 5.14.  khw++ for
noticing that I'd failed to do this after conference season.

13 years agoFis various Math::BigInt spelling mistakes
gregor herrmann [Fri, 24 Sep 2010 20:17:34 +0000 (22:17 +0200)]
Fis various Math::BigInt spelling mistakes

13 years ago[perl #78000] [PATCH] Upgrade to threads 1.79
Jerry D. Hedden [Fri, 24 Sep 2010 20:42:04 +0000 (21:42 +0100)]
[perl #78000] [PATCH] Upgrade to threads 1.79

  Attached is a revised patch to upgrade to v1.79.  I needed to fix
  the tests in the newly added t/kill2.t file.  The blead version will
  be 1.79_01.

13 years agoModify a utf8.t test in anticipation of a fix for [perl #74022]
Father Chrysostomos [Fri, 24 Sep 2010 19:28:36 +0000 (12:28 -0700)]
Modify a utf8.t test in anticipation of a fix for [perl #74022]

In anticipation of a fix for [perl #74022], this patch corrects the
test for q·foo· in utf8.t to use ¡ instead of ·. I’ve also moved the
test outside of the eval, so it will still run (and fail) if the com-
pilation fails, instead of causing an invalid test count.

13 years agofix typo in perl5135delta
David Golden [Fri, 24 Sep 2010 18:03:49 +0000 (18:03 +0000)]
fix typo in perl5135delta

13 years agoperldelta: Note Perl version of regexp_pattern()
Karl Williamson [Fri, 24 Sep 2010 14:46:12 +0000 (08:46 -0600)]
perldelta: Note Perl version of regexp_pattern()

perldelta suggests using this, but it didn't come into being until
5.9.5, so cpan modules may not be able to use it.

13 years agoAdd a warning to test.pl if quotes are used in one-liners.
Nicholas Clark [Fri, 24 Sep 2010 10:46:41 +0000 (11:46 +0100)]
Add a warning to test.pl if quotes are used in one-liners.

Fix all the tests that were using quotes, and (by implication) working
because barewords are treated as strings, and one-liners aren't run under
strict.

13 years agoAvoid using double quotes in a one-liner runperl.
Nicholas Clark [Fri, 24 Sep 2010 10:22:24 +0000 (11:22 +0100)]
Avoid using double quotes in a one-liner runperl.

test.pl uses "" for command line quoting on Win32, VMS and NetWare, '' on *nix.
Hence what "works on my machine" on *nix may not work elsewhere.