This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
8 years agoevat => eval as found by Tom Hukins
H.Merijn Brand [Wed, 4 Jun 2014 07:07:24 +0000 (09:07 +0200)]
evat => eval as found by Tom Hukins

8 years agoDisallow omitting % and @ on hash and array names
Dagfinn Ilmari Mannsåker [Fri, 9 May 2014 23:04:58 +0000 (00:04 +0100)]
Disallow omitting % and @ on hash and array names

Really old Perl let you omit the @ on array names and the % on hash
names in some spots.  This has issued a deprecation warning since Perl
5.0, and is no longer permitted.

8 years agoBring all lines in CoreList.pod under 80 cols
kafka [Tue, 13 May 2014 20:26:41 +0000 (22:26 +0200)]
Bring all lines in CoreList.pod under 80 cols

8 years agorefactor pp_tied
Daniel Dragan [Tue, 27 May 2014 21:14:20 +0000 (17:14 -0400)]
refactor pp_tied

remove some redundant code regarding stack handling

-removed:
  -4/-8 pop on SP
  +4/+8 push on SP
  PUTBACK

function's machine code size dropped from 0xC5 to 0xBD bytes on VC2003

8 years agoCorrect heading level of perllexwarn changes summary
Thomas Sibley [Tue, 3 Jun 2014 06:24:12 +0000 (23:24 -0700)]
Correct heading level of perllexwarn changes summary

It was a =head2 in a sea of =head3s.

8 years agoReduce env var calls to one in ExtUtils::Install
Chris 'BinGOs' Williams [Tue, 3 Jun 2014 21:51:20 +0000 (22:51 +0100)]
Reduce env var calls to one in ExtUtils::Install

8 years agoUpgrade Module::Metadata from version 1.000023 to 1.000024
Steve Hay [Tue, 3 Jun 2014 21:33:28 +0000 (22:33 +0100)]
Upgrade Module::Metadata from version 1.000023 to 1.000024

8 years agoAdd quietening env var option to pm_to_blib in ExtUtils::Install
Chris 'BinGOs' Williams [Tue, 3 Jun 2014 20:16:48 +0000 (21:16 +0100)]
Add quietening env var option to pm_to_blib in ExtUtils::Install

8 years ago375ed12a broke Config::IniFiles
Jarkko Hietaniemi [Tue, 3 Jun 2014 12:41:34 +0000 (08:41 -0400)]
375ed12a broke Config::IniFiles

... among other things: https://rt.perl.org/Ticket/Display.html?id=122021

PerlIO::scalar (aka opening scalars for IO) has fileno of -1.

This (and probably other exotic PerlIO objects which have funny fds)
requires special care.

8 years ago38d96942 missed a side-effect in PerlIO_open flags parsing.
Jarkko Hietaniemi [Mon, 2 Jun 2014 13:57:28 +0000 (09:57 -0400)]
38d96942 missed a side-effect in PerlIO_open flags parsing.

The mode++ was essential in allowing 'rb' for the PerlIO_open() flags.
Without the mode++ the 'b' was left unprocessed and this caused
the oflags to become bogus.

Compress::Bzip2 caught this: https://rt.perl.org/Ticket/Display.html?id=122012
(also Unicode::Map8, Text::Scan, and otehrs)

While doing this, realized that for the "O_BINARY versus O_TEXT" it's
probably the clearest to test for the non-zero-ness of those two flags.

(Is there any "unit testing" of PerlIO? In this case it would be:
 PerlIO_open -> PerlIO_openn -> PerlIOBuf_open -> PerlIOUnix_open ->
 PerlIOUnix_oflags with mode of "rb")

8 years agoperl.h: move PERL_GET_CONTEXT fallbacks earlier
David Mitchell [Tue, 3 Jun 2014 09:06:20 +0000 (10:06 +0100)]
perl.h: move PERL_GET_CONTEXT fallbacks earlier

A recent commit added a 'dTHX' to inline.h for the first time;
this broke -DPERL_GLOBAL_STRUCT* builds.

The fix is to move the 'fallback' definitions in perl.h, such as

    #ifndef PERL_GET_CONTEXT
    #  define PERL_GET_CONTEXT             PERL_GET_INTERP

to earlier in the file so that they come before

    #include "inline.h"

8 years agoFix 2 overlong verbatim lines in Hash::Util
Karl Williamson [Mon, 2 Jun 2014 19:35:13 +0000 (13:35 -0600)]
Fix 2 overlong verbatim lines in Hash::Util

And regenerate known issues to not warn about the rest

8 years agoUpdate Porting/Maintainers.pl for Devel-PPPort upgrade in ea4b7f3223
Steve Hay [Mon, 2 Jun 2014 17:42:01 +0000 (18:42 +0100)]
Update Porting/Maintainers.pl for Devel-PPPort upgrade in ea4b7f3223

Also remove all the IGNORABLE files. These are not required in core for
cpan/ distributions; we save space by leaving them out. And we don't want
EXCLUDED files either.

8 years agoRemove undefined Makefile.SH 'translators' target for x2p.
Andy Dougherty [Mon, 2 Jun 2014 16:48:48 +0000 (12:48 -0400)]
Remove undefined Makefile.SH 'translators' target for x2p.

Since x2p has been removed, there is no translators target in the
Makefile, but it was still referenced in some definitions.  This was a
fatal error for Solaris make.

8 years agotemporary fix for https://rt.cpan.org/Ticket/Display.html?id=96126
Tony Cook [Mon, 2 Jun 2014 13:12:35 +0000 (23:12 +1000)]
temporary fix for https://rt.cpan.org/Ticket/Display.html?id=96126

8 years agoUpgrade Module-Metadata from version 1.000022 to 1.000023
Steve Hay [Mon, 2 Jun 2014 12:25:54 +0000 (13:25 +0100)]
Upgrade Module-Metadata from version 1.000022 to 1.000023

8 years agoperldelta for 207c4a46d1
Steve Hay [Mon, 2 Jun 2014 12:09:14 +0000 (13:09 +0100)]
perldelta for 207c4a46d1

8 years agoBump Locale-Codes from 3.30 to 3.31
Sullivan Beck [Wed, 28 May 2014 15:45:59 +0000 (11:45 -0400)]
Bump Locale-Codes from 3.30 to 3.31

8 years agox2p is gone, do not install its pod.
Jarkko Hietaniemi [Mon, 2 Jun 2014 12:53:04 +0000 (08:53 -0400)]
x2p is gone, do not install its pod.

8 years agoUse PERL_UNUSED_RESULT.
Jarkko Hietaniemi [Sat, 31 May 2014 20:56:00 +0000 (16:56 -0400)]
Use PERL_UNUSED_RESULT.

(1) Enhance its description.
(2) Simplify it: define only if has warn_unused_result.
(3) Make it use STMT_START { ... } STMT_END to be less GNU-extensiony.
(4) Redo 04783dc7 ("fix 'ignoring return value' compiler warnings") with it.

8 years agoremove intentional leak in win32/win32.c ansify_path
Daniel Dragan [Mon, 19 May 2014 23:45:41 +0000 (19:45 -0400)]
remove intentional leak in win32/win32.c ansify_path

The leak for was workaround for a bug (feature?) of Borland RTL where
putenv kept the passed in pointer, see commit 3e5d884e5e .
Borland was removed so this goes too. Leak found with Dr Memory.
msvcrt.dll from WinXP SP3 does not leak on a call to putenv, static linked
CRT from VC6 was confirmed to leak.

8 years agoregcomp.c - cleanup the ahocorasick start class logic so it more self-documenting
Yves Orton [Sat, 19 Apr 2014 12:42:47 +0000 (14:42 +0200)]
regcomp.c - cleanup the ahocorasick start class logic so it more self-documenting

The logic of setting up an AHO-CORASICK regex start class was not fully
encapsuated in the make_trie_failtable() function, which itself was
poorly named. Merged the code into make_trie_failtable() and renamed
it to construct_ahocorasick_from_trie().

8 years agoHash::Util - fixes to hash stats and add bucket_stats_formatted()
Yves Orton [Sun, 13 Apr 2014 11:29:44 +0000 (13:29 +0200)]
Hash::Util - fixes to hash stats and add bucket_stats_formatted()

* we should do the mean/stddev on the on the occupied buckets not all buckets.

This was always intended to the be average chain-length, which implies
that empty buckets with no-chains at all are excluded.

* Add bucket_stats_formatted(), bump version

Creates reports like this:

    Keys: 500 Buckets: 314/512 Quality-Score: 1.01 (Good)
    Utilized Buckets: 61.33% Optimal: 97.66% Keys In Collision: 37.20%
    Chain Length - mean: 1.59 stddev: 0.81
    Buckets 512         [0000000000000000000000000111111111111111111111122222222222233334]
    Len   0 Pct:  38.67 [#########################]
    Len   1 Pct:  34.57 [######################]
    Len   2 Pct:  19.53 [############]
    Len   3 Pct:   5.47 [####]
    Len   4 Pct:   1.17 [#]
    Len   5 Pct:   0.59 []
    Keys    500         [1111111111111111111111111111111111111111222222222222222222333334]
    Pos   1 Pct:  62.80 [########################################]
    Pos   2 Pct:  27.40 [##################]
    Pos   3 Pct:   7.40 [#####]
    Pos   4 Pct:   1.80 [#]
    Pos   5 Pct:   0.60 []

* Make it possible to get stats on PL_strtab

* bump version to 0.17

8 years agohv_func.h - fix seed initialization in sdbm and djb2 hashing algorithms.
Yves Orton [Sun, 13 Apr 2014 10:54:12 +0000 (12:54 +0200)]
hv_func.h - fix seed initialization in sdbm and djb2 hashing algorithms.

In a previous commit I added code to "mix in" the length of the
string into the seed used by these functions, to avoid issues with
zero seeds, and with the hope that it makes it harder to create
multicollision attacks against these hash functions.

Unfortunately when I restructured the seed logic for the inline
functions in hv_func.h I messed it up, and these hash functions
were broken. I never noticed because they are both such bad hash
functions for our needs that I never built with them, and we have
no infrastructure to make it easy to test building with non-standard
hash functions so it never got automatically tested. Hopefully
at some point someone will find a round-tuit and teach Configure
about selecting alternate hash functions.

8 years agouniversal.c - utf8::downgrade($x,FAIL_OK) is not supposed to treat FAIL_OK as an...
Yves Orton [Fri, 21 Mar 2014 16:47:45 +0000 (17:47 +0100)]
universal.c - utf8::downgrade($x,FAIL_OK) is not supposed to treat FAIL_OK as an integer

8 years agot/loc_tools.pl: Clarify comment
Karl Williamson [Fri, 16 May 2014 03:25:32 +0000 (21:25 -0600)]
t/loc_tools.pl: Clarify comment

8 years agoperllocale: Wrap some text in C<...>
Karl Williamson [Sun, 1 Jun 2014 20:03:53 +0000 (14:03 -0600)]
perllocale: Wrap some text in C<...>

8 years agoregcomp.c: Skip work that is a no-op
Karl Williamson [Sun, 11 May 2014 23:41:48 +0000 (17:41 -0600)]
regcomp.c: Skip work that is a no-op

There are a few characters in the Latin1 range that can be folded to by
above-Latin1 characters.  Some of these are folded to as part of a
single character fold, like KELVIN SIGN folds to 'k'.  More are folded
to as part of a multi-character fold.  Until this commit, there wasn't a
quick way to distinguish between the two classes.  A couple of places
only want the single-character ones.  It is more efficient to look for
just those than to include the multi-char ones which end up not doing
anything.  This uses a bit in l1_char_class_tab.h to indicate those
characters that are in the desired class.

8 years agoregcomp.c: Update comment to new reality
Karl Williamson [Mon, 12 May 2014 00:20:54 +0000 (18:20 -0600)]
regcomp.c: Update comment to new reality

8 years agoUpdate Socket to CPAN version 2.014
Chris 'BinGOs' Williams [Sun, 1 Jun 2014 10:30:21 +0000 (11:30 +0100)]
Update Socket to CPAN version 2.014

  [DELTA]

2.014   2014/06/01 00:09:13
        [BUGFIXES]
         * Make sure to (UV)-cast arguments sprintf'ed with UVf
         * Use STRUCT_OFFSET() instead of plain C99 offsetof() (RT96036)
         * Fix the regexp used to filter for numeric IP addresses in
           fake_getaddrinfo() (RT95758)
         * Protect against getprotobyname() not being available (RT90217)

8 years agoUpdate Digest-SHA to CPAN version 5.92
Chris 'BinGOs' Williams [Sun, 1 Jun 2014 10:29:00 +0000 (11:29 +0100)]
Update Digest-SHA to CPAN version 5.92

  [DELTA]

5.92  Sun Jun  1 00:15:44 MST 2014
  - fixed reserved-word clash when compiling with C++
    -- use 'classname' instead of 'class'
      -- ref. SHA.xs (rt.cpan.org #96090)
  - silenced MSC compiler warning about signed/unsigned comparison
    -- ref. SHA.xs (rt.cpan.org #95830)

5.91  Fri May 16 10:21:44 MST 2014
  - restored original 'addfile' for use on opened file handles
    -- allows callbacks in place of actual files
      -- ref. IO::Callback (rt.cpan.org #95643)
  - re-established inheritance from Digest::base
    -- to pick up future Digest enhancements automatically
  - cleaned up documentation

5.90  Wed May  7 07:57:08 MST 2014
  - consolidated all dynamic memory allocation into XSUBs
    -- streamlines referencing of SHA objects
    -- simplifies DESTROYing of objects
  - enhanced Makefile.PL to allow 'use warnings'
    -- automatically reverts to $^W for early Perls
  - scrubbed C and Perl code to remove all compiler warnings

5.89  Sat Apr 19 05:14:48 MST 2014
  - added universal newlines mode ("U") to addfile and shasum
    -- based on Python Universal Newlines concept
      -- newlines identical across MacOS, DOS, and UNIX
    -- will deprecate portable mode ("p") in future
      -- "U" mode is cleaner and more efficient
  - enhanced performance
    -- reduced number of dynamic memory allocations
    -- sped up addfile method with use of C code
      -- ref. SHA.xs (_addfilebin and _addfileuniv)
  - eliminated experimental -M option in favor of new -R option
    -- reverses order of digest module preference
    -- undocumented: for test and development use only
  - sealed memory leak in SHA.xs
    -- arose only with SvPVbyte exceptions during eval
  - patched inheritence bug (ref: rt.cpan.org #94830)
    -- use sv_isobject/sv_derived_from instead of sv_isa
  - added 'allocated' flag to SHA structure (ref. src/sha.h)
    -- to guard against Perl double frees

8 years agoRegen META files after CPAN-Meta update
Chris 'BinGOs' Williams [Sun, 1 Jun 2014 10:26:30 +0000 (11:26 +0100)]
Regen META files after CPAN-Meta update

8 years agoUpdate CPAN-Meta to CPAN version 2.141520
Chris 'BinGOs' Williams [Sun, 1 Jun 2014 10:22:45 +0000 (11:22 +0100)]
Update CPAN-Meta to CPAN version 2.141520

  [DELTA]

2.141520  2014-05-31 23:41:13-04:00 America/New_York

  [DOCUMENTED]

  - Clarified use of 'file' for the 'provides' field in the Spec

8 years agoregen for removed Configure symbol
Tony Cook [Sun, 1 Jun 2014 10:12:21 +0000 (20:12 +1000)]
regen for removed Configure symbol

8 years agoremove BOOTSTRAP_CHARSET from Configure (khw's request)
H.Merijn Brand [Sun, 1 Jun 2014 09:39:45 +0000 (11:39 +0200)]
remove BOOTSTRAP_CHARSET from Configure (khw's request)

8 years agorun/locale.t: Add explanation for when tests fail
Karl Williamson [Wed, 14 May 2014 02:55:09 +0000 (20:55 -0600)]
run/locale.t: Add explanation for when tests fail

Commit ff4377fe256e32a3bc10175c01dd6c68c9ce7ddb silenced some irrelevant
warnings that occur from some sh programs on some systems.  It does this
by closing STDERR.  That is fine unless the test fails.  This commit
changes things so that a failure now outputs a diagnostic note about how
to see the test failure details.

It would be better to automaticallty rerun the test with STDERR open
when this happens, but that is more effort than it's worth IMO, given
the likely rarity of the failures here.

8 years agorun/locale.t: Remove redundant block
Karl Williamson [Wed, 14 May 2014 02:53:11 +0000 (20:53 -0600)]
run/locale.t: Remove redundant block

This has { { foo } }
Only one level is necessary. outdents.

8 years agoperlebcdic: Nit, and remove obsolete text
Karl Williamson [Sun, 1 Jun 2014 03:08:55 +0000 (21:08 -0600)]
perlebcdic: Nit, and remove obsolete text

This pod is now in UTF-8 encoding.

8 years agoperlebcdic: Clean-up
Karl Williamson [Sat, 31 May 2014 23:11:10 +0000 (17:11 -0600)]
perlebcdic: Clean-up

There are much simpler ways to do some things than were given.  This
also makes some clarifications, and removes obsolete text, shortens some
too long verbatim lines.

8 years agoutfebcdic.h: Add comments
Karl Williamson [Sat, 31 May 2014 23:09:53 +0000 (17:09 -0600)]
utfebcdic.h: Add comments

8 years agoPATCH: [perl #120386]: av_len documentation
Karl Williamson [Fri, 15 Nov 2013 20:40:03 +0000 (13:40 -0700)]
PATCH: [perl #120386]: av_len documentation

I think I have incorporated everybody's concerns in this patch.

8 years agolib/utf8.pm: Document unicode_to_native() and inverse
Karl Williamson [Tue, 15 Oct 2013 04:58:30 +0000 (22:58 -0600)]
lib/utf8.pm: Document unicode_to_native() and inverse

8 years agolib/utf8.pm: wrap code examples in pod with C<>
Karl Williamson [Tue, 15 Oct 2013 04:38:24 +0000 (22:38 -0600)]
lib/utf8.pm: wrap code examples in pod with C<>

8 years agolib/locale.t: Add tests, fix test names
Karl Williamson [Sat, 31 May 2014 20:27:54 +0000 (14:27 -0600)]
lib/locale.t: Add tests, fix test names

It is unfortunate that tests are in two places in this file.  The reason
is to avoid doing eval's (to avoid any perturbations that might cause)
but be under the scope of two different locale forms.  This adds text to
remind maintainers that they should create copies when adding tests, and
includes the new tests that have previously been added to one place but
not the other, and includes the new improved test names.

8 years agolib/locale.t: Add some tests
Karl Williamson [Sat, 31 May 2014 20:11:35 +0000 (14:11 -0600)]
lib/locale.t: Add some tests

8 years agolib/locale.t: Improve test names; add some names
Karl Williamson [Sat, 31 May 2014 20:10:00 +0000 (14:10 -0600)]
lib/locale.t: Improve test names; add some names

8 years agosv.c: Add comment
Karl Williamson [Sat, 31 May 2014 18:45:41 +0000 (12:45 -0600)]
sv.c: Add comment

8 years agoFix definition of toCTRL() for EBCDIC
Karl Williamson [Tue, 13 May 2014 00:29:41 +0000 (18:29 -0600)]
Fix definition of toCTRL() for EBCDIC

The definition was incorrect.  When going from control to printable
name, we need to go from Latin1 -> Native, so that e.g., a 65 gets
turned into the native 'A'

8 years agoAdd some (UN)?LIKELY() to UTF8 handling
Karl Williamson [Tue, 6 May 2014 19:18:28 +0000 (13:18 -0600)]
Add some (UN)?LIKELY() to UTF8 handling

It's very rare actually for code to be presented with malformed UTF-8,
so give the compiler a hint about the likely branches.

8 years agoMove some deprecated utf8-handling functions to mathoms
Karl Williamson [Tue, 6 May 2014 04:46:48 +0000 (22:46 -0600)]
Move some deprecated utf8-handling functions to mathoms

This entailed creating new internal functions for some of them to call
so that the functionality can be retained during the deprecation period.

8 years agoMake is_utf8_char_buf() a macro
Karl Williamson [Tue, 6 May 2014 04:41:14 +0000 (22:41 -0600)]
Make is_utf8_char_buf() a macro

This function is now more efficiently implemented as a synonym for
isUTF8_CHAR().  We retain the Perl_is_utf8_char_buf() function for code
that calls it that way.

8 years agoutf8.h: Use new macro type from previous commit
Karl Williamson [Tue, 6 May 2014 04:17:33 +0000 (22:17 -0600)]
utf8.h: Use new macro type from previous commit

This allows for an efficient isUTF8_CHAR macro, which does its own
length checking, and uses the UTF8_INVARIANT macro for the first byte.
On EBCDIC systems this macro which does a table lookup is quite a bit
more efficient than all the branches that would normally have to be
done.

8 years agoregen/regcharclass.pl: Add new macro type with intermed checking
Karl Williamson [Tue, 6 May 2014 03:09:36 +0000 (21:09 -0600)]
regen/regcharclass.pl: Add new macro type with intermed checking

This adds a new macro generation option for inputs that are checked
elsewhere for buffer overflow, but otherwise needs validity checks.

8 years agoCreate isUTF8_CHAR() macro and use it
Karl Williamson [Tue, 6 May 2014 02:43:47 +0000 (20:43 -0600)]
Create isUTF8_CHAR() macro and use it

This macro will inline the code to determine if a character is
well-formed UTF-8 for code points below a certain value, falling back to
a slower function for larger ones.  On ASCII platforms, it will inline
for well-beyond all legal Unicode code points.  On EBCDIC, it currently
does it for code points up to 0x3FFF.  This could be increased, but our
porting tests do the regen every time to make sure everything is ok, and
making it larger slows that down.  This is worked around on ASCII by
normally commenting out the code that generates this info, but including
in utf8.h a version that did get generated.  This is static information
and won't change.  (This could be done for EBCDIC too, but I chose not
to at this time as each code page has a different macro generated, and
it gets ugly getting all of them in utf8.h)

Using this macro allowed for simplification of several functions in
utf8.c

8 years agoutf8.h: Move macro within file
Karl Williamson [Tue, 6 May 2014 02:13:31 +0000 (20:13 -0600)]
utf8.h: Move macro within file

This places it in a better situated spot for later commits

8 years agoutf8.c: Move a static function to inline.h
Karl Williamson [Tue, 6 May 2014 01:37:58 +0000 (19:37 -0600)]
utf8.c: Move a static function to inline.h

This is in preparation for it being called from outside utf8.c.  It is
renamed to have a leading underscore to emphasize its private nature

8 years agoregen/regcharclass.pl: Comment, white-space only
Karl Williamson [Tue, 6 May 2014 00:59:35 +0000 (18:59 -0600)]
regen/regcharclass.pl: Comment, white-space only

This commit indents code to properly align with the new block introduced
by the previous commit, and adds a comma to a comment

8 years agoregen/regcharclass.pl: Update to use EBCDIC utilities
Karl Williamson [Tue, 6 May 2014 00:50:01 +0000 (18:50 -0600)]
regen/regcharclass.pl: Update to use EBCDIC utilities

This causes the generated regcharclass.h to be valid on all
supported platforms

8 years agoregen/regcharclass.pl: make a 'do' into a 'require'
Karl Williamson [Tue, 6 May 2014 00:14:55 +0000 (18:14 -0600)]
regen/regcharclass.pl: make a 'do' into a 'require'

This is because a future commit will execute this code multiple times,
and the library file should only be read once.

8 years agoRevert bootstrapping to non-ASCII platforms
Karl Williamson [Mon, 5 May 2014 23:16:03 +0000 (17:16 -0600)]
Revert bootstrapping to non-ASCII platforms

This effectively reverts commit 3ded5eb052cdc3f861ec0c0ff85348086d653be0.

That commit created a scheme to bootstrap Perl onto a non-ASCII
platform, by adding the allowing a Configure option that caused the
compiled code to bypass a number of normal macro definitions and use
slower, generic ones, sufficient to get miniperl to compile on the
target architecture.  One would then use miniperl to run a few scripts
that would re-order certain header files,  Using this one could then
recompile all of perl, and once that was done, use it to recompile to
use the normal fast macros.

This worked, but was a cumbersome process.  We now have the
infrastructure, since commit 6ff677df5d6fe0f52ca0b6736f8b5a46ac402943,
to cross compile on an ASCII platform to EBCDIC, the likely only
non-ASCII character set to ever be used.  So the new infrastructure will
be used in future commits.

8 years agoRevert "regen/regcharclass.pl: Make more EBCDIC-friendly"
Karl Williamson [Mon, 5 May 2014 22:30:10 +0000 (16:30 -0600)]
Revert "regen/regcharclass.pl: Make more EBCDIC-friendly"

This reverts commit c4c8e61502fd5289a080f20332c6e3f9f23ce6e2.

It turns out that this scheme to bootstrap regcharclass.h onto a machine
not running ASCII created too much manual labor getting things to work.
A better solution is to cross compile on an ASCII machine for the
target.  Commit 6ff677df5d6fe0f52ca0b6736f8b5a46ac402943 created the
infrastructure to do that, and this commit starts the process of
changing regen/regcharclass.pl to use that.

8 years agoregen/regcharclass_multi_char_folds.pl: Don't do unnecessary work
Karl Williamson [Tue, 29 Apr 2014 00:03:02 +0000 (18:03 -0600)]
regen/regcharclass_multi_char_folds.pl: Don't do unnecessary work

This bit code is not about just ASCII folds, so skip it when doing just
those.

8 years agoregen/mk_invlists.pl: Remove unnecessary #if's
Karl Williamson [Mon, 28 Apr 2014 23:52:42 +0000 (17:52 -0600)]
regen/mk_invlists.pl: Remove unnecessary #if's

Even though this file is not intended to be human consumable, it is
annoying to see #if ... #endif #if ...
where the #endif and #if could be consolidated.

It turns out not to be hard to do that.

8 years agoregen/mk_invlists.pl: White-space only
Karl Williamson [Mon, 28 Apr 2014 23:50:14 +0000 (17:50 -0600)]
regen/mk_invlists.pl: White-space only

The previous commit created a block around the code that is indented by
this commit.

8 years agoregen/mk_invlists.pl: Update to use EBCDIC utilities
Karl Williamson [Mon, 28 Apr 2014 23:37:49 +0000 (17:37 -0600)]
regen/mk_invlists.pl: Update to use EBCDIC utilities

This causes the generated charclass_invlists.h to be valid on all
supported platforms

8 years agoregen/unicode_constants.pl: White-space only
Karl Williamson [Mon, 28 Apr 2014 23:31:46 +0000 (17:31 -0600)]
regen/unicode_constants.pl: White-space only

The previous commit created a block around this code, which is now
appropriately indented

8 years agoregen/unicode_constants.pl: Update to use EBCDIC utilities
Karl Williamson [Mon, 28 Apr 2014 23:26:56 +0000 (17:26 -0600)]
regen/unicode_constants.pl: Update to use EBCDIC utilities

This causes the generated unicode_constants.h to be valid on all
supported platforms

8 years agoregen/mk_PL_charclass.pl: White-space only
Karl Williamson [Mon, 28 Apr 2014 23:19:07 +0000 (17:19 -0600)]
regen/mk_PL_charclass.pl: White-space only

The previous commit created a block around this code.

8 years agoregen/mk_PL_charclass.pl: Update to use EBCDIC utilities
Karl Williamson [Mon, 28 Apr 2014 23:08:57 +0000 (17:08 -0600)]
regen/mk_PL_charclass.pl: Update to use EBCDIC utilities

This causes the generated l1_char_class_tab.h to be valid on all
supported platforms

8 years agoMake many EBCDIC tables generated instead of hand-coded
Karl Williamson [Mon, 28 Apr 2014 22:57:16 +0000 (16:57 -0600)]
Make many EBCDIC tables generated instead of hand-coded

This causes the generated file ebcdic_tables.h to be #included by
utfebcdic.h instead of the hand-coded tables that were formerly there.
This makes it much easier to add or remove support for EBCDIC code
pages.

The UTF-EBCDIC-related tables for 037 and POSIX-BC are somewhat modified
from what they were before.  They were changed by hand minimally a long
time ago to prevent segfaults, but in so doing, they lost an important
sorting characteristic of UTF-EBCDIC.  The machine-generated versions
retain the sorting, while also not doing the segfaults. utfebcdic.h has
more detail about this, regarding tr16.

8 years agoAdd utilities for dealing with EBCDIC
Karl Williamson [Mon, 28 Apr 2014 22:43:49 +0000 (16:43 -0600)]
Add utilities for dealing with EBCDIC

This script is to be used by others in regen/ to aid in handling
ASCII/EBCIDC items.

8 years agoregcomp.c: Change ref to obsolete global var
Karl Williamson [Fri, 25 Apr 2014 16:56:22 +0000 (10:56 -0600)]
regcomp.c: Change ref to obsolete global var

This was changed in v5.19, but not found because we don't have an EBCDIC
smoker.  Spotted by Yaroslav Kuzmin.

8 years agoregen/unicode_constants.pl: White-space only
Karl Williamson [Thu, 17 Apr 2014 01:32:38 +0000 (19:32 -0600)]
regen/unicode_constants.pl: White-space only

Indent code in block formed by the previous commit

8 years agoregen/unicode_constants.pl: Rearrange code order
Karl Williamson [Thu, 17 Apr 2014 01:27:39 +0000 (19:27 -0600)]
regen/unicode_constants.pl: Rearrange code order

This just changes the ordering so we don't do UTF-8 calculations unless
needed.

8 years agohandy.h: Make macro more efficient on EBCDIC
Karl Williamson [Wed, 26 Jun 2013 21:49:13 +0000 (15:49 -0600)]
handy.h: Make macro more efficient on EBCDIC

The comments say it all

8 years agoCreate new testing helper file
Karl Williamson [Tue, 27 May 2014 03:05:21 +0000 (21:05 -0600)]
Create new testing helper file

This adds t/charset_tools.pl, and populates it with 2 functions removed
from t/test.pl.  The functions are changed very slightly to use the
variables $::IS_ASCII and $::IS_EBCDIC instead of recalculating this
information.

A new function byte_utf8a_to_utf8n() is also placed in charset_tools.
This takes the bytes that form a (ASCII-platform) UTF-8 string and
convert them to the bytes that form that string on the native platform,
hence just returns the input if run on an ASCII platform.

8 years agoUse already existing functions in some .t files
Karl Williamson [Tue, 27 May 2014 02:34:06 +0000 (20:34 -0600)]
Use already existing functions in some .t files

I invented 2 functions for use in .t files a while back that turn out to
be duplicates of (undocumented) functions that already existed suitable
for general use.  This commit changes to use those general functions and
removes the copies from t/test.pl.  (I plan to document these functions
later in 5.21.).  This is in preparation for moving some similar
functions from t/test.pl to a newly created test tools file, as it turns
out that these functions are useful in .t files that don't use
t/test.pl, but instead, e.g., Test::More.

8 years agoUpdate podcheck db to reflect fixed problem
Karl Williamson [Sat, 31 May 2014 15:58:16 +0000 (09:58 -0600)]
Update podcheck db to reflect fixed problem

8 years agoregen/mk_PL_charclass.pl: Rmv hard-coded char names
Karl Williamson [Sun, 17 Mar 2013 04:48:22 +0000 (22:48 -0600)]
regen/mk_PL_charclass.pl: Rmv hard-coded char names

Since this program was written, the abbreviated names of the control
characters have become available from charnames::viacode().  We change
to use these instead of hard-coding them in.

At the same time, this shortens the names for some of the other
characters in cases where it is easy to read the short ones.

It also changes to use mnemonics instead of hard-coded ordinals, like
using ASCII instead of x < 128.  This allows it to be run on an EBCDIC
platform.

8 years agoPATCH: [perl #121777] User-defined prop and packages
Karl Williamson [Wed, 7 May 2014 23:36:40 +0000 (17:36 -0600)]
PATCH: [perl #121777] User-defined prop and packages

The solution to this is to add the package name to the property name for
run-time lookup.

Thanks for Darin McBride for finding an inefficiency in an earlier
version of this patch.

8 years agoregcomp.c: Rmv temporary variable
Karl Williamson [Wed, 7 May 2014 22:41:51 +0000 (16:41 -0600)]
regcomp.c: Rmv temporary variable

This variable is unused after its first use, so can just be elminated.

8 years agolib/utf8_heavy.pl: Stack '?' and ':' ternaries
Karl Williamson [Wed, 7 May 2014 22:40:48 +0000 (16:40 -0600)]
lib/utf8_heavy.pl: Stack '?' and ':' ternaries

This is to make the code easier to read.

8 years agoUpgrade Encode from version 2.60_01 to 2.62
Steve Hay [Sat, 31 May 2014 12:50:42 +0000 (13:50 +0100)]
Upgrade Encode from version 2.60_01 to 2.62

The new version incorporates previous blead CUSTOMIZATIONS.

8 years agoRemove old Class-ISA remnants
Steve Hay [Sat, 31 May 2014 13:28:00 +0000 (14:28 +0100)]
Remove old Class-ISA remnants

8 years agoRemove Package-Constants remnant
Steve Hay [Sat, 31 May 2014 13:20:10 +0000 (14:20 +0100)]
Remove Package-Constants remnant

8 years agoRemove Module-Build remnants
Steve Hay [Sat, 31 May 2014 13:19:38 +0000 (14:19 +0100)]
Remove Module-Build remnants

8 years agoRemove CGI.pm remnants
Steve Hay [Sat, 31 May 2014 13:17:28 +0000 (14:17 +0100)]
Remove CGI.pm remnants

8 years agoUpgrade libnet from version 1.25 to 1.27
Steve Hay [Sat, 31 May 2014 11:43:56 +0000 (12:43 +0100)]
Upgrade libnet from version 1.25 to 1.27

This eliminates the need to have a CUSTOMIZED Makefile.PL. The other changes
(to modules and test scripts) are whitespace only.

8 years agoBelt and braces, add Module-CoreList version checks in porting too
Chris 'BinGOs' Williams [Sat, 31 May 2014 13:50:40 +0000 (14:50 +0100)]
Belt and braces, add Module-CoreList version checks in porting too

8 years agoAdded core-only version check to Module-CoreList
Chris 'BinGOs' Williams [Sat, 31 May 2014 11:12:47 +0000 (12:12 +0100)]
Added core-only version check to Module-CoreList

This should ensure that the versions of Module-CoreList modules
always match the version of perl.

Have to special-case skip for v5.21.1, because rjbs

8 years agoClarify "require <>"-message.
Norman Koch [Sat, 31 May 2014 01:31:29 +0000 (03:31 +0200)]
Clarify "require <>"-message.

Changed "<> should be quotes" to "<> at require-statement should be
quotes".  This way, when someone writes "require <Module>", it is way
easier to find the specific command that caused this.

8 years agoCorrect illegal use of >> in Exporter POD.
Todd Rinaldo [Mon, 14 Apr 2014 02:37:42 +0000 (21:37 -0500)]
Correct illegal use of >> in Exporter POD.

Discovered during POD unit tests on release of 5.70 to CPAN.
Also correct AUTHORS and checkAUTHORS.PL email to toddr@cpan.org.
Bump Exporter $VERSION to 5.71.

8 years agoregexec.c: Eliminate a malloc/free
Karl Williamson [Mon, 21 Apr 2014 02:06:04 +0000 (20:06 -0600)]
regexec.c: Eliminate a malloc/free

This uses an C automatic variable instead of a malloc and free.

8 years agoutf8.c: Move documentation next to its function
Karl Williamson [Mon, 5 May 2014 15:56:43 +0000 (09:56 -0600)]
utf8.c: Move documentation next to its function

Somehow this pod stuff was orphaned from the function it describes.

8 years agosv.c: Clarify comment
Karl Williamson [Mon, 5 May 2014 01:00:40 +0000 (19:00 -0600)]
sv.c: Clarify comment

I find reordering the text makes it easier to understand

8 years agoperlapi: Clarify some instances where NUL is or isn't permitted
Karl Williamson [Mon, 5 May 2014 00:58:51 +0000 (18:58 -0600)]
perlapi: Clarify some instances where NUL is or isn't permitted

Some functions that take a string/length pair can have embedded NULs and
don't have to be NUL terminated; others are the opposite.  This adds
text to clarify the issue.

8 years agoWrap various pod uses of NUL with C<>
Karl Williamson [Sun, 4 May 2014 23:09:22 +0000 (17:09 -0600)]
Wrap various pod uses of NUL with C<>

This makes the uses of this consistent in our pods.  Also changed one
use of the word 'buffer' into 'string', the latter being more
appropriate.

8 years agoregen/regcharclass.pl: Improve the generated code
Karl Williamson [Sat, 3 May 2014 21:38:27 +0000 (15:38 -0600)]
regen/regcharclass.pl: Improve the generated code

This is a small improvement when a consecutive group of U8 code points
begins at 0 or ends at 255.  These end points are physically impossible
of being exceeded, so there is no need to test for that end of the
range.  In several places this causes a mask operation to not be
generated.

8 years agoregcomp.c: Fix comment
Karl Williamson [Tue, 29 Apr 2014 03:50:52 +0000 (21:50 -0600)]
regcomp.c: Fix comment

8 years agoregcomp.c: Tighten up synthetic start class for Unicode characters
Karl Williamson [Tue, 29 Apr 2014 03:43:39 +0000 (21:43 -0600)]
regcomp.c: Tighten up synthetic start class for Unicode characters

When creating a synthetic start class (SSC) for EXACTFish nodes, in many
instances prior to this patch we punted and assumed any code point could
be matched.  This patch actually goes to the trouble of figuring out
what Unicode code points could possibly match, and uses those.  The only
time it punts now is when the node starts with a string of multiple
characters that together could be the fold of a single one.  It's too
complicated getting all the possibilities for these, as there could be
overlapping sequences that work.