This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
10 years ago[perl #118843] work around recv() behaviour on cygwin
Tony Cook [Mon, 13 Jan 2014 05:20:00 +0000 (16:20 +1100)]
[perl #118843] work around recv() behaviour on cygwin

cygwin inherits recv behaviour from the Win32 sockets API which doesn't
modify the namebuf or it's associated size when you recv() from a
connected socket, handle this the same way Win32 does by zeroing the
length if it's the same as before calling recv().

Also adds some basic socket function tests to the core tests.

10 years agoperldelta for 24fc4d43fd
Tony Cook [Tue, 14 Jan 2014 21:58:03 +0000 (08:58 +1100)]
perldelta for 24fc4d43fd

10 years ago[perl #118817] avoid using 2 handles to write to the debug output
Tony Cook [Mon, 13 Jan 2014 22:24:40 +0000 (09:24 +1100)]
[perl #118817] avoid using 2 handles to write to the debug output

Previously the tests were run with the following config:

  NonStop=0 TTY=db.out LineInfo=db.out

This meant that the debugger would write the prologue, command prompts
and their results and the epilogue to one handle, and any line trace
information to the second handle.  Since those handles didn't share a
file position, the line trace info would overwrite the prologue, and
the epilogue would overwrite part of the line trace info.

When TTY=vt100 on Redhat systems this made the epilogue just long
enough to overwrite the line trace data that a test matched against,
causing the test to fail.

To fix this, I avoided setting LineInfo:

  NonStop=0 TTY=db.out

and since LineInfo defaults to using the TTY handle, both types of
content are written to db.out *without* overwriting each other.

Unfortunately this broke some other tests, since the command prompts
which were overwritten by line trace information are now mixed in with
the line traces - I've modified the tests that failed to account for
the included command lines.

10 years agoMerge branch 'experimental-autoderef' into blead
Ricardo Signes [Tue, 14 Jan 2014 14:33:14 +0000 (09:33 -0500)]
Merge branch 'experimental-autoderef' into blead

10 years agoperldelta for experimental::autoderef
Ricardo Signes [Tue, 14 Jan 2014 14:13:53 +0000 (09:13 -0500)]
perldelta for experimental::autoderef

10 years agorename aggref warnings to autoderef
Ricardo Signes [Tue, 14 Jan 2014 13:34:19 +0000 (08:34 -0500)]
rename aggref warnings to autoderef

10 years agoavoid a keys-on-scalar warning in a test
Ricardo Signes [Tue, 14 Jan 2014 13:30:46 +0000 (08:30 -0500)]
avoid a keys-on-scalar warning in a test

10 years agoMore test tweaks
Father Chrysostomos [Sat, 9 Nov 2013 14:56:42 +0000 (06:56 -0800)]
More test tweaks

10 years agoFix copy & paste error in tests
Father Chrysostomos [Sat, 9 Nov 2013 14:31:58 +0000 (06:31 -0800)]
Fix copy & paste error in tests

10 years agoIncrease $warnings::VERSION to 1.21
Father Chrysostomos [Sat, 9 Nov 2013 14:30:32 +0000 (06:30 -0800)]
Increase $warnings::VERSION to 1.21

10 years agoMake key/push $scalar experimental
Father Chrysostomos [Sat, 9 Nov 2013 14:30:03 +0000 (06:30 -0800)]
Make key/push $scalar experimental

We need a better name for the experimental category, but I have not
thought of one, even after sleeping on it.

10 years agoGet t/io/utf8.t working under PERL_UNICODE
Father Chrysostomos [Tue, 14 Jan 2014 14:30:23 +0000 (06:30 -0800)]
Get t/io/utf8.t working under PERL_UNICODE

10 years agoUse NOT_REACHED in one spot in hv.c
Father Chrysostomos [Tue, 14 Jan 2014 06:34:21 +0000 (22:34 -0800)]
Use NOT_REACHED in one spot in hv.c

This reduces the size of hv.o by 32 bytes under clang.

10 years agouse the more portable File::Spec->devnull for the stderr redirect
Tony Cook [Tue, 14 Jan 2014 05:54:29 +0000 (16:54 +1100)]
use the more portable File::Spec->devnull for the stderr redirect

this allows pending-author.t to work on MSWin32

10 years ago[perl #116971] avoid feeding manisort a bad @INC
Tony Cook [Tue, 14 Jan 2014 05:53:40 +0000 (16:53 +1100)]
[perl #116971] avoid feeding manisort a bad @INC

the C<< use TestInit qw(T) >> in manifest.t both changes to the
build tree *and* initializes $ENV{PERL5LIB} to "lib", so there's
no need fo runperl() to supply (an incorrect) -I.. when running
manisort.

10 years ago[perl #116971] avoid feeding utils run by utils.t a bad @INC
Tony Cook [Tue, 14 Jan 2014 04:46:27 +0000 (15:46 +1100)]
[perl #116971] avoid feeding utils run by utils.t a bad @INC

the C<< use TestInit qw(T) >> both changes to the build tree root
*and* initializes $ENV{PERL5LIB} to "lib", so there's no need for
runperl() to supply -I.. when testing each tool.

10 years agoperldelta for 466947750 and cf74bc378c0
Tony Cook [Tue, 14 Jan 2014 04:14:42 +0000 (15:14 +1100)]
perldelta for 466947750 and cf74bc378c0

10 years agoAdd examples for IO::Socket::UNIX.
Shlomi Fish [Mon, 13 Jan 2014 12:16:29 +0000 (14:16 +0200)]
Add examples for IO::Socket::UNIX.

In the SYNOPSIS.

See
http://www.nntp.perl.org/group/perl.perl5.porters/2014/01/msg211274.html:

<QUOTE>
From: Shlomi Fish
Subject: Patch for perldoc IO::Socket::UNIX

I noticed http://perldoc.perl.org/IO/Socket/UNIX.html does not contain any
examples (including not in the synopsis). If acceptable, I can a prepare a
patch that will include a simple server and a client for UNIX domain sockets,
see: http://www.mail-archive.com/beginners%40perl.org/msg116942.html
</QUOTE>

TC: modified the version number modification

10 years agoRemove an old note about autoflush from the POD.
Shlomi Fish [Mon, 13 Jan 2014 11:54:00 +0000 (13:54 +0200)]
Remove an old note about autoflush from the POD.

For IO::Socket::UNIX. See:

http://www.nntp.perl.org/group/perl.perl5.porters/2014/01/msg211275.html

<QUOTE>
And while you're at it, you might as well get rid of the autoflush note,
given IO::Socket 1.18 being fairly ancient (it shipped with 5.6.0).
</QUOTE>

10 years agoperldelta for -Dsysroot
Brian Fraser [Tue, 14 Jan 2014 03:19:08 +0000 (00:19 -0300)]
perldelta for -Dsysroot

10 years agoConfigure, sysroot: failing to guess usrinc needn't be fatal
Brian Fraser [Fri, 3 Jan 2014 04:32:09 +0000 (01:32 -0300)]
Configure, sysroot: failing to guess usrinc needn't be fatal

Previously, if we failed to guess usrinc, incpth, or libpth and were
cross-compiling, Configure would've bailed out immediately.  This commit
makes it more lenient if using -Dsysroot; in case of failure it will now
warn, but Configure will continue as usual; this is because the defaults
for those variables will now use sysroot, so they have a higher chance
of being accurate.

10 years agoConfigure, sysroot: Update defaults to use $sysroot
Brian Fraser [Thu, 2 Jan 2014 03:17:17 +0000 (00:17 -0300)]
Configure, sysroot: Update defaults to use $sysroot

10 years agoConfigure, sysroot: add --sysroot to cppflags
Brian Fraser [Mon, 30 Dec 2013 05:33:05 +0000 (02:33 -0300)]
Configure, sysroot: add --sysroot to cppflags

10 years agoIntroduce sysroot variable to Configure
Jess Robinson [Fri, 19 Oct 2012 18:05:25 +0000 (19:05 +0100)]
Introduce sysroot variable to Configure

This is borrowed from gcc and allows us to indicate the logical root
directory for headers and libraries, under which all -I and -L are
searched for. This patch adjusts Configure to search under $sysroot
(if supplied) for headers and libraries, instead of /.

--sysroot is added to ccflags and friends so that make in
ExtUtils::MakeMaker, and other extensions, will use it.

Currently this is only done if compiling with some variant of gcc
or g++.

10 years agoConfigure: use incpth, not usrinc, to search for headers.
Brian Fraser [Sat, 11 Jan 2014 05:50:47 +0000 (02:50 -0300)]
Configure: use incpth, not usrinc, to search for headers.

incpth is all the paths that will eventually be used by the compiler to
search for headers; usrinc is the first of those paths to have all three
of errno.h, stdio.h, and time.h inside.

10 years agoConfigure: Change a use of cc to $cc
Brian Fraser [Tue, 31 Dec 2013 16:33:42 +0000 (13:33 -0300)]
Configure: Change a use of cc to $cc

10 years agoConfigure: Add $cppflags to cppstdin
Brian Fraser [Wed, 1 Jan 2014 22:55:33 +0000 (19:55 -0300)]
Configure: Add $cppflags to cppstdin

10 years agoConfigure: Better guesses for usrinc and friends on some compilers
Brian Fraser [Tue, 31 Dec 2013 15:30:41 +0000 (12:30 -0300)]
Configure: Better guesses for usrinc and friends on some compilers

It turns out that we had some much more accurate way of getting
usrinc, libpth and incpth -- we can just ask the compiler.  This
was stashed away and only used when cross-compiling; what this
commit does is move things around so that it's also used in the
more common case.

10 years agoMake getc unset the utf8 flag on its retval
Father Chrysostomos [Mon, 13 Jan 2014 00:47:31 +0000 (16:47 -0800)]
Make getc unset the utf8 flag on its retval

The same scalar (the target) is used to return the value each time the
same getc operator is called.  It was turning on the utf8 flag when
necessary, but not turning it off.

(I suspect recv has the same bug.  I haven’t confirmed.)

10 years agoperldelta for c3970b8037
Tony Cook [Mon, 13 Jan 2014 02:01:14 +0000 (13:01 +1100)]
perldelta for c3970b8037

10 years agocorrect a Pod warning in the new perldelta template
Ricardo Signes [Mon, 13 Jan 2014 00:18:40 +0000 (19:18 -0500)]
correct a Pod warning in the new perldelta template

(cherry picked from commit 1332f10946560bb419517a581b7f56982fcc659f)

10 years agoreduce size of const static tables in time64.c
Daniel Dragan [Sun, 12 Jan 2014 08:39:50 +0000 (03:39 -0500)]
reduce size of const static tables in time64.c

The data in the const static arrays can be expressed with smaller
datatypes. This reduces binary size slightly.

10 years agoUse NOT_REACHED in one more place in op.c
Father Chrysostomos [Sun, 12 Jan 2014 15:55:30 +0000 (07:55 -0800)]
Use NOT_REACHED in one more place in op.c

Under clang, this reduces the size of op.o by 16 bytes.

$ clang -v
Apple LLVM version 4.2 (clang-425.0.27) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix

10 years agopp_ctl.c:pp_require: Remove redundant VMS null checks
Father Chrysostomos [Fri, 10 Jan 2014 13:53:19 +0000 (05:53 -0800)]
pp_ctl.c:pp_require: Remove redundant VMS null checks

SvPVX(newSVpv("",...)) should never return null.

10 years agopp_sys.c:S_doform: remove redundant null check
Father Chrysostomos [Sat, 11 Jan 2014 15:00:06 +0000 (07:00 -0800)]
pp_sys.c:S_doform: remove redundant null check

This static function is called from exactly two places that both die
aforehand if cv is null.  Further, the cv parameter is already marked
as non-null.

10 years agot/re/pat.t: Keep minitest passing
Father Chrysostomos [Sat, 11 Jan 2014 06:05:35 +0000 (22:05 -0800)]
t/re/pat.t: Keep minitest passing

10 years agoAdd Russel O'Connor to AUTHORS
Father Chrysostomos [Sat, 11 Jan 2014 06:01:43 +0000 (22:01 -0800)]
Add Russel O'Connor to AUTHORS

Apparently he was the original author of commit b0d9ce3858 (Oct ’99).

10 years agoUpdate Module-Build to CPAN version 0.4204
Chris 'BinGOs' Williams [Sat, 11 Jan 2014 17:39:02 +0000 (17:39 +0000)]
Update Module-Build to CPAN version 0.4204

  [DELTA]

0.4204 - Fri Jan 10 00:29:31 CET 2014

  [BUG FIXES]

  - Map conflicts back to runtime [Leon Timmermans]

  - Use mod2fname whenever it's available [Leon Timmermans, Brian Fraser]

  - Accept custom entries in meta_merge 1.4

10 years agoperldiag: Rewrap an entry for better splain output
Father Chrysostomos [Fri, 10 Jan 2014 14:17:24 +0000 (06:17 -0800)]
perldiag: Rewrap an entry for better splain output

10 years agoperldiag: Use (F) consistently
Father Chrysostomos [Fri, 10 Jan 2014 14:10:43 +0000 (06:10 -0800)]
perldiag: Use (F) consistently

and explain in the prose when there is an error.  One entry already
explained this.

10 years agoFix require’s get-magic handling for @INC elements
Father Chrysostomos [Fri, 10 Jan 2014 13:59:39 +0000 (05:59 -0800)]
Fix require’s get-magic handling for @INC elements

It was only calling get-magic before checking whether the argument was
a reference if the array was tied, which is not the only thing that
can cause an @INC element to have get-magic.  It should have been
checking for get-magic on the element itself (which is a faster
check, too).

And then there were too many FETCH calls.

I do not know whether we should be calling get-magic exactly once
when the ‘Can’t locate’ error occurs.  At least this commit reduces
the number of FETCHes.

10 years agoCorrect capitalization of Devel::ptkdb in perldebug
Brian Gottreu [Fri, 10 Jan 2014 19:36:32 +0000 (13:36 -0600)]
Correct capitalization of Devel::ptkdb in perldebug

10 years agoDon't multiply define _new_invlist_C_array.
Craig A. Berry [Fri, 10 Jan 2014 13:50:36 +0000 (07:50 -0600)]
Don't multiply define _new_invlist_C_array.

It's now an external function in regcomp.c, so it doesn't need to
also be defined in re_comp.c.  And in fact it mustn't be as the VMS
linker warns with:

%ILINK-W-MULDEF, symbol PERL__NEW_INVLIST_C_ARRAY multiply defined
        module: RE_COMP

which becomes a run-time error.

10 years agoregexec.c: Don't skip trying POSIX class if [] has individ char
Karl Williamson [Fri, 10 Jan 2014 05:06:24 +0000 (22:06 -0700)]
regexec.c: Don't skip trying POSIX class if [] has individ char

commit b99851e1941e002dd4816ee6c76fd49bbee1d7f3
Author: Karl Williamson <public@khwilliamson.com>
Date:   Wed Dec 4 10:06:04 2013 -0700

    PATCH: [perl #120675] Unexpected tainting via regex using locale

introduced a bug in which under /li matching a bracketed character class
that contains both characters and POSIX classes would skip matching
against any POSIX class.  The example in the added test illustrates the
problem:

    "h" =~ /[g\w]/li;    # Failed! in C locale

10 years agofix missing _rotl64 symbol on Visual C 2003
Daniel Dragan [Thu, 9 Jan 2014 04:44:16 +0000 (23:44 -0500)]
fix missing _rotl64 symbol on Visual C 2003

Due to a bug in the CRT (msvcr71.dll), these 2 functions are not defined
in any lib Perl can use (static link CRTs dont apply, Perl only uses DLL
CRTs), but they are available as intrinsics. This solves a link error
about missing symbol __rotl64 in hv.obj, from usage in hv_func.h, on 32 bit
USE_64_BIT_INT VC 2003 builds. _rotr64 is included for completeness. This
fix is filed as [perl #120925].

10 years agoMerge branch into blead to compile into C all POSIX classes...
Karl Williamson [Thu, 9 Jan 2014 21:08:07 +0000 (14:08 -0700)]
Merge branch into blead to compile into C all POSIX classes...

This series of commits creates C compile time inversion lists for the
remaining POSIX classes that didn't have them, plus IDStart and IDCont
which are used with the 'utf8' pragma, plus one that is used for
compiling regular expressions.

This should allow faster start up times for Perl programs that use these
on code points 256 and above, while having negligible effect on programs
that don't.  It also leads to some simplification of core code, and
removal of two arrays of smaller inversion lists.

10 years agoregexec.c: Use compiled-in POSIX definitions
Karl Williamson [Tue, 7 Jan 2014 17:39:19 +0000 (10:39 -0700)]
regexec.c: Use compiled-in POSIX definitions

This changes the regex engine to not go out to the disk when needing to
find the definitions of POSIX classes, but to use the compiled-in ones
introduced earlier in this commit series.

10 years agoIDStart and IDCont no longer go out to disk
Karl Williamson [Mon, 6 Jan 2014 20:41:46 +0000 (13:41 -0700)]
IDStart and IDCont no longer go out to disk

These are the base names for various macros used in parsing identifiers.
Prior to this patch, parsing a code point above Latin1 caused loading
disk files.  This patch causes all the information to be compiled into
the Perl binary.

10 years agoisWORDCHAR_uni(), isDIGIT_utf8() etc no longer go out to disk
Karl Williamson [Mon, 6 Jan 2014 19:22:02 +0000 (12:22 -0700)]
isWORDCHAR_uni(), isDIGIT_utf8() etc no longer go out to disk

Previous commits in this series have caused all the POSIX classes to be
completely specified at C compile time.  This allows us to revise the
base function used by all these macros to use these definitions,
avoiding reading them in from disk.

10 years agoMove initialization of PL_XPosix_ptrs[] to perl.c
Karl Williamson [Mon, 6 Jan 2014 19:14:31 +0000 (12:14 -0700)]
Move initialization of PL_XPosix_ptrs[] to perl.c

This was performed unconditionally in regcomp.c.  However, future
commits will use this from other code.  Almost all (but not completely
all) Perl code uses regular expressions, so only rarely will this small
amount of initialization be performed when it currently isn't.

10 years agoregen/mk_invlists.pl: White-space only
Karl Williamson [Mon, 6 Jan 2014 18:57:53 +0000 (11:57 -0700)]
regen/mk_invlists.pl: White-space only

This outdents a block to be in line with adjacent lines.

10 years agoregcomp.c: Reword expression for clarity
Karl Williamson [Mon, 6 Jan 2014 18:55:17 +0000 (11:55 -0700)]
regcomp.c: Reword expression for clarity

I believe the new version is clearer as to what is meant, and it brings
it in line with the same expression in nearby uses.

10 years agoRmv PL_Posix_ptrs
Karl Williamson [Mon, 6 Jan 2014 18:52:21 +0000 (11:52 -0700)]
Rmv PL_Posix_ptrs

Previous commits in this series have removed all uses of this global
array.  This completely removes it.

Since it is a global, consideration need be given to possible uses of it
outside the core.  It has never been externally documented, and is an
opaque structure whose internals have changed with every release.  The
functions used to access it are almost all static to regcomp.c; those
few that aren't have been hidden from all but the few .c files that need
to have access to them, via #if's.

10 years agoregcomp.c: Rmv remaining uses of PL_Posix_ptrs
Karl Williamson [Mon, 6 Jan 2014 18:41:53 +0000 (11:41 -0700)]
regcomp.c: Rmv remaining uses of PL_Posix_ptrs

Previous commits have removed all but a few uses of PL_Posix_ptrs.  This
removes the rest.  ASCII is the same whether over all code points, or
just the ASCII range, so we can substitute the version for all code
points.  There is an extra intersection introduced by this commit during
the construction of a synthetic start class under /a and /aa, but the
performance hit should be negligible.

10 years agoregcomp.c: Collapse two branches.
Karl Williamson [Mon, 6 Jan 2014 18:36:49 +0000 (11:36 -0700)]
regcomp.c: Collapse two branches.

Previous commits in this series have removed the need to special case
[:ascii:].  This commit removes the special casing.  There is a slight
performance penalty if this is the only POSIX class in the bracketed
class, and is being compiled under /a or /aa: An extra intersection will
be performed.  Since this is regex compilation, this should be
unnoticeable.

10 years agoregcomp.c: Trade a little time for simplicity
Karl Williamson [Sun, 5 Jan 2014 06:13:56 +0000 (23:13 -0700)]
regcomp.c: Trade a little time for simplicity

Perl currently has two sets of inversion lists for the POSIX classes
built in.  One set is for the entire Unicode range; the other for just
the ASCII range.  This latter set could be derived from the larger one
at run time by doing an intersection with ASCII.  This commit starts the
process of entirely removing the second set, thus avoiding its
bookkeeping.  This commit avoids one use of the ASCII set, instead
adding an intersection with ASCII after all the POSIX classes in a
bracketed character set have been combined.  Thus the penalty is one
intersection per compilation of each bracketed character classes that
contain POSIX classes.

10 years agoregcomp.c: Collapse two code branches
Karl Williamson [Sun, 5 Jan 2014 04:12:07 +0000 (21:12 -0700)]
regcomp.c: Collapse two code branches

Previous commits have simplified things so these two if-then-else
branches can be collapsed into one.

10 years agoKeep separate list of posix classes and complements
Karl Williamson [Sat, 4 Jan 2014 22:31:36 +0000 (15:31 -0700)]
Keep separate list of posix classes and complements

 In building up the list of code points that are matched by a bracketed
 character class, there can be both posix classes and complemented posix
 classes, like [\s\W].  By keeping each type in a separate list, we can
 simplify code in later commits.

10 years agoregcomp.c: White-space, comments only
Karl Williamson [Sat, 4 Jan 2014 21:45:54 +0000 (14:45 -0700)]
regcomp.c: White-space, comments only

This outdents code due to the removal of a block in the previous commit.
And it clarifies some comments about it.

10 years agoregcomp.c: Collapse two code branches
Karl Williamson [Sat, 4 Jan 2014 21:43:16 +0000 (14:43 -0700)]
regcomp.c: Collapse two code branches

The previous commit has enabled us to collapse the branches for dealing
with, e.g., \w and \W into the same branch, using a flag to indicate to
complement or not.

10 years agoregcomp.c: Use unconditional match list for POSIX above 255
Karl Williamson [Sat, 4 Jan 2014 21:05:44 +0000 (14:05 -0700)]
regcomp.c: Use unconditional match list for POSIX above 255

The POSIX classes, \w, [:blank:], always match the same non-Latin1 code
points regardless of locale, folding, etc.  They can be added to the
unconditional match list, and not have to be dealt with further.

10 years agoregcomp.c: White-space only
Karl Williamson [Sat, 4 Jan 2014 20:17:22 +0000 (13:17 -0700)]
regcomp.c: White-space only

This indents code properly that is within a block newly formed by the
previous commit

10 years agoKeep temp. separate list of foldable characters
Karl Williamson [Sat, 4 Jan 2014 20:08:42 +0000 (13:08 -0700)]
Keep temp. separate list of foldable characters

When populating what a bracketed character class should match, it turns
out that if we keep a separate list of code points whose folds may have
to be added, we can simplify the code.  This commit just adds the new
list.  Future commits will do the simplification.

10 years agoregcomp.c: Refactor some code dealing with e.g., [:posix:]
Karl Williamson [Sat, 4 Jan 2014 16:19:32 +0000 (09:19 -0700)]
regcomp.c: Refactor some code dealing with e.g., [:posix:]

We have a section of code already for handling POSIX classes under /l.
This moves all that handling to there, leading to simpler, easier to
read code, and modifies some comments  Further simplifications will be
in future commits.  We still have to special case [:blank:] on platforms
that don't have isblank().

10 years agoRemove PL_L1Posix_ptrs
Karl Williamson [Thu, 2 Jan 2014 23:44:39 +0000 (16:44 -0700)]
Remove PL_L1Posix_ptrs

This global array is no longer used, having been removed in previous
commits in this series.

Since it is a global, consideration need be given to possible uses of it
outside the core.  It has never been externally documented, and is an
opaque structure whose internals have changed with every release.  The
functions used to access it are almost all static to regcomp.c; those
few that aren't have been hidden from all but the few .c files that need
to have access to them, via #if's.

10 years agoRmv more code for delayed 'til runtime POSIX defns
Karl Williamson [Thu, 2 Jan 2014 16:50:16 +0000 (09:50 -0700)]
Rmv more code for delayed 'til runtime POSIX defns

Now that all the POSIX class definitions are known at compile time, we
no longer need to handle the case that some aren't known until runtime.
This removes some more code that dealt with that.

10 years agoregcomp.c: White-space only
Karl Williamson [Thu, 2 Jan 2014 16:48:51 +0000 (09:48 -0700)]
regcomp.c: White-space only

This outdents and reflows lines that were in a block removed in the
previous commit.

10 years agoCompile in list of foldable code points
Karl Williamson [Thu, 2 Jan 2014 16:47:03 +0000 (09:47 -0700)]
Compile in list of foldable code points

When constructing what matches code points under /i, Perl uses an
inversion list of all the possible code points that participate in
folds.  This number is relatively few compared to the possible universe
of code points, as most of the world's scripts aren't cased, and many
characters in the scripts that do fold aren't foldable (such as
punctuation).  Prior to this commit, the list for the above-Latin1 code
points was read-in from disk if and only if needed.  This commit causes
the list to be added to read-only data in a C header, trading a little
space in Perl's text segment for speed at execution.  This will enable
ripping out some code in this and future commits (offsetting the space
used by this one).

10 years agoregcomp.c: Reword comment to avoid ambiguity
Karl Williamson [Thu, 2 Jan 2014 05:10:12 +0000 (22:10 -0700)]
regcomp.c: Reword comment to avoid ambiguity

10 years agoregcomp.c: Rmv code for delayed 'til runtime POSIX defns
Karl Williamson [Thu, 2 Jan 2014 14:43:35 +0000 (07:43 -0700)]
regcomp.c: Rmv code for delayed 'til runtime POSIX defns

The previous commit made compile-time inversion lists available for all
POSIX classes, not just some..  Therefore the code that deals with not
having them available until runtime can be removed.  This commit does
the largest chunk of this code, used when a POSIX class is used within a
bracketed character class.  Later commits will remove more.

10 years agoCompile in all POSIX class inversion lists
Karl Williamson [Thu, 2 Jan 2014 03:25:00 +0000 (20:25 -0700)]
Compile in all POSIX class inversion lists

This changes charclass_invlists.h to have the complete definitions for
all the POSIX classes, like \w and [:alpha:].  Thus these won't have to
be loaded off disk at run-time.

Taking advantage of this will be done in stages in future commits

10 years agoregexec.c: White-space only
Karl Williamson [Tue, 7 Jan 2014 17:41:55 +0000 (10:41 -0700)]
regexec.c: White-space only

Align a macro continuation backslash

10 years agoutf8.c: Add comment
Karl Williamson [Mon, 6 Jan 2014 20:38:58 +0000 (13:38 -0700)]
utf8.c: Add comment

10 years agolib/B/Deparse.t: TODO test for [perl #120950]
Karl Williamson [Tue, 7 Jan 2014 17:32:20 +0000 (10:32 -0700)]
lib/B/Deparse.t: TODO test for [perl #120950]

This moves a test to earlier in the file where it now fails, and makes
it TODO.  It also creates a copy just after the failure, this time
without the TODO, to show that it is order dependent.

This is in preparation for some commits that exposed this bug.

10 years agoperlfunc: 'if' is in perlsyn, not perlop
Karl Williamson [Thu, 9 Jan 2014 18:12:33 +0000 (11:12 -0700)]
perlfunc: 'if' is in perlsyn, not perlop

Thanks to Hauke D for pointing this out.

10 years agoregcomp.c: Add some comments
Karl Williamson [Mon, 6 Jan 2014 16:40:42 +0000 (09:40 -0700)]
regcomp.c: Add some comments

10 years agopod/perlrecharclass: Document [:blank:], [:ascii:] for C89 platforms
Karl Williamson [Wed, 8 Jan 2014 18:12:07 +0000 (11:12 -0700)]
pod/perlrecharclass: Document [:blank:], [:ascii:] for C89 platforms

These POSIX classes were introduced in C99, and not all C89 platforms
recognize them.  The behavior there was previously undocumented

10 years agopod/perlrecharclass: Nits
Karl Williamson [Wed, 8 Jan 2014 18:11:41 +0000 (11:11 -0700)]
pod/perlrecharclass: Nits

10 years agot/re/charset.t: Better test descriptions
Karl Williamson [Wed, 8 Jan 2014 04:57:56 +0000 (21:57 -0700)]
t/re/charset.t: Better test descriptions

10 years agoAdd link to MS article about broken _utime() in VC++ 2013
Steve Hay [Tue, 7 Jan 2014 18:10:05 +0000 (18:10 +0000)]
Add link to MS article about broken _utime() in VC++ 2013

10 years agoPod-Perldoc: add Makefile.PL from distro
David Mitchell [Tue, 7 Jan 2014 13:55:36 +0000 (13:55 +0000)]
Pod-Perldoc: add Makefile.PL from distro

Since 3.21, the Makefile includes special code for copying perldoc.pod to
the right location, so use that rather than an auto-generated one. See

    [perl #120280] 5.19.5 intermittent failure t/search50.t

With this change, cpan/Pod-Perldoc/perldoc.pod is now copied to

    lib/perldoc.pod
rather than

    lib/Pod/perldoc.pod

(Its install location of lib/$version/pod/perldoc.pod is unaffected)

10 years agoadd 5.18.2 to perlhist
Ricardo Signes [Tue, 7 Jan 2014 12:45:04 +0000 (07:45 -0500)]
add 5.18.2 to perlhist

10 years agoadd epigraph for 5.18.2
Ricardo Signes [Tue, 7 Jan 2014 12:17:13 +0000 (07:17 -0500)]
add epigraph for 5.18.2

10 years agoIntegrate Module-CoreList 3.03 changes for v5.18.2
Chris 'BinGOs' Williams [Tue, 7 Jan 2014 10:26:40 +0000 (10:26 +0000)]
Integrate Module-CoreList 3.03 changes for v5.18.2

10 years agoUpdate Pod-Perldoc to CPAN version 3.21
Chris 'BinGOs' Williams [Mon, 6 Jan 2014 16:11:48 +0000 (16:11 +0000)]
Update Pod-Perldoc to CPAN version 3.21

  [DELTA]

3.21 - Mon Jan  6 02:17:07 UTC 2014
    * Add '-a' flag to search through perlapi
      documentation. Patch by Matthew Horsfall.
    * Apply RT #91733 to install perldoc.pod in the
      right place. Should fix RT #88898 too. Patch
      by Dave Mitchell.

3.21_01 - Tue Nov 19 17:07:46 UTC 2013
    * Do not modify @INC to look for docs perl RT #120357
      (Patch by Kent Fredric)
    * Prefer mandoc on bitrig
    * Fix typos

10 years agoFix up the MAP for version following its upgrade to version 0.9906
Steve Hay [Mon, 6 Jan 2014 12:51:32 +0000 (12:51 +0000)]
Fix up the MAP for version following its upgrade to version 0.9906

It appears that vutil.c is also customized for blead.

10 years agoversion has been upgraded from version 0.9904 to 0.9906
Steve Hay [Mon, 6 Jan 2014 09:31:10 +0000 (09:31 +0000)]
version has been upgraded from version 0.9904 to 0.9906

The customizations to two tests in CPAN RT#87513 are no longer required,
and lib/version/typemap no longer exists.

10 years agoUpgrade libnet from version 1.23 to 1.24
Steve Hay [Mon, 6 Jan 2014 08:54:50 +0000 (08:54 +0000)]
Upgrade libnet from version 1.23 to 1.24

10 years agoXS is more C than perl. Use C-comments please
H.Merijn Brand [Mon, 6 Jan 2014 07:26:26 +0000 (08:26 +0100)]
XS is more C than perl. Use C-comments please

10 years agoext/Win32CORE/Win32CORE.c, rmv redundant stack & mark code
Daniel Dragan [Mon, 6 Jan 2014 02:51:11 +0000 (21:51 -0500)]
ext/Win32CORE/Win32CORE.c, rmv redundant stack & mark code

Poping the mark and repushing it is redundant.

10 years agoutf8.c: Move a bunch of deprecated fcns to mathoms.c
Karl Williamson [Sun, 5 Jan 2014 05:21:14 +0000 (22:21 -0700)]
utf8.c: Move a bunch of deprecated fcns to mathoms.c

These functions will be out of the way in mathoms.  There were a few
that could not be moved, as-is, so I left them.

10 years agoutf8.c: Use existing macros instead of duplicate code
Karl Williamson [Sun, 5 Jan 2014 03:28:24 +0000 (20:28 -0700)]
utf8.c: Use existing macros instead of duplicate code

In all these cases, there is an already existing macro that does exactly
the same thing as the code that this commit replaces.  No sense
duplicating logic.

10 years ago[perl #120832] match -links checks against find(1) not expect
Tony Cook [Mon, 6 Jan 2014 02:58:56 +0000 (13:58 +1100)]
[perl #120832] match -links checks against find(1) not expect

Some filesystems only simulate . and .. so an empty directory doesn't
have a link count of 2.

10 years agoCrash in tab completion with Term::ReadLine::Gnu.
Shlomi Fish [Thu, 19 Dec 2013 11:06:42 +0000 (13:06 +0200)]
Crash in tab completion with Term::ReadLine::Gnu.

Perhaps it also affects Term::ReadLine::Perl / Term::ReadLine::Perl5 .
I still need to test with PadWalker installed. No tests were added, but
it passes all existing tests.

10 years agoUpdate Time-Piece to CPAN version 1.27
Chris 'BinGOs' Williams [Sun, 5 Jan 2014 12:23:03 +0000 (12:23 +0000)]
Update Time-Piece to CPAN version 1.27

  [DELTA]

1.27      2014-01-03
        - portability fixes for XS changes in 1.25_01

10 years agoFix regression with $version::LAX and bump release
John Peacock [Sat, 4 Jan 2014 20:42:14 +0000 (15:42 -0500)]
Fix regression with $version::LAX and bump release

When I created a standalone version::regex class, I forgot that
the $version::LAX and $version::STRICT regex's were documented
as available (though not exported).  Resolves CPAN ticket:

  https://rt.cpan.org/Ticket/Display.html?id=91858

(Committer also ran  porting/customized.t --regen)

10 years agoMerge LC_NUMERIC locale changes branch into blead
Karl Williamson [Sat, 4 Jan 2014 20:35:33 +0000 (13:35 -0700)]
Merge LC_NUMERIC locale changes branch into blead

LC_NUMERIC hasn't been implemented quite the same way as the other
locale categories.  And the implementation has been somewhat haphazard.
The other categories have implementations where if you're not under
locale you simply use different operations.  That isn't possible with
LC_NUMERIC, as it may need libc functions that are always subject to the
current locale no matter what Perl thinks.

There are two possible implemantation paths that come to my mind to deal
with this.  One is to keep correctly set the locale that the libc
routines need, and switch to the C locale during those places where it
shouldn't be used.  The other way is the opposite, to keep things in the
C locale generally, and switch when needed.

Unfortunately the implementation (prior to this series of commits) used
a combination of both possibilities.  I am still unsure what the
original intent was (not having spent the time to dig through the
history), or even if there was a consistent intent.

In any event, there has long been infrastructure that facilitates
switching back and forth between the current underlying locale and the C
locale.  However this was not documented until now, and so it is not
surprising that people who came later (including me) did not realize
it existed, and reinvented things, inconsistently.

What I've done here is move to the first implementation path mentioned
above.  I believe this is the one more likely to show up other bugs
during the remainder of the 5.19 development cycle.  I have changed and
added to the infrastructure, so that it knows whether we should be in
the C or the underlying locale, and switches/restores if and only if it
is necessary.  We can change to the other implementation path later
with only minimal code changes.

10 years agoAPItest.xs: #include fakesdio.h
Karl Williamson [Sat, 21 Dec 2013 23:51:59 +0000 (16:51 -0700)]
APItest.xs: #include fakesdio.h

This causes the printf's and other stdio functions in the file to
instead be the PerlIO equivalents.  We aren't trying to test libc
after all.  See http://markmail.org/message/h26bq75cxlfe3y7r

10 years agot/run/locale.t: White-space only
Karl Williamson [Tue, 24 Dec 2013 05:03:46 +0000 (22:03 -0700)]
t/run/locale.t: White-space only

Indent because of new block introduced in the previous commit

10 years agoPATCH: [perl #120723] Setting LC_NUMERIC breaks parsing of constants
Karl Williamson [Wed, 11 Dec 2013 23:25:02 +0000 (16:25 -0700)]
PATCH: [perl #120723] Setting LC_NUMERIC breaks parsing of constants

This is the final patch for [perl #120723], and adds tests for it.

LC_NUMERIC Locale handling was broken for code during the compilation phase,
such as BEGIN {} blocks.  This is because, for some reason, perl.c set
LC_NUMERIC unconditionally back to the C locale right after locale
initialization.  I suspect that was to allow the core's parsing to not be
affected by locale.  However, earlier commits in this series have added code to
change/restore the locale during sections of the parsing where this might
matter, so this setting to the C locale is not needed.