platform/upstream/perl.git
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.

10 years agonumeric.c: White-space only
Karl Williamson [Tue, 17 Dec 2013 05:40:26 +0000 (22:40 -0700)]
numeric.c: White-space only

Indent and reflow to 79 columns as a result of the previous commit's
adding a block around this code.

10 years agotoke.c: Set locale for all scan_num() calls; restore instead of reset
Karl Williamson [Thu, 12 Dec 2013 06:15:25 +0000 (23:15 -0700)]
toke.c: Set locale for all scan_num() calls; restore instead of reset

One call of Perl_scan_num changes the locale around it.  However, this
function is called in several places, including from outside the file.
It is better to set the locale within scan_num() at the point where
it matters.  And, instead of setting the locale unconditionally, it is
better to change it only if it needs to be changed, and restore it to
the original.  Otherwise the locale can be changed to something
unexpected.

10 years agovutil.c: Use existing macros instead of reinventing them
Karl Williamson [Sat, 4 Jan 2014 17:53:17 +0000 (18:53 +0100)]
vutil.c: Use existing macros instead of reinventing them

If there had been documentation referring to these macros, I would have
known they existed instead of reinventing them (not as well as the
originals).

10 years agoPOSIX:strtod() should restore the locale it changed
Karl Williamson [Thu, 12 Dec 2013 06:04:40 +0000 (23:04 -0700)]
POSIX:strtod() should restore the locale it changed

Prior to this commit, the locale remained as strtod() set it to.  I
could not find a case where this actually was a problem, as the other
code is good about checking for and changing the locale where needed.
But uses of atoi(), strtol() in locales where there are spaces in
numbers likely would break.

10 years agoUse new macros to make sure LC_NUMERIC is correctly set
Karl Williamson [Tue, 17 Dec 2013 05:34:19 +0000 (22:34 -0700)]
Use new macros to make sure LC_NUMERIC is correctly set

This uses the macros added in the previous commit to make sure the
current LC_NUMERIC locale is correct during the operation being done;
restoring it to its prior condition afterwards.  Outside of 'use locale'
the locale should be C; inside it should be the underlying default
locale.  The macros handle the whole thing.  In most of the places here,
the code was trying to do what the macros do more elegantly, but there
are some additional places where we set the locale correctly around an
operation that is affected by it.

10 years agoperl.h: Add macros and comments
Karl Williamson [Tue, 17 Dec 2013 04:47:27 +0000 (21:47 -0700)]
perl.h: Add macros and comments

These macros are used in making sure the current locale is the correct
one for the circumstances.  I'm not a fan of this type of code
generation macro, but this just extends what is already there, and
aren't all that complicated.

10 years agoperl.h: Revise another locale setting macro
Karl Williamson [Thu, 12 Dec 2013 05:55:43 +0000 (22:55 -0700)]
perl.h: Revise another locale setting macro

We generally don't want to switch to the default underlying locale
unless we are in the scope of some form of 'use locale'.  Prior to this
commit, this code did not allow the switch for
'use locale ":not_characters"'.

10 years agoperl.h: Revise a locale setting macro
Karl Williamson [Thu, 12 Dec 2013 05:50:28 +0000 (22:50 -0700)]
perl.h: Revise a locale setting macro

This macro toggles to the C locale.  It should not depend on being in
the scope of 'use locale' to do that, so remove the check.  I couldn't
figure out a test case for this, but I'm pretty sure there is a some
convoluted scheme that this change averts a bug from.

10 years agolocale.c: Avoid writing libc static storage
Karl Williamson [Thu, 12 Dec 2013 02:00:15 +0000 (19:00 -0700)]
locale.c: Avoid writing libc static storage

I don't believe this code was causing any problem, but it can overwrite
static storage returned by setlocale().  It's safer to create a copy
first.

10 years agoHide some undocumented functions from perlapi
Karl Williamson [Thu, 12 Dec 2013 01:04:47 +0000 (18:04 -0700)]
Hide some undocumented functions from perlapi

These functions should not be called from any other places than they are
now.  They have been marked in the public API as undocumented.  I
presume they are there because they are called from various parts of the
Perl core, so can't be static.  But this suppresses them from being
listed so people won't be tempted to use them.

10 years agolocale.c: Add comments
Karl Williamson [Wed, 11 Dec 2013 23:53:25 +0000 (16:53 -0700)]
locale.c: Add comments

This documents much of what I learned about how things work while
tracking down [perl #120723].

10 years agolocale.c: White-space only
Karl Williamson [Fri, 13 Dec 2013 04:41:10 +0000 (21:41 -0700)]
locale.c: White-space only

Outdent code removed from a block by the previous commit

10 years agolocale.c: Always set state variables for a new locale
Karl Williamson [Wed, 11 Dec 2013 21:30:45 +0000 (14:30 -0700)]
locale.c: Always set state variables for a new locale

This function is called when a new underlying LC_NUMERIC locale has been
set.  If that locale is the same as the current underlying one, some
setup is skipped.  However, prior to this commit, more was skipped than
should have been.  The reason is that even if the underlying locale is
the same, it could be that LC_NUMERIC has been toggled to the "C"
locale, and so the information could be inconsistent.  By always setting
the information, we ensure consistency.

This commit ia a portion of the fix for [perl #120723].  Tests will be
added with the final commit for it.

10 years agoperl.h: Move some macro definitions
Karl Williamson [Wed, 11 Dec 2013 23:54:49 +0000 (16:54 -0700)]
perl.h: Move some macro definitions

This places related definitions together in the file.

10 years agoChange preferred email for Karl Williamson in AUTHORS
Karl Williamson [Sat, 4 Jan 2014 18:25:22 +0000 (19:25 +0100)]
Change preferred email for Karl Williamson in AUTHORS

10 years agoporting/customized.t --regen
Father Chrysostomos [Sat, 4 Jan 2014 18:14:47 +0000 (10:14 -0800)]
porting/customized.t --regen

10 years agoFinal patch to sync with version.pm CPAN release
John Peacock [Sat, 4 Jan 2014 15:51:55 +0000 (10:51 -0500)]
Final patch to sync with version.pm CPAN release

A last couple of test tweaks so that version.pm now passes all
tests from 5.005_04 to blead.  NOTE the pure Perl version::vpp is
not default for all Perl releases prior to v5.10.

10 years agoext/Devel-Peek/t/Peek.t: Don't leave PATH tainted.
Brian Fraser [Sat, 28 Sep 2013 13:34:34 +0000 (10:34 -0300)]
ext/Devel-Peek/t/Peek.t: Don't leave PATH tainted.

The tests originally left $ENV{PATH} tainted.  However, now that
the file ends up using fresh_perl_is(), $ENV{PATH} may end up
being used in some systems, like in Windows.

10 years agoFixups for ext/Devel-Peek/t/Peek.t
Brian Fraser [Fri, 27 Sep 2013 17:59:12 +0000 (14:59 -0300)]
Fixups for ext/Devel-Peek/t/Peek.t

10 years agodump.c, sv_dump: Escape the name of the OUTSIDE sub
Brian Fraser [Fri, 27 Sep 2013 17:58:49 +0000 (14:58 -0300)]
dump.c, sv_dump: Escape the name of the OUTSIDE sub

10 years agosv_peek didn't add quotes before, doesn't need them now
Brian Fraser [Mon, 5 Aug 2013 04:01:35 +0000 (01:01 -0300)]
sv_peek didn't add quotes before, doesn't need them now

10 years agoDevel::Peek: Test that we dump CvOUTSIDE properly
Brian Fraser [Mon, 5 Aug 2013 03:59:50 +0000 (00:59 -0300)]
Devel::Peek: Test that we dump CvOUTSIDE properly

10 years agoMake dump.c nul-and-UTF8 clean
Brian Fraser [Sat, 23 Mar 2013 23:26:32 +0000 (20:26 -0300)]
Make dump.c nul-and-UTF8 clean

10 years agovxs.inc: Move code to after declarations
Karl Williamson [Sat, 4 Jan 2014 17:43:22 +0000 (10:43 -0700)]
vxs.inc: Move code to after declarations

This macro, added in e1c774b6, is actual code, and needs to be
after the declarations, so that C89 compilers compile it.

10 years ago[perl #120657] Fix require PADTMP when @INC=(sub{},sub{})
Father Chrysostomos [Sat, 4 Jan 2014 14:05:41 +0000 (06:05 -0800)]
[perl #120657] Fix require PADTMP when @INC=(sub{},sub{})

It was passing a freed scalar to subsequent subs, breaking
Test::Without::Module:

sub fake_module {
    my (undef,$module_file) = @_;
    !1
}
unshift @INC, (\&fake_module)x2;
require "${\'whatever'}";
__END__
panic: attempt to copy freed scalar 7fe8d0829820 to 7fe8d082a0f0 at - line 3.

Obviously, doing:

    SAVETMPS;
    ...
    nsv = sv_newmortal();
    ...
    FREETMPS; # free all tmps created since SAVETMPS

inside a loop that only assigns to nsv the first time through will
cause nsv to point to a freed scalar on subsequent iterations.

It was stupid of me to make that mistake in commit 9ffd39a to
begin with.

The extra file name SV here will simply have to last until the
require call finishes, something I was trying to avoid by putting it
after SAVETMPS.

10 years ago[Merge] [rt.cpan.org #88458] version XS routine revamp
Father Chrysostomos [Sat, 4 Jan 2014 13:15:32 +0000 (05:15 -0800)]
[Merge] [rt.cpan.org #88458] version XS routine revamp

This branch moves the version-specific XS and C functions in
universal.c and util.c into two new files, #included by the former.
This is to make it easier to keep core and CPAN in synch.  Up till
now, changes made to one had to be manually applied to the other
(except that was not actually happening all the time, so they got out
of synch).

A corresponding CPAN release has yet to be made.

10 years agoporting/customized.t --regen
Father Chrysostomos [Thu, 2 Jan 2014 14:16:48 +0000 (06:16 -0800)]
porting/customized.t --regen

10 years agoDo not crash if passed garbage like array.
John Peacock [Sun, 29 Dec 2013 19:33:48 +0000 (14:33 -0500)]
Do not crash if passed garbage like array.

Somehow we lost the test that caught getting passed an arrayref
instead of a simple scalar.  Also integrate fix from perl rt#120872.

10 years agoEnsure that version::_VERSION is always exported
John Peacock [Sun, 29 Dec 2013 18:47:11 +0000 (13:47 -0500)]
Ensure that version::_VERSION is always exported

Now that version.pm doesn't mess with the symbol table, we need
to make sure that version::_VERSION exists at all times.  Also
change the name of the method that implements UNIVERSAL::VERSION
so that it is visually distinct and matches the other version.pm
derived methods.

10 years agoApply patch from Sprout to make vxs.inc better
John Peacock [Sun, 29 Dec 2013 17:26:30 +0000 (12:26 -0500)]
Apply patch from Sprout to make vxs.inc better

[Committer’s note: I already had the vxs.inc changes in my branch,
 so this patch only includes the version.pm changes.]

10 years agoIntegrate CPAN release of version.pm 0.9905
John Peacock [Sun, 29 Dec 2013 16:49:43 +0000 (11:49 -0500)]
Integrate CPAN release of version.pm 0.9905

When adding the CPAN-distributed files for version.pm, it is necessary
to delete an entire block out of lib/version.pm, since that code is
only necessary with the CPAN release.  Within core Perl, there is no
version::vxs implementation class any more.

10 years agoGrab latest changes from CPAN 0.9905
John Peacock [Wed, 25 Dec 2013 19:19:19 +0000 (14:19 -0500)]
Grab latest changes from CPAN 0.9905

10 years agoIntegrate CPAN version.pm release into core
John Peacock [Mon, 9 Dec 2013 23:23:20 +0000 (18:23 -0500)]
Integrate CPAN version.pm release into core

10 years agovxs.inc: Fix thinko
Father Chrysostomos [Fri, 25 Oct 2013 12:57:47 +0000 (05:57 -0700)]
vxs.inc: Fix thinko

This was causing test failures after rebasing against blead.

10 years agoUpdate Maintainers.pl for version.pm changes
Father Chrysostomos [Fri, 25 Oct 2013 04:54:45 +0000 (21:54 -0700)]
Update Maintainers.pl for version.pm changes

I *hope* I got it all correct.  At least cmp_version.t now passes.

10 years agoUse VXS_ prefix for XSUB bodies in CPAN version
Father Chrysostomos [Fri, 25 Oct 2013 00:56:13 +0000 (17:56 -0700)]
Use VXS_ prefix for XSUB bodies in CPAN version

The names of the functions in core and in the CPAN version will con-
flict otherwise.

Since perl versions before 5.16.0 did not have XS_INTERNAL (which
could solve this problem another way, making the functions static),
it’s easier just to use different names.

10 years agoIntegrate the rest of CPAN’s vxs.inc
Father Chrysostomos [Wed, 11 Sep 2013 20:19:31 +0000 (13:19 -0700)]
Integrate the rest of CPAN’s vxs.inc

Uppercase macros instead of functions (so the CPAN version can call
its own non-core functions if need be), plus a poor man’s typemap
(VTYPECHECK).

10 years agovxs.inc: Disallow multiple args to XS_version_normal
Father Chrysostomos [Wed, 11 Sep 2013 20:17:59 +0000 (13:17 -0700)]
vxs.inc: Disallow multiple args to XS_version_normal

Also rename the argument.

This is part of bringing perl and CPAN into synch.

10 years ago[rt.cpan.org #88495] bad string comparison in version->qv
Father Chrysostomos [Wed, 11 Sep 2013 20:10:15 +0000 (13:10 -0700)]
[rt.cpan.org #88495] bad string comparison in version->qv

qv is affected, too.  A package called "ver" inheriting from version
should be able to create "ver" objects via ->qv.

10 years agovxs.inc: Integrate the CPAN version of version_new
Father Chrysostomos [Wed, 11 Sep 2013 19:51:44 +0000 (12:51 -0700)]
vxs.inc: Integrate the CPAN version of version_new

No behaviour changes; just rearranged, and with a few extra #ifdefs.

10 years ago[rt.cpan.org #88495] version->new str cmp bug
Father Chrysostomos [Wed, 11 Sep 2013 16:03:14 +0000 (09:03 -0700)]
[rt.cpan.org #88495] version->new str cmp bug

We shouldn’t consider ver and version to be the same class.

If ver inherits from version, ver->new should give a ver object.

This string comparison bug has only ever existed in the perl core
version of the version routines.  It was ed1db70e1224 in 5.16 that
introduced it.

10 years agovxs.inc: Import UNIVERSAL::VERSION from CPAN
Father Chrysostomos [Wed, 11 Sep 2013 07:23:07 +0000 (00:23 -0700)]
vxs.inc: Import UNIVERSAL::VERSION from CPAN

No functional changes, just cosmetic (and it works with older
perls, too).

This is part of bringing perl and CPAN into synch.

10 years agouniversal.c: include vutil.h
Father Chrysostomos [Wed, 11 Sep 2013 16:01:39 +0000 (09:01 -0700)]
universal.c: include vutil.h

Subsequent changes to vxs.inc will require it.

10 years agovxs.inc: arg list checking for UNIVERSAL::VERSION
Father Chrysostomos [Wed, 11 Sep 2013 06:46:47 +0000 (23:46 -0700)]
vxs.inc: arg list checking for UNIVERSAL::VERSION

This brings it in line with the CPAN implementation.  It’s hard to
test this, as the tests should go in cpan/version, but the pure-Perl
implementation doesn’t check the number of arguments.

10 years agovxs.inc: Add dVAR define for CPAN use
Father Chrysostomos [Wed, 11 Sep 2013 05:12:45 +0000 (22:12 -0700)]
vxs.inc: Add dVAR define for CPAN use

This is part of bringing perl and CPAN into synch.

10 years agovxs.inc: Don’t hard-code class name
Father Chrysostomos [Wed, 11 Sep 2013 05:11:30 +0000 (22:11 -0700)]
vxs.inc: Don’t hard-code class name

This is part of bringing perl and CPAN into synch.

10 years agovutil.c: Add preproc code specific to CPAN
Father Chrysostomos [Tue, 10 Sep 2013 07:33:19 +0000 (00:33 -0700)]
vutil.c: Add preproc code specific to CPAN

The purpose is to bring the files into synch so that later version.pm
upgrades involve dropping files into place.

This requires changing vutil.h a bit to work in the core.

10 years agoImport vutil.h from the CPAN version dist
Father Chrysostomos [Wed, 11 Sep 2013 03:39:32 +0000 (20:39 -0700)]
Import vutil.h from the CPAN version dist

This will be needed when we switch vutil.c over to using macros for
version functions, the way the CPAN dist does it.

10 years agoExtract version routines into two new files
Father Chrysostomos [Tue, 10 Sep 2013 07:14:59 +0000 (00:14 -0700)]
Extract version routines into two new files

This is to make synchronisation between the CPAN distribution and the
perl core easier.

The files have different extensions to match what the CPAN distribu-
tion will have.  vutil.c is a separate compilation unit that the CPAN
dist already has.  vxs.inc will be included by vxs.xs (vxs.c is obvi-
ously alreday taken, being generated from vxs.xs).

In the perl core util.c includes vutil.c and universal.c
includes vxs.inc.

10 years agoUpdate ExtUtils-MakeMaker to CPAN version 6.86
Chris 'BinGOs' Williams [Sat, 4 Jan 2014 12:24:00 +0000 (12:24 +0000)]
Update ExtUtils-MakeMaker to CPAN version 6.86

  [DELTA]

6.86 Sat Jan  4 12:17:53 GMT 2014

    No changes from 6.85_07

6.85_07 Wed Jan  1 18:55:22 GMT 2014
    Bug fixes:
    * Expanded test coverage for metafiles

    Doc fixes:
    * Documentation expanded to mention JSON metafiles

6.85_06 Mon Dec 30 23:14:37 GMT 2013
    Bug fixes:
    * Explicitly require dynaloader before using mod2fname

6.85_05 Sun Dec 29 11:25:00 GMT 2013
    Bug fixes:
    * Export 'configure' section of prereqs when meta-spec version 2

    Doc fixes:
    * Document BUILD_REQUIRES defaults

6.85_04 Mon Dec 23 15:00:14 GMT 2013

    No changes since v6.85_03 fixing repo tags

6.85_03 Mon Dec 23 14:55:37 GMT 2013
    Bug fixes:
    * RT#91540 PREREQ_FATAL not recognised on command line

6.85_02 Tue Dec 17 10:13:28 GMT 2013
    New features:
    * Added PPM_UNINSTALL_EXEC and PPM_UNINSTALL_SCRIPT options
      to PPD generation

6.85_01 Mon Dec 16 13:15:43 GMT 2013
    Bug Fixes:
    * harden xsubpp locating loop in MM_Unix

10 years agoUpdate Module-Load to CPAN version 0.28
Chris 'BinGOs' Williams [Sat, 4 Jan 2014 10:31:51 +0000 (10:31 +0000)]
Update Module-Load to CPAN version 0.28

  [DELTA]

0.28    Sat Jan  4 11:07:27 GMT 2014
* Fix 'Prototype after' warnings

0.26    Sat Jan  4 10:08:35 GMT 2014
* New functions added (reisub)
* Documented by magnolia

10 years agoperldelta for d_libname_unique
Brian Fraser [Sat, 4 Jan 2014 03:03:35 +0000 (00:03 -0300)]
perldelta for d_libname_unique

10 years agoTeach ExtUtils::CBuilder to handle mod2fname properly
Brian Fraser [Wed, 27 Nov 2013 16:25:25 +0000 (13:25 -0300)]
Teach ExtUtils::CBuilder to handle mod2fname properly