This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
13 years agore.t: Suppress warning
Karl Williamson [Wed, 29 Sep 2010 16:46:02 +0000 (10:46 -0600)]
re.t: Suppress warning

13 years agoAdd test against re-eval corrupting regexp state
Andrew Rodland [Wed, 29 Sep 2010 17:59:12 +0000 (19:59 +0200)]
Add test against re-eval corrupting regexp state

13 years agoLocalize PL_reg_state during re_evals
Florian Ragwitz [Sun, 19 Sep 2010 23:17:34 +0000 (01:17 +0200)]
Localize PL_reg_state during re_evals

13 years agoWhen generating embed.h, return early if an embed.fnc entry causes no output.
Nicholas Clark [Wed, 29 Sep 2010 12:48:00 +0000 (13:48 +0100)]
When generating embed.h, return early if an embed.fnc entry causes no output.

This removes several adjacent empty pairs of #ifdef/#endif.

13 years agoIn embed.pl, tweak the deduplication logic for global.sym
Nicholas Clark [Wed, 29 Sep 2010 12:26:21 +0000 (13:26 +0100)]
In embed.pl, tweak the deduplication logic for global.sym

It is now independent on the ordering of embed.fnc. Previously if there were
alternative implementations of a function, the version that was exported had
to come first, else that symbol was skipped.

13 years agoNormalise all the pre-processor directives in embed.h and proto.h
Nicholas Clark [Wed, 29 Sep 2010 10:10:49 +0000 (11:10 +0100)]
Normalise all the pre-processor directives in embed.h and proto.h

Remove all whitespace after the #
Change #ifdef to #if defined and #ifndef to #if !defined

13 years agoCheck that all lines in embed.fnc are either functions or known CPP directives.
Nicholas Clark [Wed, 29 Sep 2010 09:56:05 +0000 (10:56 +0100)]
Check that all lines in embed.fnc are either functions or known CPP directives.

13 years ago[perl #71714] Remove redundant stat from Win32's opendir()
Alex Davies [Wed, 29 Sep 2010 15:29:55 +0000 (08:29 -0700)]
[perl #71714] Remove redundant stat from Win32's opendir()

Here's a patch that removes an unnecesary call to win32_stat() by
the opendir code on Win32. This provides a noticeable speed up when
recursively traversing a directory eg. calls to File::Find::find().

Note it does change behaviour in the following cases:

1. The patch makes directory names longer than MAX_PATH fail and
sets errno to ENAMETOOLONG ("Filename too long"). Currently, in
this case errno is not actually set in win32_opendir.

2. If the directory is actually a regular file then currently errno
is not set, and so (as in case 1) errno ends up being set to EBADF.
The patched version will 'fail' via the same code path as if it's
just a non existant file/directory name (FindFirstFile will return
ERROR_PATH_NOT_FOUND) and so errno gets set to ENOENT.

13 years agoRemove unused variable $wrote_protected from embed.pl
Nicholas Clark [Wed, 29 Sep 2010 15:18:50 +0000 (16:18 +0100)]
Remove unused variable $wrote_protected from embed.pl

This was added in 0cb9638729211ea7 and has never actually been used.

13 years agoIn embed.pl, directly iterate @embed to generate proto.h
Nicholas Clark [Wed, 29 Sep 2010 15:10:19 +0000 (16:10 +0100)]
In embed.pl, directly iterate @embed to generate proto.h

This replaces calling walk_table() with a file handle and a reference to
&write_protos.

13 years agoUpdate Archive-Extract to CPAN version 0.44
Chris 'BinGOs' Williams [Wed, 29 Sep 2010 15:00:27 +0000 (16:00 +0100)]
Update Archive-Extract to CPAN version 0.44

  [DELTA]

  Changes for 0.44    Wed Sep 29 15:51:26 2010
  ============================================
  * Apply a patch from brian d foy that adds a
    debug() method for $DEBUG output.

13 years agoSkip the blank lines when processing embed.fnc
Nicholas Clark [Wed, 29 Sep 2010 09:51:11 +0000 (10:51 +0100)]
Skip the blank lines when processing embed.fnc

This has the side effect of simplifying the generated embed.h and proto.h

13 years agoChange embed.fnc's vi modeline comment from /* */ to :
Nicholas Clark [Wed, 29 Sep 2010 09:27:55 +0000 (10:27 +0100)]
Change embed.fnc's vi modeline comment from /* */ to :

This means that it isn't (needlessly) copied into proto.h

13 years agoRemove the {START,END}_EXTERN_C macros from within embed.fnc
Nicholas Clark [Wed, 29 Sep 2010 09:09:37 +0000 (10:09 +0100)]
Remove the {START,END}_EXTERN_C macros from within embed.fnc

These, and the "functions with flag 'n' should come before here" comments are
holdouts from the long-gone PERL_OBJECT implementation. This doesn't change
the linkage type of any externally visible functions under g++ - just some
static functions. This follows on from 77d8c8d52bcb3950.

13 years agoRevert "[perl #77928] Glob slot assignment and set-magic"
Father Chrysostomos [Wed, 29 Sep 2010 06:41:43 +0000 (23:41 -0700)]
Revert "[perl #77928] Glob slot assignment and set-magic"

This reverts commit cffb36981555111f364a511fb5763f65ea748c0e.

13 years agoFix typo in perlpolicy.pod
Steffen Mueller [Wed, 29 Sep 2010 06:50:34 +0000 (08:50 +0200)]
Fix typo in perlpolicy.pod

13 years ago[perl #22193] Clarify references to ‘use integer’ in perlop
Casey West [Wed, 29 Sep 2010 03:11:30 +0000 (20:11 -0700)]
[perl #22193] Clarify references to ‘use integer’ in perlop

13 years agoperldelta entry for [perl #78058] qr/\88/ hangs
Father Chrysostomos [Tue, 28 Sep 2010 21:50:15 +0000 (14:50 -0700)]
perldelta entry for [perl #78058] qr/\88/ hangs

13 years agoregcomp.c [perl #78058] qr/\18/ loops
Karl Williamson [Tue, 28 Sep 2010 20:44:08 +0000 (14:44 -0600)]
regcomp.c [perl #78058] qr/\18/ loops

This patch restores the behavior of /\18/ to mean /\0018/, which was
inadvertently changed by c99e91e919b4bb89bab7829a9026ee01b1fff2a1.

This bug happens when t the first digit is [1-9], and the
second [89].

13 years agoAdded our support policy to perlpolicy.pod.
Jesse Vincent [Tue, 28 Sep 2010 22:16:55 +0000 (18:16 -0400)]
Added our support policy to perlpolicy.pod.

13 years ago[perl #71998] overload::Method can die with blessed methods
Father Chrysostomos [Tue, 28 Sep 2010 20:53:51 +0000 (13:53 -0700)]
[perl #71998] overload::Method can die with blessed methods

If an overload method is itself blessed into a class that has
overloaded operators but does not have fallback enabled, then an error
is produced:

$ perl5.10.0
use overload '+' => sub{};
bless overload::Method main => '+';
overload::Method main => '+';
^D
Operation "ne": no method found,
left argument in overloaded package main,
right argument has no overloaded magic at /usr/local/lib/perl5/5.10.0/
overload.pm line 59.

The attached patch fixes this.

13 years agosystematically provide pv/pvn/pvs/sv quartets
Zefram [Sat, 11 Sep 2010 18:36:10 +0000 (19:36 +0100)]
systematically provide pv/pvn/pvs/sv quartets

Anywhere an API function takes a string in pvn form, ensure that there
are corresponding pv, pvs, and sv APIs.

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 agoLocale::Maketext - Import dev changes from CPAN
Todd Rinaldo [Tue, 28 Sep 2010 17:28:50 +0000 (12:28 -0500)]
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. Fix for RT25877 (Logic fix tested in 70_fail_auto.t)
3. Convert t/30_local.t to Test::More (the other files were already
   done in blead. This one was missed.
4. Add a cookbook pod file.
5. Changelog entries which were on CPAN but not in blead.

13 years agoperl RT# 76668 - This patch resolves CPAN RT #48808.
Todd Rinaldo [Tue, 28 Sep 2010 17:19:58 +0000 (12:19 -0500)]
perl RT# 76668 - This patch resolves CPAN RT #48808.
This change:
1. loads I18N::LangTags::Detect in BEGIN rather than whenever _ambient_langprefs is called
2. Removes the version number requirement for I18N::LangTags. Detect didn't come around until 0.31 so a dep on 0.30 is unnecessary.

This will assure any load issues with I18N::LangTags::Detect happen at BEGIN, not randomly somewhere in the program.

This does increase the dependency on I18N::LangTags from 0.30 to 0.31, but the release dates are as follows, so I don't think it's a big deal:

0.30 - 2004-03-30 Sean M. Burke sburke@cpan.org
0.31 - 2004-06-17 Sean M. Burke sburke@cpan.org

13 years ago[perl #76674] Locale::Maketext: speed and efficiency tweaks
Todd Rinaldo [Tue, 28 Sep 2010 18:13:33 +0000 (11:13 -0700)]
[perl #76674] Locale::Maketext: speed and efficiency tweaks

Check string to compile for chars ~][ and return \"$string" if not found.
This is a 250% speed improvement on strings which don't require compile and only a
~2% hit if they did need compiling.

Remove \G since everything is being captured it has no value. This means we don't
have to worry about seting pos $string_to_compile = 0 to prevent the previous
regex from affecting this one. There is a negligible speed improvement removing
the \G

13 years ago[perl #77928] Glob slot assignment and set-magic
Father Chrysostomos [Tue, 28 Sep 2010 15:47:07 +0000 (08:47 -0700)]
[perl #77928] Glob slot assignment and set-magic

Stop set-magic from being called after ref-to-glob assignment.

13 years agoUpgrade Locale-Codes from 3.13 to 3.14
Sullivan Beck [Tue, 28 Sep 2010 16:18:50 +0000 (12:18 -0400)]
Upgrade Locale-Codes from 3.13 to 3.14

(With +x permissions removed from tests by committer.)

13 years agoA test to check that regen.pl doesn't need running.
Nicholas Clark [Tue, 28 Sep 2010 15:50:26 +0000 (16:50 +0100)]
A test to check that regen.pl doesn't need running.

We can't run regen.pl as part of the build, as we'd end up with a circular
dependency between the headers and miniperl.

13 years agoMention t/op/threads-dirh.t in perldelta
Father Chrysostomos [Tue, 28 Sep 2010 05:22:47 +0000 (22:22 -0700)]
Mention t/op/threads-dirh.t in perldelta

13 years agoperldelta for [perl #75174] (dirp_dup)
Father Chrysostomos [Tue, 28 Sep 2010 05:19:15 +0000 (22:19 -0700)]
perldelta for [perl #75174] (dirp_dup)

13 years agoUpdate the dirhandle entry in thread.pm’s docs
Father Chrysostomos [Tue, 28 Sep 2010 04:42:13 +0000 (21:42 -0700)]
Update the dirhandle entry in thread.pm’s docs

13 years agoModify the Perl_dirp_dup entry in perltodo
Father Chrysostomos [Tue, 28 Sep 2010 04:37:58 +0000 (21:37 -0700)]
Modify the Perl_dirp_dup entry in perltodo

13 years agoRemove a wrong +x bit
Florian Ragwitz [Tue, 28 Sep 2010 04:56:59 +0000 (06:56 +0200)]
Remove a wrong +x bit

13 years agoUpgrade Math::BigInt from version 1.95 to 1.96
Florian Ragwitz [Tue, 28 Sep 2010 04:44:39 +0000 (06:44 +0200)]
Upgrade Math::BigInt from version 1.95 to 1.96

13 years ago[perl #75174] Clone dir handles
Father Chrysostomos [Tue, 28 Sep 2010 04:30:49 +0000 (21:30 -0700)]
[perl #75174] Clone dir handles

On systems that support fchdir, use it to clone dir handles.

On other systems, at least for now, don’t give the new thread a copy
of the handle. This is not ideal, but better than crashing.

13 years agoperldelta entry for [perl #72990] Mac OS X and setruid, etc.
Father Chrysostomos [Tue, 28 Sep 2010 04:29:15 +0000 (21:29 -0700)]
perldelta entry for [perl #72990] Mac OS X and setruid, etc.

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