This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Karl Williamson [Sun, 3 Oct 2010 16:19:23 +0000 (10:19 -0600)]
Small efficiency nit for regcurly()
As previously written, a test was executed unnecessarily
Karl Williamson [Sun, 3 Oct 2010 16:18:27 +0000 (10:18 -0600)]
toke.c: call regcurly instead of duplicating code
Remove code that duplicates regcurly()
David Mitchell [Sun, 3 Oct 2010 19:50:20 +0000 (20:50 +0100)]
better documentation for eval_sv() and G_KEEPERR
David Mitchell [Sun, 3 Oct 2010 19:36:36 +0000 (20:36 +0100)]
G_KEEPERR sometimes set $@
eval_sv(sv,G_KEEPERR) is supposed to warn on errors, rather than
set $@; but in the particular case of compile-time errors it still
set $@ instead. See [perl ##3719].
David Mitchell [Sat, 2 Oct 2010 10:13:09 +0000 (11:13 +0100)]
eval_sv() and eval_pv() don't fail on syntax err
[perl #3719] eval_sv("some syntax err") cleared $@ and didn't return
a failure indication. This also affected eval_pv() which calls eval_sv().
Fix this and add lots of tests.
Father Chrysostomos [Sun, 3 Oct 2010 17:46:52 +0000 (10:46 -0700)]
Avoid downgrading GVs during global destruction
Recently we’ve been getting assertions from gv.t like this:
Assertion failed: (SvTYPE(sv) != SVTYPEMASK), function Perl_sv_clear, file sv.c, line 5783.
This only happens in non-threaded builds and with PERL_DESTRUCT_LEVEL
set to 2 (as in make test).
These started with 13be902 (lvalue-to-glob assignment), but only
because of the tests it added.
The real cause turns out to be f746176, which introduced
gv_try_downgrade.
If a subroutine contains an op that references a downgradable GV, then
gv_try_downgrade, if called on that GV during global destruction,
*might* leave dangling pointers elsewhere; where exactly I wot not.
Since memory-saving operations such as this downgrading are questiona-
ble anyway durng global destruction, skip it, at least for now.
Walt Mankowski [Sun, 3 Oct 2010 02:04:22 +0000 (22:04 -0400)]
Fixed typos -- replaced "the the" with "the"
Walt Mankowski [Sun, 3 Oct 2010 02:22:00 +0000 (22:22 -0400)]
Fixed typo -- replaced "the the" with "the"
Walt Mankowski [Sun, 3 Oct 2010 02:30:42 +0000 (22:30 -0400)]
Fixed typo -- changed "it's code point" to "its code point"
Chris 'BinGOs' Williams [Sat, 2 Oct 2010 10:18:42 +0000 (11:18 +0100)]
Update Unicode-Collate to CPAN version 0.61
[DELTA]
0.61 Sat Oct 2 11:41:29 2010
- U::C::Locale newly supports locales: hr, ig, sq.
- precomposites of e-dot-below, o-dot-below, o-tilde are tailored as well.
(affected locales: et, yo)
- Vietnamese (vi): added contractions for non-blocked decompositions
* base + dot-below + diacritical such as "a\x{323}\x{306} etc.
* base + tone + horn such as "o\x{300}\x{31B}" etc.
Craig A. Berry [Fri, 1 Oct 2010 15:39:46 +0000 (10:39 -0500)]
strictify vms/gen_shrfls.pl.
Tony Cook [Fri, 1 Oct 2010 08:58:37 +0000 (18:58 +1000)]
rt 76474: Avoid the child perl reading from stdout
FD 1 is stdout, and the "<&1" redirect in the test sets the child to
read from its parent's stdout, on Linux (and presumably OS X) doesn't
let you read from stdout, but FreeBSD does, without the -e perl will
try to read its program from stdin, so provide one.
Father Chrysostomos [Fri, 1 Oct 2010 06:48:56 +0000 (23:48 -0700)]
[perl #48332] Debugger corrupts symbol table munging
This reverts commit
92adfbd49af0758bcc9a198cf2df2bd78c4176b9, which
removed a necessary assignment for the sake of consting.
In doing so, it allows subroutine redefinition to work properly again
in the debugger.
Florian Ragwitz [Thu, 30 Sep 2010 22:15:01 +0000 (00:15 +0200)]
Upgrade Digest::MD5 from version 2.50 to 2.51
Karl Williamson [Thu, 30 Sep 2010 04:43:32 +0000 (22:43 -0600)]
[perl #77952] regcomp.c compiler warnings
These were that longjmp calls could clobber certain variables.
Initializing the variables after the place that longjmp returns to
causes the warnings to disappear.
Nicholas Clark [Thu, 30 Sep 2010 10:31:40 +0000 (11:31 +0100)]
Merge adjacent #ifndef PERL_IMPLICIT_CONTEXT blocks in embed.h
Nicholas Clark [Thu, 30 Sep 2010 10:19:59 +0000 (11:19 +0100)]
Remove empty #if/#endif pairs from embed.h
Ævar Arnfjörð Bjarmason [Thu, 30 Sep 2010 09:57:44 +0000 (09:57 +0000)]
perlretut: incorrect output in "Non-capturing groupings"
Change the example split output in a "Non-capturing groupings" example
from ('12','a','34','b','5') to ('12','a','34','a','5'). This way
it'll match the example code that goes along with it:
split /(a|b)+/, "
12aba34ba5"
Reported-by: Antonio Bonifati <antonio.bonifati@gmail.com>
Nicholas Clark [Wed, 29 Sep 2010 16:18:51 +0000 (17:18 +0100)]
Sort embed.fnc by CPP macro and then function name, before generating files.
Additionally, sort embed.h by public API, then core-or-ext, and finally core
only. This reduces the number of #if/#endif pairs in embed.h and proto.h
Craig A. Berry [Thu, 30 Sep 2010 03:37:00 +0000 (22:37 -0500)]
Don't export symbols for routines that don't exist.
The excluded routines are aliases, and while there are a lot of
aliases, most of them also exist in mathoms.c so there are actual
symbols to link against. These don't and aren't.
Before
a4e744802906bbf8435494e7f5ab1823213b2448, there were quite
a few Perl_pp_xxx and Perl_ck_xxx symbols that were not getting
collected here.
Karl Williamson [Wed, 29 Sep 2010 19:50:52 +0000 (13:50 -0600)]
[perl #78040] regcomp.c: malloc enough space
Commit
9de15fec376a8ff90a38fad0ff322c72c2995765 introduced /u, /d, and
/l regex modifiers. Unfortunately, I forgot to adequately account for
them in the space required for the stringification of the regex.
This patch figures out separately if the caret is needed, and if one of
these charset modifiers is needed, and allocates space accordingly.
I could not figure out a simple test case for this fix. valgrind
prior to this will show errors, and after this doesn't.
Florian Ragwitz [Thu, 30 Sep 2010 00:21:14 +0000 (02:21 +0200)]
Fix typo spotted by avar++
Florian Ragwitz [Wed, 29 Sep 2010 23:45:16 +0000 (01:45 +0200)]
Document why we're not using the save stack
Karl Williamson [Wed, 29 Sep 2010 16:46:02 +0000 (10:46 -0600)]
re.t: Suppress warning
Andrew Rodland [Wed, 29 Sep 2010 17:59:12 +0000 (19:59 +0200)]
Add test against re-eval corrupting regexp state
Florian Ragwitz [Sun, 19 Sep 2010 23:17:34 +0000 (01:17 +0200)]
Localize PL_reg_state during re_evals
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.
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.
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
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.
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.
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.
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.
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.
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
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
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.
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.
Steffen Mueller [Wed, 29 Sep 2010 06:50:34 +0000 (08:50 +0200)]
Fix typo in perlpolicy.pod
Casey West [Wed, 29 Sep 2010 03:11:30 +0000 (20:11 -0700)]
[perl #22193] Clarify references to ‘use integer’ in perlop
Father Chrysostomos [Tue, 28 Sep 2010 21:50:15 +0000 (14:50 -0700)]
perldelta entry for [perl #78058] qr/\88/ hangs
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].
Jesse Vincent [Tue, 28 Sep 2010 22:16:55 +0000 (18:16 -0400)]
Added our support policy to perlpolicy.pod.
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.
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.
Father Chrysostomos [Mon, 27 Sep 2010 01:29:57 +0000 (18:29 -0700)]
Add new Locale::Maketext files to MANIFEST
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.
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
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
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.
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.)
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.
Father Chrysostomos [Tue, 28 Sep 2010 05:22:47 +0000 (22:22 -0700)]
Mention t/op/threads-dirh.t in perldelta
Father Chrysostomos [Tue, 28 Sep 2010 05:19:15 +0000 (22:19 -0700)]
perldelta for [perl #75174] (dirp_dup)
Father Chrysostomos [Tue, 28 Sep 2010 04:42:13 +0000 (21:42 -0700)]
Update the dirhandle entry in thread.pm’s docs
Father Chrysostomos [Tue, 28 Sep 2010 04:37:58 +0000 (21:37 -0700)]
Modify the Perl_dirp_dup entry in perltodo
Florian Ragwitz [Tue, 28 Sep 2010 04:56:59 +0000 (06:56 +0200)]
Remove a wrong +x bit
Florian Ragwitz [Tue, 28 Sep 2010 04:44:39 +0000 (06:44 +0200)]
Upgrade Math::BigInt from version 1.95 to 1.96
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.
Father Chrysostomos [Tue, 28 Sep 2010 04:29:15 +0000 (21:29 -0700)]
perldelta entry for [perl #72990] Mac OS X and setruid, etc.
Slaven Rezic [Mon, 27 Sep 2010 10:36:58 +0000 (12:36 +0200)]
[perl #74798] test Data::Dumper with all latin1 characters
Father Chrysostomos [Mon, 27 Sep 2010 23:48:57 +0000 (16:48 -0700)]
Fix IPC::Open3’s fd.t to work on Windows
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.
Andy Dougherty [Mon, 27 Sep 2010 18:01:45 +0000 (14:01 -0400)]
Remove empty preprocessor directive in embed.fnc
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.
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
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?
Father Chrysostomos [Mon, 27 Sep 2010 14:05:03 +0000 (07:05 -0700)]
Correct pod syntax in perldelta
Father Chrysostomos [Mon, 27 Sep 2010 14:03:26 +0000 (07:03 -0700)]
Add Aaron Crane’s other e-mail address to checkAUTHORS.pl
Father Chrysostomos [Mon, 27 Sep 2010 13:47:43 +0000 (06:47 -0700)]
Skip ext/IPC-Open3/t/fd.t on stdio
Father Chrysostomos [Mon, 27 Sep 2010 13:39:16 +0000 (06:39 -0700)]
perldelta entry for mingw64 and gccversion
Sisyphus [Mon, 27 Sep 2010 13:34:48 +0000 (06:34 -0700)]
[perl #73374] gccversion not always set with MinGW
Father Chrysostomos [Mon, 27 Sep 2010 13:24:18 +0000 (06:24 -0700)]
Clarification of perldelta entry for [perl #72434]
Father Chrysostomos [Mon, 27 Sep 2010 13:21:53 +0000 (06:21 -0700)]
Version bump and perldelta for Carp
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.
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.
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.
Florian Ragwitz [Mon, 27 Sep 2010 07:05:17 +0000 (09:05 +0200)]
Fix compilation with c++ compilers
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.
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)
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
Father Chrysostomos [Mon, 27 Sep 2010 03:34:15 +0000 (20:34 -0700)]
Revert "From: Todd Rinaldo <toddr@cpanel.net>"
This reverts commit
213a5d2cb3aa3b5c246b024e7e9c9903eba9decf.
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.
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
Father Chrysostomos [Mon, 27 Sep 2010 01:29:57 +0000 (18:29 -0700)]
Add new Locale::Maketext files to MANIFEST
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.
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.
Father Chrysostomos [Sun, 26 Sep 2010 23:35:45 +0000 (16:35 -0700)]
Data::Dumper version bump and perldelta
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.
Father Chrysostomos [Sun, 26 Sep 2010 19:19:06 +0000 (12:19 -0700)]
Fix assertion triggered by
13be902ce ([perl #77362] glob-to-lv assign)
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
Father Chrysostomos [Sun, 26 Sep 2010 13:48:34 +0000 (06:48 -0700)]
Version bump and perldelta for IPC::Open3 and [perl #76474]
Father Chrysostomos [Sun, 26 Sep 2010 13:43:07 +0000 (06:43 -0700)]
Add Vernon Lyon to AUTHORS
Father Chrysostomos [Sun, 26 Sep 2010 13:40:52 +0000 (06:40 -0700)]
tests for [perl #76474]
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.
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.
Tony Cook [Sun, 26 Sep 2010 02:12:55 +0000 (12:12 +1000)]
make PL_charclass available to modules under Win32
Chris 'BinGOs' Williams [Sat, 25 Sep 2010 23:12:52 +0000 (00:12 +0100)]
Update perldelta for if change
Florian Ragwitz [Sat, 25 Sep 2010 22:34:14 +0000 (00:34 +0200)]
Upgrade Digest::MD5 from version 2.40 to 2.50
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