This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
12 years agoMake dual-life.t emit full paths
Father Chrysostomos [Thu, 27 Oct 2011 01:12:23 +0000 (18:12 -0700)]
Make dual-life.t emit full paths

When it fails, this makes it easier to see why.

12 years agoTweak dual-life.t’s exclusion list
Father Chrysostomos [Thu, 27 Oct 2011 01:10:25 +0000 (18:10 -0700)]
Tweak dual-life.t’s exclusion list

to ignore ../cpan/Module-Build/MB-gADHN4rt/Simple/bin/foo

(without a .PL extension)

12 years agoTest $x=wait under arybase
Father Chrysostomos [Thu, 27 Oct 2011 01:05:25 +0000 (18:05 -0700)]
Test $x=wait under arybase

12 years agoarybase.xs: Always check the op type in ck_*
Father Chrysostomos [Thu, 27 Oct 2011 01:02:58 +0000 (18:02 -0700)]
arybase.xs: Always check the op type in ck_*

Sometimes the previous check function will have replaced the op
with one of a different type.  In that case, the rest of arybase’s
check function does not apply and can even cause a crash for ops
with no children (e.g., $x=wait is optimised down to a simple wait
op with no children and with op_targ pointing to $x, if it is
lexical).

12 years agoarybase.xs: Remove extraneous semicolon
Father Chrysostomos [Thu, 27 Oct 2011 00:56:32 +0000 (17:56 -0700)]
arybase.xs: Remove extraneous semicolon

12 years agoRemove arybase’s Makefile.PL
Father Chrysostomos [Wed, 26 Oct 2011 22:14:12 +0000 (15:14 -0700)]
Remove arybase’s Makefile.PL

It only existed to work around an ExtUtils::MakeMaker problem that is
now fixed

12 years agoFix CORE::glob
Father Chrysostomos [Wed, 26 Oct 2011 00:56:32 +0000 (17:56 -0700)]
Fix CORE::glob

This commit makes CORE::glob bypassing glob overrides.

A side effect of the fix is that, with the default glob implementa-
tion, undefining *CORE::GLOBAL::glob no longer results in an ‘unde-
fined subroutine’ error.

Another side effect is that compilation of a glob op no longer assumes
that the loading of File::Glob will create the *CORE::GLOB::glob type-
glob.  ‘++$INC{"File/Glob.pm"}; sub File::Glob::csh_glob; eval '<*>';’
used to crash.

This is accomplished using a mechanism similar to lock() and
threads::shared.  There is a new PL_globhook interpreter varia-
ble that pp_glob calls when there is no override present.  Thus,
File::Glob (which is supposed to be transparent, as it *is* the
built-in implementation) no longer interferes with the user mechanism
for overriding glob.

This removes one tier from the five or so hacks that constitute glob’s
implementation, and which work together to make it one of the buggiest
and most inconsistent areas of Perl.

12 years agoRewrite csh_glob in C; fix two quoting bugs
Father Chrysostomos [Tue, 25 Oct 2011 22:40:40 +0000 (15:40 -0700)]
Rewrite csh_glob in C; fix two quoting bugs

This commit rewrites File::Glob::csh_glob (which implements perl’s
default globbing behaviour) in C.

This fixes a problem introduced by 0b0e6d70f.  If there is an
unmatched quotation mark, all attempts to parse the pattern are
discarded and it is treated as a single token.  Prior to 0b0e6d70f,
whitespace was stripped from both ends in that case.  As of 0b0e6d70f,
it was only stripped from the beginning.  This commit restores the
pre-0b0e6d70f behaviour with unmatched quotes.  It doesn’t take
'a"b\ ' into account (where the space is escaped), but that wasn’t
handled properly before 0b0e6d70f, either.

This also finishes making csh_glob consistent with regard to quota-
tion marks.  Commit 0b0e6d70f attempted to do that, but did not strip
out medial quotation marks, as in a"b"c.  Text::ParseWords does not
provide an interface for stripping out quotation marks but leaving
backslashes, which I tried to work around, not fully understanding
the implications.  Anyway, this new C implementation doesn’t use
Text::ParseWords.

The latter fix caused a test failure, but that test was there to make
sure the behaviour didn’t change depending on whether File::Glob
was loaded before the first mention of glob().  (In 5.6, loading
File::Glob first would make perl revert to external csh glob, ironic-
ally enough.)  This commit modifies the test to test for sameness,
rather than exact output.  In fact, this change causes perl and
miniperl to be consistent, and probably also causes glob to be more
consistent across platforms (think of VMS).

Another effect of the translation to C is that the Unicode Bug is
fixed with regard to splitting patterns.  The C code effectively does
/\s/a now (which I believe is the only sane behaviour in this case),
instead of treating the string differently depending on the UTF8 flag.
The Unicode Bug is still present with regard to actual globbing.

This commit introduces one regression.  This code:

    undef %File::Glob::;
    glob("nometachars");

will no longer return anything, because csh_glob no longer holds a
reference count on the $File::Glob::DEFAULT_FLAGS glob.  Any code that
does that is beyond crazy.

The big advantage to this patch is speed.  Something like
‘@files = <*>’ is 18% faster in a folder of 300 files.  For smaller
folders there should be an even more notable difference.

12 years agoSpeed up csh_glob
Father Chrysostomos [Tue, 25 Oct 2011 05:27:48 +0000 (22:27 -0700)]
Speed up csh_glob

If it’s not going to be using the pattern at all (due to iteration),
there is absolutely no point in parsing it.

This will speed up CORE::glob and <...> as well, since they use
csh_glob by default.

12 years agoUpdate HTTP-Tiny to CPAN version 0.015
Chris 'BinGOs' Williams [Wed, 26 Oct 2011 20:50:55 +0000 (21:50 +0100)]
Update HTTP-Tiny to CPAN version 0.015

  [DELTA]

  0.015     2011-10-26 16:42:26 America/New_York

  [BUG FIXES]

  - Make sure PERL_UNICODE doesn't affect PUT test data [Tony Cook]

  [DOCUMENTATION]

  - Fixed typo

12 years agobisect-runner.pl can now build all revisions on sparc64 Linux.
Nicholas Clark [Wed, 26 Oct 2011 21:19:39 +0000 (23:19 +0200)]
bisect-runner.pl can now build all revisions on sparc64 Linux.

test_prep back to 5.001n, miniperl back to 5.000, for both 32 and 64 bit.
This requires backporting tweaks to the Linux hints file, and patching
early Configure to detect byteorder correctly as 87654321 when using
linker flags to build 64 bit.

12 years agobisect-runner.pl should patch unreliable C symbol detection code.
Nicholas Clark [Wed, 26 Oct 2011 21:17:58 +0000 (23:17 +0200)]
bisect-runner.pl should patch unreliable C symbol detection code.

Fix Configure's symbol detection to that of commit 373dfab3839ca168 if it's
any intermediate version 5129fff43c4fe08c or later, as the intermediate
versions don't work correctly on (at least) Sparc Linux.

12 years agobisect-runner.pl now patches several build-busting-bugs between 5.004 & 5.005
Nicholas Clark [Wed, 26 Oct 2011 21:08:28 +0000 (23:08 +0200)]
bisect-runner.pl now patches several build-busting-bugs between 5.004 & 5.005

This significantly reduces the number of "skip" revisions between 5.004 and
5.005, at worst speeding up bisects for problems which originate at this
time, at best permitting git bisect to locate the actual commit, instead of
a range of "skip"s.

12 years agobisect-runner.pl now copes when historical MANIFEST files list directories.
Nicholas Clark [Wed, 26 Oct 2011 21:02:06 +0000 (23:02 +0200)]
bisect-runner.pl now copes when historical MANIFEST files list directories.

It had assumed that MANIFEST only listed files, which caused its
'force-manifest' code to choke on revisions between 27332437a2ed1941 and
bf3d9ec563d25054^ inclusive, as manifest contains ext/Thread/Thread

12 years agoUpdate ExtUtils-MakeMaker to CPAN version 6.63_01
Chris 'BinGOs' Williams [Wed, 26 Oct 2011 19:10:05 +0000 (20:10 +0100)]
Update ExtUtils-MakeMaker to CPAN version 6.63_01

  [DELTA]

  6.63_01  Sun Oct 23 16:57:24 PDT 2011
    Bug Fixes
    * Stray $ in the PPD and meta files (for example, from the ABSTRACT)
      are now escaped.  [rt.cpan.org 71847]

    Possibly incompatible changes
    * echo() now escapes all dollar signs by default

    New Features
    * echo() has an option to allow make variable expansion.
    * echo() is now passed a hash of options (old style $appending flag
      still works for compatibility).
    * quote_literal() now escapes dollar signs, but allows make variables.
    * quote_literal() has an option to escape make variables.
    * escape_dollarsigns() to escape dollar signs but allow variables
    * escape_all_dollarsigns() to escape all dollar signs

    Improvements
    * The PPD VERSION is now derived from the VERSION variable in the Makefile
      rather than hard coded.

    Bundled Modules
    * Updated CPAN::Meta to 2.112621
    * Updated CPAN::Meta::YAML to 0.004
    * Updated JSON::PP to 2.27200

  6.62  Sun Oct 23 16:43:36 PDT 2011
    No changes from 6.61_01

12 years agoMake new basic.t glob tests work on Win & VMS
Father Chrysostomos [Tue, 25 Oct 2011 05:16:38 +0000 (22:16 -0700)]
Make new basic.t glob tests work on Win & VMS

I forgot about the default PERL_EXTERNAL_GLOB setting on VMS and the
special treatment of backslashes on Windows in bsd_glob.c.

12 years agoCorrect comment in Glob.pm
Father Chrysostomos [Mon, 24 Oct 2011 23:43:51 +0000 (16:43 -0700)]
Correct comment in Glob.pm

<...> is a double-quotish construct.

12 years agoRemove part of intrpvar.h comment
Father Chrysostomos [Mon, 24 Oct 2011 23:39:21 +0000 (16:39 -0700)]
Remove part of intrpvar.h comment

This second sentence is no longer true as of 87b9e160.

12 years agoMake File::Glob::csh_glob consisent wrt '"\
Father Chrysostomos [Mon, 24 Oct 2011 23:03:55 +0000 (16:03 -0700)]
Make File::Glob::csh_glob consisent wrt '"\

File::Glob::csh_glob, which is the routine implementing Perl’s own
glob function, is not consistent in its treatment of quotation marks
and backslashes.  It differs depending on whether there are white-
space characters in the pattern both preceded and followed by non-
whitespace.

Without whitespace, quotation marks are treated literally and back-
slashes are treated as escapes that cause metacharacters to be treated
literally.  So

    <"foo*">

looks for files with literal quotation marks in their name.

With whitespace, quotation marks are treated as word delimiters, so

    <"foo copy*">

will find file names matching /^foo copy/.  Backslash escapes are pro-
cessed twice, so one has to write

    glob '\\\** .\\\**'

to find files beginning with a literal ‘*’ or ‘.*’.  But simply

    glob '\**'

to find files beginning with ‘*’.  (Note that <> is a double-quotish
operator, so in <> those would have to be quadruple and double back-
slashes, respectively.)

There are two problems with the code:

1) Text::Parsewords is only used when there is whitespace present.  It
   should be used also for quotation marks, too, if they exist.
2) Text::Parsewords should not be removing backslash escapes.
3) Actually, there’s a third.  A final escaped space should also go
   through Text::ParseWords, instead of being stripped.

This commit fixes both things.

12 years agoIn bisect-runner.pl, default to 'cc' not 'gcc'.
Nicholas Clark [Mon, 24 Oct 2011 16:01:45 +0000 (18:01 +0200)]
In bisect-runner.pl, default to 'cc' not 'gcc'.

With this, bisect-runner.pl can build on Solaris (at least x86 Solaris) back
to 5.000.

12 years agoMake <~> work again under miniperl
Father Chrysostomos [Mon, 24 Oct 2011 13:14:31 +0000 (06:14 -0700)]
Make <~> work again under miniperl

Commit a3342be368 localised %ENV before calling csh for glob.  But
that causes <~> to stop working.  So this commit clears out %ENV
*except* for $ENV{HOME}.

It relies on the way magic works:  Before localising the %ENV hash, it
retrieves its $ENV{HOME} element, which is a magical scalar.  It calls
get-magic to store the value in the scalar itself, localises %ENV, and
then calls set-magic on the element, to signal (deceitfully) that an assignment has just happened.  So the cached value in the magical sca-
lar is used and assigned to the env var.

12 years agoAdd unit tests for Socket::{pack,unpack}_ipv6_mreq
Paul \"LeoNerd\" Evans [Thu, 20 Oct 2011 11:30:51 +0000 (12:30 +0100)]
Add unit tests for Socket::{pack,unpack}_ipv6_mreq

TonyC: add new ipv6_mreq.t test script to MANIFEST

12 years agoWrap some IPv6 sockopt constants and ipv6_mreq structure
Paul \"LeoNerd\" Evans [Thu, 13 Oct 2011 14:42:17 +0000 (15:42 +0100)]
Wrap some IPv6 sockopt constants and ipv6_mreq structure

12 years agoAdd another e-mail address for Jim Meyering
Father Chrysostomos [Sun, 23 Oct 2011 23:45:51 +0000 (16:45 -0700)]
Add another e-mail address for Jim Meyering

12 years agodon't segfault given string repeat count larger than 2^31
Jim Meyering [Sun, 23 Oct 2011 23:04:11 +0000 (16:04 -0700)]
don't segfault given string repeat count larger than 2^31

E.g., this overflows INT_MAX and overruns heap memory:

    $ perl -le 'print "v"x(2**31+1)'
    [Exit 139 (SEGV)]

(Perl_repeatcpy): Use the same type for "count" as our sole
callers in pp.c: IV (long), not I32 (int).  Otherwise, passing
the wider value to a narrower "I32 count"

12 years agoignore extra build product from ext/arybase/
Tony Cook [Sun, 23 Oct 2011 23:17:15 +0000 (10:17 +1100)]
ignore extra build product from ext/arybase/

12 years agofix g++ build breakage introduced in 03d9f026ae25
Tony Cook [Sun, 23 Oct 2011 23:15:37 +0000 (10:15 +1100)]
fix g++ build breakage introduced in 03d9f026ae25

C++ requires a cast to convert from void * to other types.

12 years agoperlfunc: List readpipe with qx
Father Chrysostomos [Sun, 23 Oct 2011 21:16:08 +0000 (14:16 -0700)]
perlfunc: List readpipe with qx

12 years agoAdd Laurent Dami to AUTHORS
Father Chrysostomos [Sun, 23 Oct 2011 20:44:14 +0000 (13:44 -0700)]
Add Laurent Dami to AUTHORS

12 years agoTest dumpvar.pl with objects whose classes contain ‘=’
Father Chrysostomos [Sun, 23 Oct 2011 20:24:21 +0000 (13:24 -0700)]
Test dumpvar.pl with objects whose classes contain ‘=’

12 years agoExamining objects through the 'x' command in the perl debugger doesn't
Laurent Dami [Sun, 23 Oct 2011 20:23:44 +0000 (13:23 -0700)]
Examining objects through the 'x' command in the perl debugger doesn't
work if those objects are blessed into class names containing '='.

This is due to incorrect parsing through 'split' in dumpvar.pl line 165.

12 years agoSynchronise Module::CoreList version in Maintainers.pl with CPAN
Chris 'BinGOs' Williams [Sun, 23 Oct 2011 19:14:59 +0000 (20:14 +0100)]
Synchronise Module::CoreList version in Maintainers.pl with CPAN

12 years agoUpdate Unicode-Collate to CPAN version 0.81
Chris 'BinGOs' Williams [Sun, 23 Oct 2011 19:08:59 +0000 (20:08 +0100)]
Update Unicode-Collate to CPAN version 0.81

  [DELTA]

  0.81  Sun Oct 23 21:32:36 2011
    - U::C::Locale newly supports locales: ml, mr, or, pa.
    - added loc_ml.t, loc_mr.t, loc_or.t, loc_pa.t in t.
    - updated some locales to CLDR 2.0 : mk, mt, nb, nn, ro, ru.

12 years agobisect-runner.pl now builds test_prep on OpenBSD back to 5.002
Nicholas Clark [Sun, 23 Oct 2011 17:39:04 +0000 (18:39 +0100)]
bisect-runner.pl now builds test_prep on OpenBSD back to 5.002

The historical OpenBSD hints file needs tweaking for compiler and linker
flags, and needs to be provided for revisions before it was added to the
source tree. perl.h and pp_sys.c need patching with the current (i.e. post
1996) #ifdef forest for [gs]etpgrp() variants. perl.h needs to include
<unistd.h> on OpenBSD, else POSIX.xs won't build.

OpenBSD also requires all the parallel Makefile fixes, as its make builds
targets in reverse lexical order, which reveals a lot of assumptions about
build order. (Such as Cwd nearly always being built in time, because it
sorts lexically far ahead of other XS modules dependant on it.)

12 years agobisect-runner.pl must patch Makefile.SH to avoid parallel make problems.
Nicholas Clark [Sun, 23 Oct 2011 16:28:51 +0000 (17:28 +0100)]
bisect-runner.pl must patch Makefile.SH to avoid parallel make problems.

Patch in all 4 "extra_dep" rules for XS modules if any are needed as it
simplifies the implementation. It does no harm to have dependency rules for
XS modules "from the future", as they are ignored if the module is not
present. None were needed before Cwd was first converted to an XS module,
so use that as the test for applicability.

Remove a short-lived set of Makefile rules that attempted to run the regen
scripts if needed (commits 9fec149bb652b6e9 and 5bab1179608f81d8), as they
obscure whether correctly regenerated headers were checked in, and can cause
spurious rebuilds or timing-related parallel make failures.

Remove the code to explicitly set @INC in POSIX's Makefile.PL, as the @INC
it sets will cause build failures with make_ext.pl if Cwd isn't built first,
whereas the @INC set by make_ext.pl has no such issue.

12 years agobisect-runner.pl now runs the testcase for targets config.{sh,h}
Nicholas Clark [Sun, 23 Oct 2011 15:49:19 +0000 (16:49 +0100)]
bisect-runner.pl now runs the testcase for targets config.{sh,h}

Previously for these two targets it assumed --test-build if a --match
wasn't supplied, and never ran a test case if one was supplied. Now
--test-build must be specified explicitly, otherwise the test case will be
run. For example, this makes it easy to bisect using a testcase which greps
config.sh or config.h. (Of course, one can do roughly this with the --match
option, but this will match against all generated files, which may generate
false positives.)

12 years ago[perl #101486] Make PL_curstash refcounted
Father Chrysostomos [Sat, 22 Oct 2011 18:06:35 +0000 (11:06 -0700)]
[perl #101486] Make PL_curstash refcounted

This stops PL_curstash from pointing to a freed-and-reused scalar in
cases like ‘package Foo; BEGIN {*Foo:: = *Bar::}’.

In such cases, another BEGIN block, or any subroutine definition,
would cause a crash.  Now it just happily proceeds.  newATTRSUB and
newXS have been modified not to call mro_method_changed_in in such
cases, as it doesn’t make sense.

12 years agoUpdate Archive-Extract to CPAN version 0.58
Chris 'BinGOs' Williams [Sat, 22 Oct 2011 20:22:59 +0000 (21:22 +0100)]
Update Archive-Extract to CPAN version 0.58

  [DELTA]

  Changes for 0.58    Sat Oct 22 20:25:00 2011
  ============================================
  * Apply patch from Craig A. Berry [rt#71846]
    make _untar_bin use Unix-syntax archive names
    on VMS

12 years agoregexp_unicode_prop.t: Add tests.
Karl Williamson [Sat, 22 Oct 2011 20:08:10 +0000 (14:08 -0600)]
regexp_unicode_prop.t: Add tests.

These tests make sure that a user-defined property may be included as
part of another user-defined property.

12 years agoperlunicode: Fix example.
Karl Williamson [Sat, 22 Oct 2011 20:03:47 +0000 (14:03 -0600)]
perlunicode: Fix example.

5.14 restricted the names of user-defined property subroutines to begin
with 'Is' and 'In', as has always been documented.  But the example
in that documentation didn't follow that restriction.

12 years agoUpdate perlfaq to CPAN version 5.0150036
Chris 'BinGOs' Williams [Sat, 22 Oct 2011 19:08:35 +0000 (20:08 +0100)]
Update perlfaq to CPAN version 5.0150036

  [DELTA]

  5.0150036 Sat 22 Oct 2011 16:20:34 +0100
    * Website moved from faq.perl.org -> learn.perl.org (ranguard)
    * Delete some questions/cleanup copy (ranguard)
    * Make perlfaq.pod shorter/cleaner (kablamo)
    * Many cleanups and corrections (shlomif)

12 years agoUpdate HTTP-Tiny to CPAN version 0.014
Chris 'BinGOs' Williams [Sat, 22 Oct 2011 19:03:12 +0000 (20:03 +0100)]
Update HTTP-Tiny to CPAN version 0.014

  [DELTA]

  0.014     2011-10-20 13:54:13 America/New_York

  [NEW FEATURES]

  - Adds additional shorthand methods for all common HTTP verbs
    (HEAD, PUT, POST, DELETE) [David Golden]

  - post_form() method for POST-ing x-www-form-urlencoded data
    [David Golden]

  - www_form_urlencode() utility method [David Golden]

12 years agoReimplement $[ as a module
Father Chrysostomos [Fri, 21 Oct 2011 12:58:40 +0000 (05:58 -0700)]
Reimplement $[ as a module

This commit reimplements $[ using PL_check hooks, custom pp func-
tions and ties.

Outside of its compile-time use, $[ is now parsed as a simple varia-
ble, so function calls like foo($[) are permitted, which was not the
case with the former implementation removed by e1dccc0.  I consider
that a bug fix.

The ‘That use of $[ is unsupported’ errors are out of necessity
deferred to run-time and implemented by a tied $[.

Indices between 0 and the array base are now treated consistently, as
are indices between a negative array base and zero.  That, too, is
a bug fix.

12 years agoperlrecharclass: Nit
Karl Williamson [Fri, 21 Oct 2011 01:22:35 +0000 (19:22 -0600)]
perlrecharclass: Nit

12 years agoFix a path in the release guide
Florian Ragwitz [Fri, 21 Oct 2011 01:28:36 +0000 (18:28 -0700)]
Fix a path in the release guide

12 years agoCreate a perldelta for 5.15.5
Florian Ragwitz [Fri, 21 Oct 2011 01:28:23 +0000 (18:28 -0700)]
Create a perldelta for 5.15.5

12 years agoAdd the 5.15.4 epigraph
Florian Ragwitz [Fri, 21 Oct 2011 01:10:56 +0000 (18:10 -0700)]
Add the 5.15.4 epigraph

12 years agoAdd a release announcement template to Porting
David Golden [Thu, 20 Oct 2011 23:13:59 +0000 (19:13 -0400)]
Add a release announcement template to Porting

This makes it just a little bit easier for release managers
and also fixes the perennial north-hemisphere bias in the future
release date.

12 years agoFix the installation of pod2html v5.15.4
Florian Ragwitz [Thu, 20 Oct 2011 20:25:54 +0000 (13:25 -0700)]
Fix the installation of pod2html

12 years agoAdd acknowledgements to the perldelta
Florian Ragwitz [Thu, 20 Oct 2011 17:22:27 +0000 (10:22 -0700)]
Add acknowledgements to the perldelta

12 years agoStop Porting/acknowledgements.pl from producing hatespace
Florian Ragwitz [Thu, 20 Oct 2011 17:22:07 +0000 (10:22 -0700)]
Stop Porting/acknowledgements.pl from producing hatespace

12 years agoAdd 5.15.4 to perlhist
Florian Ragwitz [Thu, 20 Oct 2011 03:37:12 +0000 (20:37 -0700)]
Add 5.15.4 to perlhist

12 years agoRemove the MANIFEST check from the release guide
Florian Ragwitz [Thu, 20 Oct 2011 03:35:07 +0000 (20:35 -0700)]
Remove the MANIFEST check from the release guide

We already have porting tests catching this. I really don't see how this could
end up being screwed or how it'd be more likely at this point during the release
process than at any other time.

12 years agoUpdate Module::CoreList for 5.14.4
Florian Ragwitz [Thu, 20 Oct 2011 03:20:22 +0000 (20:20 -0700)]
Update Module::CoreList for 5.14.4

12 years agoBump the perl version in various places for 5.15.4
Florian Ragwitz [Tue, 18 Oct 2011 18:21:09 +0000 (11:21 -0700)]
Bump the perl version in various places for 5.15.4

12 years agoGet perldelta into mostly finished state
Florian Ragwitz [Thu, 20 Oct 2011 15:58:47 +0000 (08:58 -0700)]
Get perldelta into mostly finished state

12 years agoDavid changelogged this
Florian Ragwitz [Thu, 20 Oct 2011 03:54:02 +0000 (20:54 -0700)]
David changelogged this

Thanks, David!

12 years ago[perl #101738] Make sv_sethek set the UTF8 flag correctly
Father Chrysostomos [Thu, 20 Oct 2011 06:54:57 +0000 (23:54 -0700)]
[perl #101738] Make sv_sethek set the UTF8 flag correctly

It was only ever turning it on, and not turning it off if the sv hap-
pened to have it on from its previous use.

This caused ref() (which uses sv_sethek(TARG,...)) to return a shared
scalar with the UTF8 flag on, even if it was supposed to be off.

For shared scalars, the UTF8 flag on ASCII strings does make a differ-
ence.  The pv *and* the flags are used in hash lookup, for speed.

So a scalar returned by ref() with the UTF8 flag on by mistake would
not work in hash lookups.  exists $classes{ref $foo} would return
false, even if there were an entry for that class.

12 years agoRemove untrue comment from t/op/ref.t
Father Chrysostomos [Thu, 20 Oct 2011 06:42:55 +0000 (23:42 -0700)]
Remove untrue comment from t/op/ref.t

This has been untrue since it was added in commit 6e592b3a.

12 years agobisect-runner.pl now builds test_prep on NetBSD back to 5.002
Nicholas Clark [Thu, 20 Oct 2011 07:26:33 +0000 (09:26 +0200)]
bisect-runner.pl now builds test_prep on NetBSD back to 5.002

The historical NetBSD hints need tweaking for dynamic linking flags, and
older versions of unixish.h needs tweaking to include <signal.h>

12 years agoRemove my todo commits from perldelta template
Steffen Mueller [Thu, 20 Oct 2011 06:46:08 +0000 (08:46 +0200)]
Remove my todo commits from perldelta template

12 years agoperldelta entry for improved AV/etc OUTPUT typemaps
Steffen Mueller [Thu, 20 Oct 2011 06:24:56 +0000 (08:24 +0200)]
perldelta entry for improved AV/etc OUTPUT typemaps

12 years agoDocument the new, fixed AV/etc typemaps
Steffen Mueller [Thu, 20 Oct 2011 06:24:35 +0000 (08:24 +0200)]
Document the new, fixed AV/etc typemaps

12 years agoMake core-cpan-diff work with a minicpan
Steffen Mueller [Thu, 20 Oct 2011 06:09:18 +0000 (08:09 +0200)]
Make core-cpan-diff work with a minicpan

It was trying to download a test file that doesn't exist in minicpans.

12 years agoDennis has (yet) another e-mail address :)
H.Merijn Brand [Wed, 19 Oct 2011 18:27:54 +0000 (20:27 +0200)]
Dennis has (yet) another e-mail address :)

12 years agoBuild failed in Jenkins: perl5 #80
Dennis Kaarsemaker [Wed, 19 Oct 2011 17:37:49 +0000 (19:37 +0200)]
Build failed in Jenkins: perl5 #80

Tiny typo, this will fix it:

[dkaarsemaker@dromedary perl]$ git diff

Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
12 years agoperldelta: document base.pm changes
David Golden [Wed, 19 Oct 2011 16:55:29 +0000 (12:55 -0400)]
perldelta: document base.pm changes

12 years agoregexec.c: Add another place to not re-fold
Karl Williamson [Sun, 16 Oct 2011 20:09:40 +0000 (14:09 -0600)]
regexec.c: Add another place to not re-fold

This adds regrepeat to no keep re-folding to the recent commits

12 years agoregexec.c: Another place to not re-fold
Karl Williamson [Sun, 16 Oct 2011 20:07:51 +0000 (14:07 -0600)]
regexec.c: Another place to not re-fold

A recent commit caused regexec.c to not keep calculating the folds in
one circumstance.  This one adds the case in regmatch

12 years agoutf8.c: Don't use swash for to_uni_lower() latin1 calls
Karl Williamson [Sun, 16 Oct 2011 19:36:36 +0000 (13:36 -0600)]
utf8.c: Don't use swash for to_uni_lower() latin1 calls

The lowercase of latin-1 range code points is known to the perl core, so
for those we can short-ciruit converting to utf8 and reading in a swash

12 years agoregexec.c: Less work in /i matching
Karl Williamson [Sun, 16 Oct 2011 18:47:21 +0000 (12:47 -0600)]
regexec.c: Less work in /i matching

If you watch an execution trace of regexec /i, often you will see it
folding the same thing over and over, as it backtracks or searches
ahead.  regcomp.c has now been changed to always fold UTF-8 encoded
EXACTF and EXCACTFU nodes.  This allows these to not be re-folded each
time.

This commit does it just for find_by_class().  Other commits will expand
this technique for other cases.

12 years agoutf8.c: Add comment
Karl Williamson [Sun, 16 Oct 2011 18:44:48 +0000 (12:44 -0600)]
utf8.c: Add comment

12 years agoutf8.c: White space only
Karl Williamson [Sun, 16 Oct 2011 18:43:54 +0000 (12:43 -0600)]
utf8.c: White space only

Indent newly formed blocks, and reflow comments and code to fit in
narrower space

12 years agoutf8.c: Add 'input pre-folded' flags to foldEQ_utf8_flags
Karl Williamson [Sun, 16 Oct 2011 18:38:58 +0000 (12:38 -0600)]
utf8.c: Add 'input pre-folded' flags to foldEQ_utf8_flags

This adds flags so that if one of the input strings is known to already
have been folded, this routine can skip the (redundant) folding step.

12 years agoregcomp.sym: Add comments
Karl Williamson [Sun, 16 Oct 2011 18:27:44 +0000 (12:27 -0600)]
regcomp.sym: Add comments

12 years agoregcomp.c: White space only
Karl Williamson [Sun, 16 Oct 2011 18:26:47 +0000 (12:26 -0600)]
regcomp.c: White space only

Indent the newly formed block, and reflow comments for narrower
available space.

12 years agoregcomp.c: generate folded for EXACTF and EXACTFU
Karl Williamson [Sun, 16 Oct 2011 18:00:13 +0000 (12:00 -0600)]
regcomp.c: generate folded for EXACTF and EXACTFU

regcomp.c folds the string in these two nodes except in one case.
Change that case to correspond with the predominant behavior.  This
enables future optimizations

12 years agoregexec.c: Stop looking for match sooner
Karl Williamson [Sun, 16 Oct 2011 17:43:08 +0000 (11:43 -0600)]
regexec.c: Stop looking for match sooner

This is a partial reversion of commit
7c1b9f38fcbfdb3a9e1766e02bcb991d1a5452d9
which went unnecessarily far in fixing the problem.

After studying the situation some more, I see more clearly what was
going on.  The point is that if you have only 2 characters left in the
string, but the pattern requires 3 to work, it's guaranteed to fail, so
pointless, and unnecessary work, to try.  So don't being a match trial
at a position when there are fewer than the minimum number of characters
necessary.  That is what the code before that commit did.  However it
neglected the fact that it is possible for a single character to match
multiple ones, so there is not a 1:1 ratio.  This new commit assumes the
worst possible ratio to calculate how far into a string is the furthest
a successful match could start.  This is going to in most cases still
look too far, but it is much better than always going up to the final
character, as the previous patch did.

The maximum ratio is guaranteed by Unicode to be 3:1, but when the
target isn't in UTF-8, the max is 2:1, determined simply by inspection
of the defined folds.  And actually, currently, the single case where it
isn't 1:1 doesn't come up here, because regcomp.c guarantees that that
match doesn't generate one of these EXACTFish nodes.  However, I expect
that to change for 5.16, and so am preparing for that case by making it
2:1.

12 years agoregexec.c: Add comment
Karl Williamson [Sun, 16 Oct 2011 17:40:13 +0000 (11:40 -0600)]
regexec.c: Add comment

12 years agoutf8.c: Add comments
Karl Williamson [Sun, 16 Oct 2011 16:04:51 +0000 (10:04 -0600)]
utf8.c: Add comments

12 years agopp.c: White space only
Karl Williamson [Sun, 16 Oct 2011 15:16:39 +0000 (09:16 -0600)]
pp.c: White space only

This outdents a block to the same level as the surrounding text, and
reflows the comments to take advantage of the extra space and use fewer
lines.

12 years agopp.c: Remove disabled code for context sensitive lc
Karl Williamson [Sun, 16 Oct 2011 15:04:15 +0000 (09:04 -0600)]
pp.c: Remove disabled code for context sensitive lc

This code was always #ifdef'd out.  It would have been used to convert
to a Greek final sigma from a non-final one, depending on context.  The
problem is that we can't know algorithmically if a final sigma is in
order or not.  I excerpt this quote, that I find persuasive, from
correspondence from Father Chrysostomos, who knows Greek:

"I cannot see how any algorithm can know to get it right.

"The letter σ (or Σ in capitals) represents the number 200 in Greek
numerals.  Those are not just ancient Greek numerals, but are used on a
regular basis even in modern Greek.  In many printed books ς is used in
place of ϛ, which represents the number 6.  So if casefolding should
change ͵ΑΣʹ to ͵αςʹ, or if an output layer changes ͵ασʹ similarly, it
will be changing the number (from 1200 to 1006).  You can’t get around
it by checking for the Greek numeral sign (ʹ), as sometimes the tonos
(΄), oxeia (´), or even the ASCII straight quote is used.  And often in
lists or chapter titles a dot is used instead of numeral sign.

"Also, σ is commonly used at the ends  of abbreviations. Changing ‘βλέπε
σ. 16’ (‘see page 16’) to ‘βλέπε ς. 16’ is not acceptable.

"So, no, I don’t think a programming language should be fiddling with σ
versus ς.  (A word processor is another matter.)"

12 years agoregexec.c: omit goto for the common case
Karl Williamson [Sun, 16 Oct 2011 14:30:15 +0000 (08:30 -0600)]
regexec.c: omit goto for the common case

The structure of this code is that initial setup is done and then gotos
or fall-through used to join for the main logic.  This commit just moves
a block, without logic changes, so that the more common case has a
fall-through instead of a goto.

12 years agoMake HvENAME** macros smaller and more efficient
H.Merijn Brand [Mon, 17 Oct 2011 15:15:32 +0000 (17:15 +0200)]
Make HvENAME** macros smaller and more efficient

Brian's comments:
if xhv_name_count == 1, HvENAME_HEK_NN returns null.
So there's no need to use that macro twice. Just check for -1

The real need to make these smaller is the fact that some precompilers
(e.g. HP-UX 10.20) cannot cope with the size these have grown to.  The
precompiler has since got an option (-Hnnn) to increase the macrospace
but that option never made it to these old compilers.

Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
12 years agoin op_dump() / -Dx, replace "DONE" with "NULL"
David Mitchell [Mon, 17 Oct 2011 12:00:32 +0000 (13:00 +0100)]
in op_dump() / -Dx, replace "DONE" with "NULL"

When displaying op_next, it currently shows a null value as "DONE",
which while meaningful on a completely compiled tree, is confusing
on a partially-built tree, where multiple ops may have an op_next of null.

12 years agosimplify op_dump() / -Dx sequencing
David Mitchell [Mon, 17 Oct 2011 11:46:51 +0000 (12:46 +0100)]
simplify op_dump() / -Dx sequencing

Currently, whenever we dump an op tree, we first call sequence(),
which walks the tree, creating address => sequence# mappings in
PL_op_sequence. Then when individual ops or op-next fields are displayed,
the sequence is looked up.

Instead, do away with the initial walk, and just map addresses on request.
This simplifies the code.

As a deliberate side-effect, it no longer assigns a seq# of zero to
null ops. This makes it easer to work out what's going on when you
call op_dump() during a debugging session with partially constructed
op-trees. It also removes the ambiguity in "====> 0" as to whether
op_next is NULL or just points to an op_null.

12 years agodocument boolSV(), which is used in the default typemap
Tony Cook [Tue, 11 Oct 2011 05:30:44 +0000 (16:30 +1100)]
document boolSV(), which is used in the default typemap

12 years agoperldelta: Mention another thing fixed by 2fc49ef14c
Father Chrysostomos [Sun, 16 Oct 2011 23:10:28 +0000 (16:10 -0700)]
perldelta: Mention another thing fixed by 2fc49ef14c

12 years agocv.h: comment typo
Father Chrysostomos [Sun, 16 Oct 2011 23:02:22 +0000 (16:02 -0700)]
cv.h: comment typo

Commit 7c60e434 removed the ‘match’.

12 years agoRestore null checks to stashpv_hvname_match [perl #101430]
Father Chrysostomos [Sun, 16 Oct 2011 20:18:46 +0000 (13:18 -0700)]
Restore null checks to stashpv_hvname_match [perl #101430]

Commit aa33328e8 inadvertently removed the null checks from
stashpv_hvname_match when adding UTF8 support, resulting in crashes it
List::Gen’s test suite.

12 years agoDocument calling convention for XS cmp routines
Father Chrysostomos [Sun, 16 Oct 2011 18:59:41 +0000 (11:59 -0700)]
Document calling convention for XS cmp routines

12 years agoAdd email addr to AUTHORS to keep tests quiet
Father Chrysostomos [Sun, 16 Oct 2011 05:53:28 +0000 (22:53 -0700)]
Add email addr to AUTHORS to keep tests quiet

12 years agoIncrease $File::DosGlob::VERSION from 1.04 to 1.05
Father Chrysostomos [Sun, 16 Oct 2011 05:53:10 +0000 (22:53 -0700)]
Increase $File::DosGlob::VERSION from 1.04 to 1.05

12 years agofix a typo in a comment
Thorsten Glaser [Sun, 16 Oct 2011 00:42:39 +0000 (00:42 +0000)]
fix a typo in a comment

someone already fixed the expanshions but kept the preformed on the same line

Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
12 years agoCorrect comment in pad.c
Father Chrysostomos [Sun, 16 Oct 2011 01:39:59 +0000 (18:39 -0700)]
Correct comment in pad.c

It said exactly the opposite of what was meant.

12 years agoperldelta up to c19fd8b40
Father Chrysostomos [Sat, 15 Oct 2011 23:55:07 +0000 (16:55 -0700)]
perldelta up to c19fd8b40

12 years agoTest uninit warnings for undef XS cmp retvals
Father Chrysostomos [Sat, 15 Oct 2011 21:08:31 +0000 (14:08 -0700)]
Test uninit warnings for undef XS cmp retvals

12 years agoMake XS sort routines work again
Father Chrysostomos [Sat, 15 Oct 2011 21:05:33 +0000 (14:05 -0700)]
Make XS sort routines work again

These stopped working when the CvROOT and CvXSUB fields were merged
in 5.10.0:

$ perl5.8.9 -le 'print sort utf8::is_utf8 2,1'
Usage: utf8::is_utf8(sv) at -e line 1.
$ perl5.10.0 -le 'print sort utf8::is_utf8 2,1'
12

(In the latter case, the utf8::is_utf8 routine is not being called.)

pp_sort has this:

    if (!(cv && CvROOT(cv))) {
if (cv && CvISXSUB(cv)) {

But CvROOT is the same as CvXSUB, so that block is never entered for
XSUBs, so this piece of code later on:

    if (is_xsub)
PL_sortcop = (OP*)cv;
    else
PL_sortcop = CvSTART(cv);

sets PL_sortcop to CvSTART for XSUBs, but CvSTART is NULL.  Later on,
this if condition fails:

if (PL_sortcop) {

so the XSUB is treated as being absent.

12 years agoAPItest: put mro stuff in a new BOOT block
Father Chrysostomos [Sat, 15 Oct 2011 13:54:13 +0000 (06:54 -0700)]
APItest: put mro stuff in a new BOOT block

I added it to an existing block without realising that it was for
a separate package and that the standard convention throughout
APItest.xs is to use a separate BOOT block for every tested feature.

12 years agoIn bisect-runner.pl's synopsis, the test program must be outside the cwd.
Nicholas Clark [Fri, 14 Oct 2011 12:03:44 +0000 (13:03 +0100)]
In bisect-runner.pl's synopsis, the test program must be outside the cwd.

Karl notes that the previous version, using C<test_prog.pl>, wrongly
suggests that a test program can be in the git checkout used for
bisecting. This won't work for an untracked file, because bisect.pl's first
sanity check will spot it and refuse to run. For a tracked file (such as an
existing test script in t), things may be far more confusing, as
bisect-runner.pl will end up running the current version for the revision
tested, instead of the version for the revision checked out at start time.