Chris 'BinGOs' Williams [Sat, 3 Dec 2011 23:07:58 +0000 (23:07 +0000)]
Update Compress-Raw-Zlib to CPAN version 2.044
[DELTA]
2.044 2 December 2011
* Moved FAQ.pod under the lib directory so it can get installed
Chris 'BinGOs' Williams [Sat, 3 Dec 2011 23:00:35 +0000 (23:00 +0000)]
Update Compress-Raw-Bzip2 to CPAN version 2.044
[DELTA]
2.044 2 December 2011
* Moved FAQ.pod under the lib directory so it can get installed
Craig A. Berry [Sat, 3 Dec 2011 21:55:26 +0000 (15:55 -0600)]
Remove the VMS-specific private len in S_mayberelocate.
This particular C<STRLEN len;> came along almost 15 years ago, way
back in
aa6893958c2b. Back then it was a plain and simple block
scope variable. But now this code lives in a function that takes
as an argument a variable of the same name and having the same
meaning (i.e., the length of the directory name to be added to
@INC). Someone looking only at the argument list might reasonably
expect to be able to use len (though luckily there are no subsequent
uses of it currently). So we really ought to update that len rather
than create our own when we hijack the directory name to make our
unixified version of it.
Father Chrysostomos [Sat, 3 Dec 2011 17:36:38 +0000 (09:36 -0800)]
Remove SvTAINT from sv_sethek
This was copied from sv_usepvn_flags in commit
58b643af9. It is
unnecessary, and probably incorrect, as heks are not tainted.
Why sv_sethek used sv_usepvn_flags to begin with I don’t know, but I
imagine it was for brevity’s sake. This code was ultimately derived
from newSVhek, which doesn’t use sv_usepvn_flags. Because of that,
and because it is now far enough removed from sv_usepvn_flags, I have
removed the comment referring to it.
Shlomi Fish [Sat, 3 Dec 2011 14:56:53 +0000 (06:56 -0800)]
perl -d bugfixes and tests
This patch fixes some bugs in "perl -d" (see ticket #104820) and adds
some regression tests (for the bugfixes and for better test coverage).
Peter Martini [Sat, 3 Dec 2011 12:01:44 +0000 (07:01 -0500)]
Stop calling sv_usepvn_flags from sv_sethek
sv_usepvn_flags assumes that ptr is at the head of a block
of memory allocated by malloc. If perl's malloc is in use,
the data structures malloc uses and the data allocated for
perl are intermixed, and accounting done by malloced_size
in sv_usepvn_flags will overwrite valid memory if its called
on an address that is not the start of a malloced block.
The actual work being accomplished by sv_usepvn_flags, and
not undone immediately after by sv_sethek, is limited to 3 calls
on the SV. Inlining those calls removes the dependency on malloc.
This fixes perl #104034.
Craig A. Berry [Sat, 3 Dec 2011 16:36:58 +0000 (10:36 -0600)]
VMS-specific scope fix for S_mayberelocate.
Back in
3185893b8dec106 I moved some code from the beginning of one
block to the middle of a different block. Bad me. The compiler
has been lax about allowing declarations in the middle of a block,
so we haven't noticed. But as of
c29067d7797853039, the code moved
to a new function while leaving the block it was in behind and we
end up with conflicting declarations of len.
Making our own block seems like the safest thing to do. The
indentation in this section of code is a bit wacky -- I chose the
least intrusive alternative for clearer blame logs.
Nicholas Clark [Thu, 24 Nov 2011 19:38:08 +0000 (20:38 +0100)]
Small tidyups in S_incpush() and S_mayberelocate()
Following commit
816005240f1a3b99, which moved VMS-specific code, we can now
assign to subdir at the point of declaration. After the refactoring that
moved code into S_mayberelocate(), we can assign to libdir at the point of
declaration. In turn, this allows the merging of two #ifndef PERL_IS_MINIPERL
blocks. Remove a blank line from S_mayberelocate().
Nicholas Clark [Thu, 24 Nov 2011 17:11:32 +0000 (18:11 +0100)]
Avoid attacks on sitecustomize by using NUL delimiters to wrap filenames.
Previously the generated code used regular '' strings, which meant that a
crafted pathname containing ' characters could be used to inject code.
Until the previous commit, this was only a problem if building in or
Configuring to install to such a directory. Which, hopefully, would be
"obviously wrong" to anyone capable of building Perl from source.
However, fixing the bug that prevented sitecustomize being subject to
relocatable include now means that for a relocatable pearl, an end-user
controlled path can now reach the sitecusomize code.
Carl Hayter [Thu, 24 Nov 2011 16:49:50 +0000 (17:49 +0100)]
Make sitecustomize relocatableinc aware
When -Dusesitecustomize is used with -Duserelocatableinc,
SITELIB_EXP/sitecustomize.pl is not found due to SITELIB_EXP having a
'.../..' relocation path.
This patch refactors the path relocation code from S_incpush() into
S_mayberelocate() so that it can be used in both S_incpush() and in
usesitecustomize's use of SITELIB_EXP.
Nicholas Clark [Sat, 3 Dec 2011 11:59:05 +0000 (11:59 +0000)]
Tidy up t/re/regexp.t
Eliminate the declaration of $numtests, unused since commit
1a6108908b085da4.
Convert $iters and $OP to lexicals. Remove the vestigial logic for finding
t/re/re_tests - the MacOS classic style pathname is redundant now, and the
file can never be found at t/re/re_tests given that there is a chdir 't' in
the BEGIN block.
Craig A. Berry [Sat, 3 Dec 2011 03:33:25 +0000 (21:33 -0600)]
Rework vms/vms.c:Perl_flex_stat_int() to avoid underscore ambiguity.
An apparently long-standing bug in the home-grown stat() wrapper
was exposed by b8ab4b0, which added the t/test_pl directory. On
VMS, file test operations using the Perl_flex_stat_int() function
would confuse t/test.pl with t/test_pl because dots are the directory
delimiter and not traditionally allowed in directory names, so when
doing a stat() of t/test.pl it would convert the dot to an underscore
and succeed because that directory now exists. All tests using
t/test.pl would then fail.
The background is that traditionally, the CRTL stat() could not deal
with directory specifications in native format, so for example,
dev:[dir.dir2] had to be converted to dev:[dir]dir2.DIR for various
operations, including the stat() call, to succeed. This is now the
exception; it's still necessary for rmdir(), but not for stat(), at
least not on OpenVMS VAX v7.3, OpenVMS Alpha v7.3-2, OpenVMS Alpha
v8.3, and OpenVMS I64 v8.4, i.e., anything released in the last
eight years. A so-called "fileified" directory spec did not cause
problems on its own, but if converted to native syntax first, the
dot would get replace with the now-ambiguous underscore.
The balance was tipped in
312ac60b381, where the fatal conversion
to a native path was added. The best path forward seems to be to
do less and allow the CRTL stat() or lstat() to do their thing
unimpeded, which in most cases they do just fine. This has the
added benefit of optimizing for files instead of directories and
saving some unnecessary filename conversions and filename buffer
allocations. More refactorings are likely desireable.
There is one new test failure in dist/ExtUtils-Manifest/t/Manifest.t
having to do with a filename containing a space, but this seems
preferable to the hundreds of test failures before this patch. That
indicates, however, that there is more work to do.
Craig A. Berry [Sat, 3 Dec 2011 03:30:30 +0000 (21:30 -0600)]
Add Term::ReadLine to write_buildcustomize.pl.
If the build fails while building extensions, it's nice to have
the debugger available to help figure out what went wrong. You
couldn't do that before because lib/perl5db.pl depends on
Term::ReadLine, which wouldn't be available since it hadn't been
built yet. This commit makes Term::ReadLine available via the
same mechanism that makes other libraries available to miniperl
during the build.
An alternative would be to remove the debugger's dependency on
Term::ReadLine, but that would be more work and more risk for a
situation that hopefully doesn't come up that often.
Tony Cook [Fri, 2 Dec 2011 12:23:00 +0000 (23:23 +1100)]
more reliably kill a runaway test process on cygwin
Sometimes a plain kill isn't enough.
Along with the previous change this reliably kills a blocked
t/op/threads.t on cygwin as needed.
This doesn't attempt to fix the underlying bug (which may be in
Win32, cygwin or perl itself)
Tony Cook [Fri, 2 Dec 2011 12:25:33 +0000 (23:25 +1100)]
don't depend on threads to do a watchdog when testing threads
adds a "process" watchdog method that forces use of a separate
process for the watchdog "watcher".
Father Chrysostomos [Sat, 3 Dec 2011 01:52:17 +0000 (17:52 -0800)]
Add Mark Dootson to AUTHORS
Father Chrysostomos [Sat, 3 Dec 2011 01:51:26 +0000 (17:51 -0800)]
Increase $threads::VERSION to 1.86
Mark Dootson [Sat, 3 Dec 2011 00:50:26 +0000 (16:50 -0800)]
[perl #104776] Fix threads for latest 64bit mingw-w64 + gcc 4.6
Latest mingw-w64 64 bit + gcc >= 4.6.2 fails due to differences in
setjmp definition. (32 bit is OK) (t/exit.t fails a couple of tests
with access violation faults)
Father Chrysostomos [Fri, 2 Dec 2011 21:04:41 +0000 (13:04 -0800)]
$tied =~ s///e when FETCH returns a COW
This used to cause an assertion failure, or sometimes ‘Attempt to free
nonexistent shared string’.
All that was required to fix it was the deletion of two cpp lines.
Craig A. Berry [Fri, 2 Dec 2011 17:30:11 +0000 (11:30 -0600)]
skip Perl_my_symlink symbol on older VMS systems.
It's a wrapper for cases where we have symlink, not a replacement
for cases where we don't (pre-v8.3). Trying to include it on
older systems causes a link error.
Chris 'BinGOs' Williams [Fri, 2 Dec 2011 13:20:26 +0000 (13:20 +0000)]
Update Locale-Codes version in Maintainers.pl
This should have been part of
4345d05bb848d49bf1bc348b0bf725f5679165bf
Father Chrysostomos [Fri, 2 Dec 2011 06:46:22 +0000 (22:46 -0800)]
Allow COW PVMGs to be tied
This logic in sv_magic is wrong:
if (SvREADONLY(sv)) {
if (
/* its okay to attach magic to shared strings; the subsequent
* upgrade to PVMG will unshare the string */
!(SvFAKE(sv) && SvTYPE(sv) < SVt_PVMG)
&& IN_PERL_RUNTIME
&& !PERL_MAGIC_TYPE_READONLY_ACCEPTABLE(how)
)
{
Perl_croak_no_modify(aTHX);
}
}
There is nothing wrong with attaching magic to a shared string that
will stay shared. Also, shared strings are not always < SVt_PVMG.
Sometimes a PVMG or PVLV can end up with a shared string. In those
cases, the logic above treats them as read-only, which they ain’t.
The easiest example is a downgraded typeglob:
$x = *foo; # now a PVGV
undef $x ; # downgraded to PVMG
$x = __PACKAGE__; # now a shared string (COW)
tie $x, "main"; # bang! $x is considered read-only
sub main::TIESCALAR{bless[]}
Father Chrysostomos [Thu, 1 Dec 2011 20:36:18 +0000 (12:36 -0800)]
Use SvOOK_on
Now that SvOOK_on has a usable definition (i.e., it leaves the
NIOK flags alone), we can use it and remove the comments warning
against it.
Father Chrysostomos [Thu, 1 Dec 2011 20:29:06 +0000 (12:29 -0800)]
Bring SvOOK_on back, but simpler
Commit
404dce59 removed it, because nothing in core or CPAN was using
it and it is not part of the API.
Nothing in core was using it because it was unusable as previously
defined (with SvIOK_off).
This commit brings it back, but now it is a simple flag-setting macro,
that will actually be usable by the core.
Chris 'BinGOs' Williams [Thu, 1 Dec 2011 14:32:01 +0000 (14:32 +0000)]
Update Locale-Codes to CPAN version 3.20
[DELTA]
VERSION 3.20 (2011-12-01)
NEW CODE(s)
Added limited support for deprecated codes
The code2XXX, XXX2code, all_XXX_codes, and all_XXX_names functions now support retired codes. RT 71124
Fixed capitalization
The 'South Sudan' country was all caps. RT 71024
Pod tests off by default
The pod tests will not run at install time. RT 71122
Codesets may be specified by name
All codesets may be specified by a constant or by their name now. Previously, they were specified only by a constant.
alias_code deprecated
The alias_code function exists for backward compatibility. It has been replaced by rename_country_code.
The alias_code function will be removed sometime after September, 2013.
Code cleanup
All work is now done in the central module (Locale::Codes). Previously, some was still
done in the wrapper modules (Locale::Codes::*) but that is gone now.
Added LangFam module
Added Language Family codes (langfam) as defined in ISO 639-5.
Florian Ragwitz [Thu, 1 Dec 2011 14:23:25 +0000 (15:23 +0100)]
Merge branch 'dual-life-socket' into blead
* dual-life-socket:
Bump Socket::VERSION to 1.95; to match CPAN release
Snapshot of P/PE/PEVANS/Socket-1.94_07.tar.gz
More fixups for dual-life to support out-of-core build
Prepare Socket.pm for dual-life
Fixups for older Perl versions:
Rewrite ext/Socket/t/Socket.t to use Test::More rather than manual printing
Paul \"LeoNerd\" Evans [Thu, 1 Dec 2011 14:10:48 +0000 (14:10 +0000)]
Bump Socket::VERSION to 1.95; to match CPAN release
Paul \"LeoNerd\" Evans [Tue, 22 Nov 2011 15:11:49 +0000 (15:11 +0000)]
Snapshot of P/PE/PEVANS/Socket-1.94_07.tar.gz
Paul \"LeoNerd\" Evans [Tue, 1 Nov 2011 16:16:33 +0000 (16:16 +0000)]
More fixups for dual-life to support out-of-core build
* Use ExtUtils::CChecker when not in core to replace the Configure-time testing that core does
* Don't actually need to dVAR in getaddrinfo/getnameinfo
* Expand croak_xs_usage inline rather than rely on xsubpp to write one
Paul \"LeoNerd\" Evans [Mon, 24 Oct 2011 18:02:43 +0000 (19:02 +0100)]
Prepare Socket.pm for dual-life
* Moved from ext/Socket to cpan/Socket
* Currently declared as PEVANS/Socket-1.95.tar.gz - which is what it
will eventually become
Paul \"LeoNerd\" Evans [Mon, 24 Oct 2011 17:07:42 +0000 (18:07 +0100)]
Fixups for older Perl versions:
* Pass package and version to XSLoader::load to keep older perl versions happy
* Older perls do not define croak_sv; #define a workaround for them
Paul \"LeoNerd\" Evans [Mon, 24 Oct 2011 16:51:13 +0000 (17:51 +0100)]
Rewrite ext/Socket/t/Socket.t to use Test::More rather than manual printing
Rafael Garcia-Suarez [Thu, 1 Dec 2011 14:10:49 +0000 (15:10 +0100)]
Install perlfaq and perlglossary manpages in section 1 of the manual
Chris 'BinGOs' Williams [Thu, 1 Dec 2011 11:23:41 +0000 (11:23 +0000)]
Skip executable Cygwin test in EUMM when in core
Change has been upstreamed as:
<https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/commit/
d0172d0f>
Tony Cook [Thu, 1 Dec 2011 10:37:42 +0000 (21:37 +1100)]
avoid conflicting static / dllexport on legacy perls too
This probably fixes rt.cpan.org 72313 and 71964.
Tony Cook [Thu, 1 Dec 2011 08:39:18 +0000 (19:39 +1100)]
ignore a cygwin specific generated file
Tony Cook [Thu, 1 Dec 2011 08:00:53 +0000 (19:00 +1100)]
static and dllexport don't belong together on cygwin
This was causing build errors like:
Cwd.c:553:1: error: external linkage required for symbol ‘XS_Cwd_getcwd’ because of ‘dllexport’ attribute
Father Chrysostomos [Thu, 1 Dec 2011 07:20:10 +0000 (23:20 -0800)]
sv.c: fix comment typo added by
ce2077b184
Father Chrysostomos [Thu, 1 Dec 2011 07:06:55 +0000 (23:06 -0800)]
Remove SvOOK_on
Nothing is using in core or on CPAN. It is not part of the API.
Father Chrysostomos [Thu, 1 Dec 2011 06:29:44 +0000 (22:29 -0800)]
perlintro: consistent use of spaces after dots
Father Chrysostomos [Thu, 1 Dec 2011 06:05:03 +0000 (22:05 -0800)]
[perl #105024] UNIVERSAL::AUTOLOAD and %+
The code in gv.c for loading a tie module automatically
(S_require_tie_mod) was only loading the module if its stash did not
exist or if a particular method (usually TIEHASH) could not be found.
But it was triggering autoloading, such that a universal AUTOLOAD
method would allow it to ‘find’ the method it was looking for, even if
it did not exist. So autovivifying the package somehow (e.g., by men-
tioning one of its symbols) could prevent the module from loading.
Ricardo Signes [Thu, 1 Dec 2011 00:40:54 +0000 (19:40 -0500)]
teach podcheck.t about newly linked-to module in perlfunc
Abhijit Menon-Sen [Thu, 1 Dec 2011 00:02:35 +0000 (05:32 +0530)]
Don't suggest using srand for "cryptographic purposes"
Also, don't suggest Math::Random::MT::Perl as a source of
cryptographically secure randomness, because it isn't.
Ævar Arnfjörð Bjarmason [Sat, 26 Nov 2011 23:07:15 +0000 (23:07 +0000)]
pod/perlintro: mention that "foreach" is really a synonym for "for"
The perlintro section on for/foreach would have you believe that "for"
is always C-style and "foreach" is always Perl-style. This isn't
actually the case, so link to the perlsyn section that covers that.
Ævar Arnfjörð Bjarmason [Sat, 26 Nov 2011 22:58:22 +0000 (22:58 +0000)]
pod/perlsyn: for is equivalent to "foreach'
Change the Compound Statements section to not like by omission. Both
for and foreach can be used as C-style and Perl-style for-loops, but
the documentation pretended that "for" was always C-style and
"foreach" was always Perl-style.
Father Chrysostomos [Wed, 30 Nov 2011 21:16:06 +0000 (13:16 -0800)]
perlhacktips: typo
Father Chrysostomos [Wed, 30 Nov 2011 17:42:58 +0000 (09:42 -0800)]
perlsource.pod: toolks → tools
Father Chrysostomos [Wed, 30 Nov 2011 17:34:46 +0000 (09:34 -0800)]
Another confusing comment; this time in regcomp.c
This one comes from
c2123ae38.
And we shouldn’t be suing our mothers’ tykes. :-)
Father Chrysostomos [Wed, 30 Nov 2011 06:43:15 +0000 (22:43 -0800)]
Correct comment in hv.c:S_share_hek_flags
It says that allocate one block of memory with the HEK immediately
following the HE, so we can find the HEK from the HE. Of course we
can find the HEK from the HE, as the HE points to it. The two terms
were apparently transposed.
Father Chrysostomos [Wed, 30 Nov 2011 06:39:26 +0000 (22:39 -0800)]
Remove obsolete comment about SvPOKp in sv.h
This comment was added in
373b357f1, and then invalidated by the same
person in
8eeaf79a, seventeen days later.
Father Chrysostomos [Wed, 30 Nov 2011 04:12:56 +0000 (20:12 -0800)]
hv.h: Don’t call a char * parameter ‘sv’!
This goes all the way back to
bbce6d6978 (inseparable changes from
patch from perl5.003_08 to perl5.003_09). It is mightily confusing
for anyone trying to figure out how these things work.
Father Chrysostomos [Wed, 30 Nov 2011 04:08:51 +0000 (20:08 -0800)]
hv.h: remove obsolete comment
This comment was made obsolete by commit
bc5cdc2388.
Father Chrysostomos [Wed, 30 Nov 2011 02:04:35 +0000 (18:04 -0800)]
sv.c/find_uninit_var: Explain kid-scanning loop better
Hopefully this explanation will be clearer and will prevent clumsy
individuals like me from introducing bugs like #103766.
Father Chrysostomos [Wed, 30 Nov 2011 01:59:26 +0000 (17:59 -0800)]
sv.c: typo
Father Chrysostomos [Tue, 29 Nov 2011 02:31:55 +0000 (18:31 -0800)]
panic after cow-to-stash assignment
This type of thing isn’t officially supported, but perl shouldn’t be
freeing unallocated memory (the 9th octet of a freed HEK) as a result:
$::{whatever} = __PACKAGE__;
*{"whatever"};
A string stored in the symbol table like that is actually a subroutine
stub. ‘sub foo($)’ is stored as '$' in the "foo" slot to save space.
gv_init_pvn (formerly known as gv_init) checks SvPOK first thing,
assuming, if it is set, that it can reuse SvPVX as the CV’s prototype,
without reallocating or copying it. That works most of the time.
For COW strings (such as those returned by __PACKAGE__), SvPVX points
to the hek_key field (the 9th octet) of a shared HEK. When the CV is
freed, it ends up trying to do Safefree(that_hek + 8) effectively,
which is bad.
Nicholas Clark [Mon, 28 Nov 2011 15:40:28 +0000 (15:40 +0000)]
As perldoc is linked from perl.pod, it shouldn't be in perltoc's sin list.
perldoc has a manpage prominently linked from the perl manpage. Hence it
makes no sense to also have it listed at the end of perltoc in the section
described as "Here should be listed all the extra programs' documentation,
but they don't all have manual pages yet"
Nicholas Clark [Mon, 28 Nov 2011 14:38:55 +0000 (14:38 +0000)]
Eliminate vestigial reference to unpushed.h from descrip_mms.template
Commit
dcff826f70bf3f64 renamed unpushed.h to git_version.h in early 2009.
So code to delete it is no longer needed :-)
Nicholas Clark [Sun, 27 Nov 2011 22:02:54 +0000 (23:02 +0100)]
pod/buildtoc now generates pod/roffitall
roffitall remains a shell script, identical apart from a dynamically
generated list of man pages (and removal of the comment from 2000 that
this should be done).
Tony Cook [Mon, 28 Nov 2011 07:18:25 +0000 (18:18 +1100)]
avoid double defining the POSIX::TCSANOW constant sub
On Win32 which has no native TCSANOW definition this would produce:
Constant subroutine TCSANOW redefined at ../lib/POSIX.pm line -1.
because the macro wasn't defined when building the unknown symbols
table but was defined when building the defined symbols table.
Father Chrysostomos [Mon, 28 Nov 2011 02:37:14 +0000 (18:37 -0800)]
sv.c: Turn a FIXME comment into an explanation
Father Chrysostomos [Mon, 28 Nov 2011 02:27:09 +0000 (18:27 -0800)]
Remove duplicate comment from sv.h
The ‘or lexical’ in this ‘glob or lexical is just a copy’ comment was
added in perl 5.001 (
748a9306), which added closures.
This comment was later duplicated in commit
120ff8e9d (‘Document a
sixth use for SVf_FAKE’), but in a clearer fashion.
This commit removes the ‘or lexical’ part, as it is now confusing.
Chris 'BinGOs' Williams [Sun, 27 Nov 2011 21:03:49 +0000 (21:03 +0000)]
Update Module-Loaded to CPAN version 0.08
[DELTA]
Changes for 0.08 Sun Nov 27 20:44:00 GMT 2011
=================================================
* Remove trailing spaces and update Makefile.PL
Nicholas Clark [Sun, 27 Nov 2011 20:26:46 +0000 (21:26 +0100)]
Fix two bugs related to pod files outside of pod/
Commit
1721346e4e420217, which allowed buildtoc to handle files outside of
pod/, had two bugs when processing files from outside of pod/
Firstly, the call to podset() for the core pods needs to pass in the short
name of the pod, not the name with the path in it (ie $_->[4], not $_->[1]),
else the =head2 entry for that pod will have the pathname in it.
Secondly, buildtoc must take care to avoid outputting the contents for these
pods twice - once when read from cpan/ or dist/ using the path in pod.lst,
and once from the file as found in lib/
Father Chrysostomos [Sun, 27 Nov 2011 19:41:44 +0000 (11:41 -0800)]
[perl #99850] SEGV when destructor undefs goto &sub
If goto &sub triggers a destructor that undefines &sub, a
crash ensues.
This commit adds an extra check in pp_goto after the unwinding of the
previous sub’s scope.
Father Chrysostomos [Sun, 27 Nov 2011 19:07:44 +0000 (11:07 -0800)]
typo in perlre.pod
Peter Martini [Fri, 25 Nov 2011 23:23:53 +0000 (18:23 -0500)]
Change a semicolon to a colon. This is necessary for the shared mem example to compile
Nicholas Clark [Sun, 27 Nov 2011 12:05:11 +0000 (13:05 +0100)]
Fix two post 5.15.0 perltoc.pod generation bugs.
Commit
1721346e4e420217, which allowed buildtoc to handle files outside of
pod, changed the number of entries in the master structure, but missed
changing one test from 3 to 5, which resulted in all the core documentation
being omitted from the generated perltoc.pod
Commit
f37610d895e1d30b, which eliminated the use of absolute pathnames,
failed to change two regular expressions in the subroutine passed to
File::Find::find(), which resulted in all module pod filenames having
lib/ prepended, and thus all modules being treated as pragmata.
This commit also contained an error in the call to podset() for the core
documentation, which wasn't noticed because that code was never called,
due to the bug introduced by commit
1721346e4e420217.
perltoc.pod now builds correctly once again. Whether anyone uses it is
another matter.
Nicholas Clark [Sat, 26 Nov 2011 21:20:30 +0000 (22:20 +0100)]
In roffitall, explicitly use perl to run rofftoc.
Previously roffitall invoked rofftoc as ./rofftoc (implying a shell script),
and in turn rofftoc used the "sh or perl" construction to cause sh to pass
itself to perl. This was a bit obfuscated at the best of times, and broke
completely when commit
ff906f87ce151941 removed execute permission in 2010.
Father Chrysostomos [Sun, 27 Nov 2011 02:17:45 +0000 (18:17 -0800)]
[perl #97980] Stop tied() from returning a copy
Now tied() returns the actual scalar used to hold the tie object,
so one can write weaken(tied $foo).
Father Chrysostomos [Sun, 27 Nov 2011 00:58:56 +0000 (16:58 -0800)]
Make inlined &CORE::__SUB__ the right-sized op
In commit
1a35f9ffb I forgot to make an inlined OP_RUNCV op a PVOP in
ck_entersub_args_core (which inlines a &CORE::sub).
This caused crashes on Linux, but not on OS X, for some reason.
Father Chrysostomos [Sat, 26 Nov 2011 23:55:48 +0000 (15:55 -0800)]
[perl #98352] perlre: Clarify visibility of $1 in (??{...})
Father Chrysostomos [Sat, 26 Nov 2011 23:39:05 +0000 (15:39 -0800)]
Oops!
Well, I at least ran test_porting after making that ‘only doc’ change!
But then I committed with -a by mistake. Oh well.
Father Chrysostomos [Sat, 26 Nov 2011 20:49:52 +0000 (12:49 -0800)]
sv.h: Consistent use of spaces after dots
Father Chrysostomos [Sat, 26 Nov 2011 20:42:55 +0000 (12:42 -0800)]
[perl #97632] Improve SvTAINT docs
Copied almost verbatim from text supplied by Kevin Ryde.
Father Chrysostomos [Sat, 26 Nov 2011 19:46:58 +0000 (11:46 -0800)]
Remove ‘no warnings deprecated’ from two .t’s
This was added to avoid the warning from $[, but these two test
scripts no longer mention $[.
Father Chrysostomos [Sat, 26 Nov 2011 07:04:22 +0000 (23:04 -0800)]
Optimise substr assignment in void context
In void context we can optimise
substr($foo, $bar, $baz) = $replacement;
to something like
substr($foo, $bar, $baz, $replacement);
except that the execution order must be preserved. So what we actu-
ally do is
substr($replacement, $foo, $bar, $baz);
with a flag to indicate that the replacement comes first. This means
we can also optimise assignment to two-argument substr the same way.
Although optimisations are not supposed to change behaviour,
this one does.
• It stops substr assignment from calling get-magic twice, which means
the optimisation makes things less buggy than usual.
• It causes the uninitialized warning (for an undefined first argu-
ment) to mention the substr operator, as it did before the previous
commit, rather than the assignment operator. I think that sort of
detail is minor enough.
I had to make the warning about clobbering references apply whenever
substr does a replacement, and not only when used as an lvalue. So
four-argument substr now emits that warning. I would consider that a
bug fix, too.
Also, if the numeric arguments to four-argument substr and the
replacement string are undefined, the order of the uninitialized warn-
ings is slightly different, but is consistent regardless of whether
the optimisation is in effect.
I believe this will make 95% of substr assignments run faster. So
there is less incentive to use what I consider the less readable form
(the four-argument form, which is not self-documenting).
Since I like naïve benchmarks, here are Before and After:
$ time ./miniperl -le 'do{$x="hello"; substr ($x,0,0) = 34;0}for 1..1000000'
real 0m2.391s
user 0m2.381s
sys 0m0.005s
$ time ./miniperl -le 'do{$x="hello"; substr ($x,0,0) = 34;0}for 1..1000000'
real 0m0.936s
user 0m0.927s
sys 0m0.005s
Father Chrysostomos [Sat, 26 Nov 2011 00:22:01 +0000 (16:22 -0800)]
Don’t coerce $x immediately in foo(substr $x...)
This program:
#!perl -l
sub myprint { print @_ }
print substr *foo, 1;
myprint substr *foo, 1;
produces:
main::foo
Can't coerce GLOB to string in substr at - line 4.
Ouch!
I would expect \substr simply to give me a scalar that peeks into the
original string, but without modifying the original until the return
value of \substr is actually assigned to.
But it turns out that it coerces the original into a string immedi-
ately, unless it’s GMAGICAL. I find the exception for magical varia-
ble rather befuddling. I can only imagine it was for efficency (since
the stringified form will be overwritten when magic_setsubstr calls
SvGETMAGIC), but that doesn’t make sense as the original variable can
itself be modified between the return of the special lvalue and the
assignment to that lvalue.
Since magic_setsubstr itself coerces the variable into a string upon
assignment to the lvalue, we can just remove the coercion code from
pp_substr.
But that causes double uninitialized warnings in cases like
substr($undef, 0,0) = "lrep".
That happens because pp_substr is still stringifying the variable (but
without modifying it). It has to do that, as it looks at the length
of the original string and accordingly adjusts the offsets stored in
the lvalue if they are negative or if they extend beyond the end of
the string.
So this commit takes the simple route of avoiding the warning in
pp_substr by only stringifying a variable that is SvOK if called in
lvalue context.
Hence, assignment to substr($tied...) will continue to call FETCH
twice, but that is not a new bug.
The ideal solution would be for the offsets to be translated in mg.c,
rather than in pp_substr. But that would be a more involved change
(including most of this commit, which is therefore not wasted) with
potential backward-compatibility issue with negative numbers.
A side effect it that the ‘Attempt to use reference as lvalue in
substr’ warning now occurs during the assignment to the substr lvalue,
rather that substr itself. This means it occurs even for tied varia-
bles, so things are now more consistent.
The example at the beginning could still croak if the glob were
replaced with a null string, so this commit only partially allevi-
ates the pain.
Father Chrysostomos [Fri, 25 Nov 2011 21:36:29 +0000 (13:36 -0800)]
Optimise __SUB__ to a constant
If __SUB__ is not inside a closure, it can be optimised to a constant.
We can only do this in the peephole optimiser, as we cannot tell
whether PL_compcv will become a closure until we reach the end
of the sub.
The __SUB__ op cannot simply be replaced with a const op, as the par-
ent op is not readily available in the peephole optimiser and, hence,
we cannot change its pointer.
So we have to convert the runcv op itself into a const op. So it
has to be the same size. This commit makes it a PVOP, since newPVOP,
unlike newSVOP, allows a null pv. To avoid adding workarounds to B
modules, I put an exception in newPVOP’s assertion, instead of chang-
ing the type in regen/opcodes.
But B::Deparse still had to be updated to avoid infinite recursion.
Chris 'BinGOs' Williams [Sat, 26 Nov 2011 21:22:55 +0000 (21:22 +0000)]
Update Unicode-Collate to CPAN version 0.87
[DELTA]
0.87 Sat Nov 26 17:01:42 2011
- Now Locale/*.pl files are searched in @INC. (see [rt.cpan.org #72666])
- added locale_version method to access the version number of Locale/*.pl.
Ricardo Signes [Sat, 26 Nov 2011 01:26:45 +0000 (20:26 -0500)]
correct some erroneous linking in 5.14.0 delta
Chris 'BinGOs' Williams [Fri, 25 Nov 2011 22:12:44 +0000 (22:12 +0000)]
Add AutoLoader upgrade to perldelta
Chris 'BinGOs' Williams [Fri, 25 Nov 2011 22:09:52 +0000 (22:09 +0000)]
Update B-Debug to CPAN version 1.17
[DELTA]
1.17 2011-11-25 rurban
* FSF address change
Nicholas Clark [Fri, 25 Nov 2011 17:39:04 +0000 (18:39 +0100)]
bisect.pl avoids perl-5.004 and earlier on case insensitive systems.
bisect.pl now probes to see if the checkout is on a case insensitive file
system (such as the default HFS+ on OS X), and if so, uses perl-5.005 as
the earliest stable release to test.
This should make bisect.pl "just work" on a typical OS X system, for the
vast majority of use cases.
Nicholas Clark [Fri, 25 Nov 2011 15:32:26 +0000 (16:32 +0100)]
bisect-runner.pl now builds back to 5.005 on the default OS X filesystem.
OS X defaults to case-insensitive HFS+. perl-5.8.0 and later have hints
files to avoid a clash between Makefile and makefile, and hence can build
without problems. Teaching bisect-runner.pl to replicate this hints tweak
allows it to build perl-5.6.0 and perl-5.005 on a default HFS+.
However, only do this for a case insensitive filesystem, else it breaks
the build for 5.003 and earlier (which hardcode 'makefile' in places).
perl-5.004 and earlier won't work on a default HFS+ without a *lot* of
bodgery, as the distribution from that era has two files, Configure and
configure, which trample over each other and confuse git. There are case
clashes in later revisions, which may create unexpected failures for
some actions (versus the same action on a case sensitive file system) but
they don't appear to affect building any 5.*.0 revisions.
bisect-runner.pl can build back to 5.002 on OS X on a case sensitive HFS+
file system.
Nicholas Clark [Fri, 25 Nov 2011 11:19:45 +0000 (12:19 +0100)]
bisect-runner.pl should avoid ext/Hash/Util/FieldHash being built twice.
Commit
550428fe486b1888 stopped the invocation of ext/Hash/Util/Makefile.PL
automatically recursing to ext/Hash/Util/FieldHash/Makefile.PL, as make_ext
was also calling it directly. This then resulted in two makes running in
parallel in ext/Hash/Util/FieldHash, which could all end in tears (and
failed builds). Hence we need to apply this fix if it isn't present, to
avoid spurious build failures during bisect runs.
Nicholas Clark [Fri, 25 Nov 2011 10:41:14 +0000 (11:41 +0100)]
bisect-runner.pl can now build on AIX back to perl-5.002
Two "one line" fixes to Configure and pp_sys.c are enough to get all .0
stable releases to build. perl-5.001n also builds as far as miniperl.
This makes bisect.pl useful for diagnosing problems on AIX.
Nicholas Clark [Fri, 25 Nov 2011 09:58:16 +0000 (10:58 +0100)]
In bisect-runner.pl, fall back to context diffs for ancient patch binaries.
AIX supplies a pre-historic patch program, which certainly predates Linux
and is probably older than NT. It can't cope with unified diffs. Meanwhile,
it's hard enough to get git diff to output context diffs, let alone git show,
and nearly all the patches embedded here are unified. So it seems that the
path of least resistance is to convert unified diffs to context diffs.
Nicholas Clark [Wed, 23 Nov 2011 21:51:13 +0000 (22:51 +0100)]
In bisect-runner.pl, only shell out to patch from apply_patch().
Previously the system's patch binary was invoked from 3 places. Refactoring
the code to only call it from one place will make it easier to work around
ancient versions of patch that some vendors still supply.
Konovalov, Vadim (Vadim)** CTR ** [Fri, 25 Nov 2011 09:10:24 +0000 (09:10 +0000)]
.\win32\mdelete.bat not needed
From: "Konovalov, Vadim (Vadim)** CTR **" <vadim.konovalov@alcatel-lucent.com>
Subject: [PATCH v5.15.5-187] .\win32\mdelete.bat not needed
Date: Thu, 24 Nov 2011 21:48:26 +0100
Message-ID: <
35BF8D9716175C43BB9D67CA60CC345E2E0284DD@FRMRSSXCHMBSC2.dc-m.alcatel-lucent.com>
Father Chrysostomos [Fri, 25 Nov 2011 03:20:00 +0000 (19:20 -0800)]
Don’t warn for foo+1 with ($) proto
Commit
22393538 added the warning for (;$) prototypes, but
ended up adding it for ($) as well.
Father Chrysostomos [Fri, 25 Nov 2011 01:43:38 +0000 (17:43 -0800)]
evalbytes should ignore outer utf8 declaration
A slight mistake in the evalbytes.t test script caused a lot of tests
not be testing what they were supposed to be testing for. I used
'qq(\x...)' instead of qq('\x...'). (I.e., I was trying to embed lit-
eral Unicode characters in the string, rather than pass escapes to
evalbytes.)
I had wondered at the time why it worked without my doing anything, so
I probably should have looked deeper.
Steffen Mueller [Thu, 24 Nov 2011 18:21:05 +0000 (19:21 +0100)]
Upgrade AutoLoader to 5.72
Mostly just a FSF address update.
Father Chrysostomos [Thu, 24 Nov 2011 16:52:59 +0000 (08:52 -0800)]
regen pod issues
Father Chrysostomos [Thu, 24 Nov 2011 16:52:52 +0000 (08:52 -0800)]
perlgpl.pod: wrap long line
Father Chrysostomos [Thu, 24 Nov 2011 16:36:54 +0000 (08:36 -0800)]
Increase $SelfLoader::VERSION to 1.19
Dominic Hargreaves [Thu, 24 Nov 2011 16:08:04 +0000 (16:08 +0000)]
Update references to the FSF's postal address
Father Chrysostomos [Thu, 24 Nov 2011 16:27:13 +0000 (08:27 -0800)]
Test ambiguous warning with (;$) proto
Matthew Horsfall (alh) [Tue, 23 Aug 2011 03:32:10 +0000 (23:32 -0400)]
When parsing subs with user-defined prototypes, store information needed to throw warnings
Father Chrysostomos [Thu, 24 Nov 2011 09:33:33 +0000 (01:33 -0800)]
Suppress ‘once’ warning in gmagic.t
Father Chrysostomos [Thu, 24 Nov 2011 09:22:38 +0000 (01:22 -0800)]
Add lib/perl5db/t/rt-104168 to MANIFEST