platform/upstream/perl.git
11 years agoUpdate Term-ANSIColor to CPAN version 4.02
Chris 'BinGOs' Williams [Tue, 8 Jan 2013 10:23:00 +0000 (10:23 +0000)]
Update Term-ANSIColor to CPAN version 4.02

  [DELTA]

  2013-01-07  Russ Allbery  <rra@stanford.edu>

       * ANSIColor.pm: Version 4.02 released.

       * Makefile.PL: Add the minimum Perl version to the package
       metadata.

       * t/basic256.t: List the tag first in the import list for
       compatibility with the Exporter from Perl 5.6.2.  Thanks to David
       Cantrell for the testing and debugging.

11 years agoskip appropriately when XS::APItest isn't available
Tony Cook [Tue, 8 Jan 2013 10:50:51 +0000 (21:50 +1100)]
skip appropriately when XS::APItest isn't available

XS::APItest isn't available under -Uusedl

11 years agoadd a dependency for dynamic extensions on $(LIBPERL)
Tony Cook [Tue, 8 Jan 2013 10:38:41 +0000 (21:38 +1100)]
add a dependency for dynamic extensions on $(LIBPERL)

This is necessary on some platforms (Haiku-OS, Cygwin and possibly
others) since EU::MM adds libperl.so/libperl.a (with their appropriate
extensions) as a dependency to the link step.

Added as a dependency on all platforms because it causes no practical
harm (fewer choices for parallel making) on the platforms where it isn't
needed.

11 years agoregexec.c: Cast to silence compiler warnings
Karl Williamson [Mon, 7 Jan 2013 06:01:33 +0000 (23:01 -0700)]
regexec.c: Cast to silence compiler warnings

11 years agoregexec.c: Cast to silence compiler warning
Karl Williamson [Mon, 7 Jan 2013 06:00:15 +0000 (23:00 -0700)]
regexec.c: Cast to silence compiler warning

11 years agoconstant-1.24 has been released to CPAN, update Maintainers.pl to reflect this
Chris 'BinGOs' Williams [Mon, 7 Jan 2013 15:10:42 +0000 (15:10 +0000)]
constant-1.24 has been released to CPAN, update Maintainers.pl to reflect this

11 years agoForgot to update Maintainers.pl for podlators update
Chris 'BinGOs' Williams [Mon, 7 Jan 2013 15:09:22 +0000 (15:09 +0000)]
Forgot to update Maintainers.pl for podlators update

11 years agotoke.c: Silence compiler uninitialized warning
Karl Williamson [Mon, 7 Jan 2013 04:51:12 +0000 (21:51 -0700)]
toke.c: Silence compiler uninitialized warning

I believe that there really is not a path through this that yields an
uninitialized value for this variable, but initialize it to UV_MAX in
case there is, that value will hopefully stand out more than '0' would.

11 years agoregcomp.c: Silence compiler warning
Karl Williamson [Mon, 7 Jan 2013 03:01:28 +0000 (20:01 -0700)]
regcomp.c: Silence compiler warning

One of our smoke compilers is not smart enough to know that the
remainder when dividing by two can only be a 0 or a 1.

11 years agoregcomp.c: Silence compiler warning by using a cast
Karl Williamson [Mon, 7 Jan 2013 02:51:16 +0000 (19:51 -0700)]
regcomp.c: Silence compiler warning by using a cast

11 years agoregcomp.c: Comments only, white-space ; no code changes
Karl Williamson [Mon, 7 Jan 2013 02:35:00 +0000 (19:35 -0700)]
regcomp.c: Comments only, white-space ; no code changes

11 years agoregcomp.c: Silence compiler warning
Karl Williamson [Mon, 7 Jan 2013 02:32:01 +0000 (19:32 -0700)]
regcomp.c: Silence compiler warning

One compiler doesn't like this, so cast to bool

11 years agopp_ctl.c: Silence compiler warning.
Karl Williamson [Mon, 7 Jan 2013 02:24:13 +0000 (19:24 -0700)]
pp_ctl.c: Silence compiler warning.

A compiler on one of our smoke platforms wants empty braces here.

11 years agoext/XS-APItest: Remove unused variable decl.
Karl Williamson [Mon, 7 Jan 2013 02:19:43 +0000 (19:19 -0700)]
ext/XS-APItest: Remove unused variable decl.

This is to stop a compiler warning

11 years agoembed.fnc: Properly declare fcn inline
Karl Williamson [Mon, 7 Jan 2013 02:17:42 +0000 (19:17 -0700)]
embed.fnc: Properly declare fcn inline

This function is specified as inline in the source code, but not in the
prototypes; only one compiler seems to have noticed.

11 years agoperlunicode: Refactor verbatim lines into =item ones
Karl Williamson [Fri, 4 Jan 2013 04:45:34 +0000 (21:45 -0700)]
perlunicode: Refactor verbatim lines into =item ones

This is so that they are able to contain links; both versions render
uglily in different ways.

11 years agoperlunicode: Correct false statement
Karl Williamson [Fri, 4 Jan 2013 04:15:55 +0000 (21:15 -0700)]
perlunicode: Correct false statement

This text is just plain wrong.  It mixes up which is the block property
and which is the script

11 years agoregcomp.c: White-space only; no code changes
Karl Williamson [Tue, 1 Jan 2013 04:55:40 +0000 (21:55 -0700)]
regcomp.c: White-space only; no code changes

This outdents a block to the proper alignment, and reflows the comments

11 years agoMake Pod::Html::_unixify unescape dots on VMS.
Craig A. Berry [Sun, 6 Jan 2013 22:27:50 +0000 (16:27 -0600)]
Make Pod::Html::_unixify unescape dots on VMS.

Dots in directory names must be escaped in native syntax, but those
escapes confuse various things if left in during a conversion to
Unix syntax.

11 years agoPod::Html test portability redux.
Craig A. Berry [Fri, 4 Jan 2013 23:41:17 +0000 (17:41 -0600)]
Pod::Html test portability redux.

The flurry of activity to get these tests passing in the lead-up to
5.16.0 swept several issues under the rug.  In particular, some
of the tests had failures on VMS that became invisible once we
started skipping them wherever dots are not allowed in directory
names (which is true by default on VMS now, but is likely to change
very shortly).

The facts behind my changes, in no particular order:

File::Spec->rootdir() returns, on VMS, a a special string that will
not be found in any actual pathname, so taking the length of it and
stripping that much off the front of an actual pathname produces
garbage.

File::Spec->rootdir(), on VMS, returns a string that contains a volume
specification, so simply prepending a volume to it produces garbage.
To portably produce a complete path, use catpath().

Windows appears not to care which direction the slashes are leaning,
and VMS can handle pure-Unix paths as long as they aren't pasted onto
components of native paths, so it's reasonbly safe to obtain directory
components with splitdir, and join them together with forward slashes.

The tests pass a value to --podpath that is not absolute, but nor
is it relative in the usual sense.  It's apparently intended to be
relative to the filesystem root, which is an inherently non-portable
concept as neither Windows nor VMS has such a thing.  The best that
can be done (without a complete rethink of the tests and perhaps the
module) is to make it relative to the top-level directory on the
current volume.

This gets all tests passing on Windows, VMS, and OS X.

11 years agoadd a LEAVE for the ENTER in LOAD_UTF8_CHARCLASS
Tony Cook [Sun, 6 Jan 2013 11:25:51 +0000 (22:25 +1100)]
add a LEAVE for the ENTER in LOAD_UTF8_CHARCLASS

This appears to fix the regression introduced in c7304fe2c

11 years agot/op/not.t: Add descriptions to all tests.
James E Keenan [Sat, 29 Dec 2012 16:23:56 +0000 (11:23 -0500)]
t/op/not.t: Add descriptions to all tests.

Also, add note() before tests 4 and 5 explaining rationale for addition of
parentheses to second arguments.

11 years agoAdd parens around second argument to tests 4 and 5.
James E Keenan [Sat, 29 Dec 2012 16:09:34 +0000 (11:09 -0500)]
Add parens around second argument to tests 4 and 5.

If a description were to be added to these tests, in the absence of
parentheses the scalar prototype of CORE::not would enforce a scalar context
onto the balance of the statement, leading to apparently anomalous behavior,
viz., the descriptions would not be printed and test 5 would be reported to
FAIL.

11 years agot/op/oct.t: Add descriptions to tests lacking them.
James E Keenan [Fri, 28 Dec 2012 02:51:54 +0000 (21:51 -0500)]
t/op/oct.t: Add descriptions to tests lacking them.

11 years agot/op/or.t: Provide descriptions for tests lacking them.
James E Keenan [Thu, 27 Dec 2012 02:28:32 +0000 (21:28 -0500)]
t/op/or.t: Provide descriptions for tests lacking them.

11 years agot/op/pos.t: Provide descriptions for remaining tests lacking them.
James E Keenan [Thu, 27 Dec 2012 02:15:40 +0000 (21:15 -0500)]
t/op/pos.t: Provide descriptions for remaining tests lacking them.

11 years agot/op/pwent.t: Add descriptions for all tests.
James E Keenan [Wed, 26 Dec 2012 02:37:04 +0000 (21:37 -0500)]
t/op/pwent.t: Add descriptions for all tests.

11 years agot/op/pow.t: Add descriptions for tests lacking them.
James E Keenan [Wed, 26 Dec 2012 02:35:25 +0000 (21:35 -0500)]
t/op/pow.t: Add descriptions for tests lacking them.

Those which were still lacking descriptions were all testing that
exponentiation has precedence over negation.

11 years agot/op/fork.t: Add description for one special test.
James E Keenan [Wed, 26 Dec 2012 02:34:29 +0000 (21:34 -0500)]
t/op/fork.t: Add description for one special test.

11 years agocharnames: Deprecate character names with spacing issues
Karl Williamson [Fri, 4 Jan 2013 19:34:34 +0000 (12:34 -0700)]
charnames: Deprecate character names with spacing issues

A user-defined character name with trailing or multiple spaces in a row
is likely a typo, and hence likely won't match what the other uses of
it.  These names also won't work if we extend :loose to these.  This
now generates a warning.

11 years agocharnames: :alias alone implies :full
Karl Williamson [Fri, 4 Jan 2013 18:05:32 +0000 (11:05 -0700)]
charnames: :alias alone implies :full

The documentation says this is how it should behave, but only 1 of the
three paths in the code did it, and in fact there was a test to the
contrary.

I'm only adding a test for one of the two fixed paths, as the other one
appears to require a weird file name.

11 years agocharnames: Enforce better file name rules
Karl Williamson [Fri, 4 Jan 2013 18:04:08 +0000 (11:04 -0700)]
charnames: Enforce better file name rules

The code says that identifier syntax is required for a file name, but
the code accepted any sequence of \w's.

11 years agocharnames: comment, error message clarifications
Karl Williamson [Fri, 4 Jan 2013 16:06:26 +0000 (09:06 -0700)]
charnames: comment, error message clarifications

11 years agocharnames pod: Typo, clarification
Karl Williamson [Tue, 1 Jan 2013 18:52:58 +0000 (11:52 -0700)]
charnames pod: Typo, clarification

11 years agoFix SvREFCNT_dec doc typo
Steven Schubiger [Fri, 4 Jan 2013 17:05:08 +0000 (18:05 +0100)]
Fix SvREFCNT_dec doc typo

11 years agomake m?$pat? match only once under ithreads
David Mitchell [Fri, 4 Jan 2013 16:10:53 +0000 (16:10 +0000)]
make m?$pat? match only once under ithreads

[perl #115080]

m?...? is only supposed to match once, until reset. Normally this is done
by setting the PMf_USED flag on the PMOP. Under ithreads we can't modify
ops, so instead we indicate by setting the regex's SV to readonly. (This
is a bit of a hack: the flag should be associated with the PMOP, not the
regex).

This breaks with run-time regexes when the pattern gets recompiled; for
example:

    for my $c (qw(a b c)) {
print "matched $c\n" if $c =~ m?^$c$?;
    }

outputs

    matched a

on unthreaded, but

    matched a
    matched b
    matched c

on threaded.

The re_eval jumbo fix made this more noticeable by sometimes recompiling
even when the pattern text hasn't changed (to make closures work ok).

The quick fix is to propagate the readonlyness of the old re to the new
re. (The proper fix would be to store the flag state in a pad slot
associated with the PMOP).
Needless to say, I've gone for the quick fix.

11 years agoRegenerated customized.dat file due to pod2*.PL changes
Chris 'BinGOs' Williams [Fri, 4 Jan 2013 15:26:28 +0000 (15:26 +0000)]
Regenerated customized.dat file due to pod2*.PL changes

11 years agoUpdate podlators to CPAN version 2.5.0
Chris 'BinGOs' Williams [Fri, 4 Jan 2013 14:33:58 +0000 (14:33 +0000)]
Update podlators to CPAN version 2.5.0

  [DELTA]

2013-01-02  Russ Allbery  <rra@stanford.edu>

  * VERSION: podlators 2.5.0 released.

  * lib/Pod/Man.pm (guesswork): Extend a small-caps section through
  the punctuation that commonly appears in license disclaimers so
  that small caps isn't turned on and off at the boundaries of every
  word, producing unreadable *roff.
  * t/man.t: Test the updated small-caps behavior.

  * lib/Pod/Man.pm (new): Support a new errors option with values
  die, stderr, pod, and none.  Convert the stderr option to the
  errors option with value stderr.  (#39007)
  (end_document): Die if errors was set to die and there were POD
  syntax errors.
  * lib/Pod/Text.pm (new): Likewise.
  (end_document): Likewise.
  * scripts/pod2man: Support a new --errors option that sets the
  underlying errors formatter option and default to dying on POD
  syntax errors.
  * scripts/pod2text: Likewise.
  * t/man-options.t: Add support for catching exceptions during
  formatting.  Test valid and invalid errors settings.
  * t/text-options.t: Likewise.

  * lib/Pod/Man.pm (cmd_l): Add nourls option to suppress the URL
  from L<> formatting codes that contain anchor text.  (#62210)
  * lib/Pod/Text.pm (cmd_l): Likewise.
  * scripts/pod2man: New --nourls option to set the corresponding
  option in Pod::Man.
  * scripts/pod2text: Likewise for Pod::Text.
  * t/man-options.t: Test new nourls option.
  * t/text-options.t: Likewise.

  * lib/Pod/Man.pm (outindex): Also collapse consecutive whitespace
  in index term text.
  * t/man.t: Test for handling of index terms containing whitespace.

2013-01-02  Kevin Ryde  <user42@zip.com.au>

  * lib/Pod/Man.pm (outindex): Remove newlines from index term text
  since *roff quotes don't span lines.  (#82332)

2012-06-01  Russ Allbery  <rra@stanford.edu>

  * VERSION: podlators 2.4.2 released.

  * t/text-encoding.t: Remove the test of a POD document without an
  encoding.  We previously tested that this interpreted the document
  as ISO 8859-1, but Pod::Simple behavior has changed so that the
  test started failing, plus Pod::Simple now warns about a missing
  =encoding.  (#77553)

11 years agoCollapse "if(a){b}else{b}" to "b"
Eric Brine [Wed, 5 Dec 2012 07:48:56 +0000 (02:48 -0500)]
Collapse "if(a){b}else{b}" to "b"

11 years agoRemove redundant NULL checks.
Eric Brine [Wed, 5 Dec 2012 06:30:25 +0000 (01:30 -0500)]
Remove redundant NULL checks.

It's safe to pass NULLs to SvREFCNT_dec.

11 years agoAdd support for building with VC++ 2012
Steve Hay [Thu, 3 Jan 2013 23:30:57 +0000 (23:30 +0000)]
Add support for building with VC++ 2012

No code changes seem to be required, so it's just a matter of noting that
we've tried it, it works, and we'll support it :-)

11 years agoS_has_runtime_code(): avoid buffer overrun
David Mitchell [Thu, 3 Jan 2013 14:17:25 +0000 (14:17 +0000)]
S_has_runtime_code(): avoid buffer overrun

This function looks for '(?{' style strings in a pattern. If the last char
in the pattern was '(', it could read a couple of bytes off the end of
the pattern. This is harmless from a logic and security viewpoint since
false positives are ok; but I'm still fixing it for correctness's sake.

11 years agoFix period at the end of perldiag.pod and remove entry from TODO in diag.t
Matthew Horsfall (alh) [Wed, 26 Dec 2012 15:30:02 +0000 (10:30 -0500)]
Fix period at the end of perldiag.pod and remove entry from TODO in diag.t

11 years agoEliminate redundant words.
James E Keenan [Thu, 3 Jan 2013 02:47:37 +0000 (21:47 -0500)]
Eliminate redundant words.

Based on observation by Joaquin Ferrero++.

For RT #116274

11 years agoDon't usenm on haiku
Tony Cook [Wed, 2 Jan 2013 22:36:27 +0000 (09:36 +1100)]
Don't usenm on haiku

This cam up from building perl with nm enabled and make test_harness
croaking with the complaint that times wasn't implemented.

nm /system/lib/libroot.so | grep times produces:

00095540 T __times
00095460 T __times_beos
0009b690 t itimerspec_to_bigtimes__FRC10itimerspecRxT1
00095540 T times@@LIBROOT_1_ALPHA4
00095460 T times@LIBROOT_BASE
000981c8 t timesub
000958b4 T utimes

of which the two times@... entries appear to be version symbols.

The system perl on Haiku-OS alpha4.1 is built with -Uusenm

11 years agoMerge Shlomi's latest debugger refactoring work
Tony Cook [Wed, 2 Jan 2013 03:23:22 +0000 (14:23 +1100)]
Merge Shlomi's latest debugger refactoring work

11 years agobump $VERSION for lib/perl5db.pl
Tony Cook [Wed, 2 Jan 2013 00:47:08 +0000 (11:47 +1100)]
bump $VERSION for lib/perl5db.pl

There's been a release since this change was submitted.

11 years agoMissing test count.
Shlomi Fish [Mon, 24 Dec 2012 22:21:44 +0000 (00:21 +0200)]
Missing test count.

Merge-SNAFU.

11 years agoFix perl -d's 'w $my_lexical_variable'.
Shlomi Fish [Sun, 9 Dec 2012 21:58:38 +0000 (23:58 +0200)]
Fix perl -d's 'w $my_lexical_variable'.

This was done by reverting parts of the offending commit from the
git bisecting and adding a test. Thanks to Kevin Dawson for the report.

11 years agoDocument HistSize and HistFile.
Shlomi Fish [Sat, 1 Dec 2012 20:46:49 +0000 (22:46 +0200)]
Document HistSize and HistFile.

Two undocumented perldebug options.

11 years agoStart refactoring "sub restart".
Shlomi Fish [Sun, 18 Nov 2012 11:33:27 +0000 (13:33 +0200)]
Start refactoring "sub restart".

11 years agoExtract _dump_trace_calc_saved_single_arg.
Shlomi Fish [Sun, 18 Nov 2012 10:14:12 +0000 (12:14 +0200)]
Extract _dump_trace_calc_saved_single_arg.

11 years agoExtract _dump_trace_calc_save_args.
Shlomi Fish [Sun, 18 Nov 2012 09:58:29 +0000 (11:58 +0200)]
Extract _dump_trace_calc_save_args.

11 years agoAvoid pre-declarations.
Shlomi Fish [Sun, 18 Nov 2012 09:47:10 +0000 (11:47 +0200)]
Avoid pre-declarations.

11 years agoFixed the test - it passes now.
Shlomi Fish [Fri, 16 Nov 2012 07:57:55 +0000 (09:57 +0200)]
Fixed the test - it passes now.

Thanks to Father Chrysostomos for fixing the bug in blead, I was now
able to fix the test in the debugger.

11 years agoAdd a testcase for the bug.
Shlomi Fish [Thu, 15 Nov 2012 15:54:26 +0000 (17:54 +0200)]
Add a testcase for the bug.

It is caused by $obj spontaneously becoming undef for no good reason -
seems like a bug in the perl interpreter (or elsewhere). This was
noticed by Father C here:

https://rt.perl.org/rt3/Ticket/Display.html?id=114926

11 years agoExtract _cmd_L_handle_postponed_breakpoints.
Shlomi Fish [Thu, 15 Nov 2012 09:08:13 +0000 (11:08 +0200)]
Extract _cmd_L_handle_postponed_breakpoints.

11 years agoAdd empty lines and an explicit return.
Shlomi Fish [Wed, 14 Nov 2012 17:15:50 +0000 (19:15 +0200)]
Add empty lines and an explicit return.

11 years agoRemove a no-longer needed comment.
Shlomi Fish [Wed, 14 Nov 2012 11:45:23 +0000 (13:45 +0200)]
Remove a no-longer needed comment.

11 years agoExtract a subroutine.
Shlomi Fish [Wed, 14 Nov 2012 11:38:37 +0000 (13:38 +0200)]
Extract a subroutine.

11 years agoExtract some duplicate code into a closure.
Shlomi Fish [Wed, 14 Nov 2012 11:19:50 +0000 (13:19 +0200)]
Extract some duplicate code into a closure.

11 years agoSome refactoring.
Shlomi Fish [Wed, 14 Nov 2012 10:15:44 +0000 (12:15 +0200)]
Some refactoring.

11 years agoStart refactoring cmd_L.
Shlomi Fish [Wed, 14 Nov 2012 10:07:21 +0000 (12:07 +0200)]
Start refactoring cmd_L.

11 years agoRemove an unused parameter.
Shlomi Fish [Wed, 14 Nov 2012 09:43:57 +0000 (11:43 +0200)]
Remove an unused parameter.

11 years agoRemove a redundant line.
Shlomi Fish [Wed, 14 Nov 2012 09:34:13 +0000 (11:34 +0200)]
Remove a redundant line.

11 years agoRename vars to remove ambiguity.
Shlomi Fish [Wed, 14 Nov 2012 08:29:54 +0000 (10:29 +0200)]
Rename vars to remove ambiguity.

11 years ago[perl5db] Extract.
Shlomi Fish [Wed, 14 Nov 2012 08:15:37 +0000 (10:15 +0200)]
[perl5db] Extract.

11 years agoGot rid of passing $cmd to subs that don't use it.
Shlomi Fish [Wed, 14 Nov 2012 07:47:46 +0000 (09:47 +0200)]
Got rid of passing $cmd to subs that don't use it.

11 years agoExtract _cmd_l_calc_initial_end_and_i .
Shlomi Fish [Mon, 12 Nov 2012 21:40:10 +0000 (23:40 +0200)]
Extract _cmd_l_calc_initial_end_and_i .

11 years agoExtract a subroutine.
Shlomi Fish [Mon, 12 Nov 2012 21:11:09 +0000 (23:11 +0200)]
Extract a subroutine.

11 years agoMore refactoring.
Shlomi Fish [Sun, 11 Nov 2012 19:17:31 +0000 (21:17 +0200)]
More refactoring.

11 years agoExtract _cmd_l_range .
Shlomi Fish [Sun, 11 Nov 2012 18:27:16 +0000 (20:27 +0200)]
Extract _cmd_l_range .

11 years ago[perl5db] Extract some subroutines.
Shlomi Fish [Sun, 11 Nov 2012 17:56:00 +0000 (19:56 +0200)]
[perl5db] Extract some subroutines.

11 years agoExtract a subroutine.
Shlomi Fish [Sun, 11 Nov 2012 17:11:56 +0000 (19:11 +0200)]
Extract a subroutine.

11 years agoGot rid of a $1 reference.
Shlomi Fish [Sun, 11 Nov 2012 11:05:40 +0000 (13:05 +0200)]
Got rid of a $1 reference.

11 years agoAdd explicit returns.
Shlomi Fish [Sun, 11 Nov 2012 09:26:30 +0000 (11:26 +0200)]
Add explicit returns.

11 years ago[perl5db] Refactoring.
Shlomi Fish [Sat, 10 Nov 2012 11:48:02 +0000 (13:48 +0200)]
[perl5db] Refactoring.

11 years agoUpdate Term-ANSIColor to CPAN version 4.01
Chris 'BinGOs' Williams [Tue, 1 Jan 2013 10:14:13 +0000 (10:14 +0000)]
Update Term-ANSIColor to CPAN version 4.01

  [DELTA]

2012-12-31  Russ Allbery  <rra@stanford.edu>

  * ANSIColor.pm: Version 4.01 released.

  * t/strict.t: During coverage checking, skip generic tests that
  don't run module code for a significant speed-up.

  * examples/generate-colors: Add POD documentation.
  * t/critic.t: Also check the examples directory.
  * t/pod.t: Likewise.
  * t/pod-spelling.t: Likewise.

  * t/aliases-env.t: Fix logic for skipping tests when Test::Warn is
  not installed.

2012-12-30  Russ Allbery  <rra@stanford.edu>

  * ANSIColor.pm: Version 4.00 released.

  * LICENSE: New file summarizing copyright and license information.

  * examples/generate-colors: Add support for "basic" and "bright"
  test file types that test all the other supported attributes.
  * tests/README: Remove VT100 test files.  The license was unclear,
  and the new generate-colors example script does everything they do
  of significance for this package plus more.
  * tests/ansicolor: Likewise.
  * tests/vt100-torture: Likewise.

  * ANSIColor.pm (PUSHCOLOR): Take an array like all the other
  constant functions and join all arguments together before
  manipulating it.
  * t/basic.t: Multiple new tests for various weird edge cases.

  * ANSIColor.pm (AUTOLOAD): Only honor ANSI_COLORS_DISABLED if it
  is set to a true value.
  (color): Likewise.
  (colored): Likewise.
  * t/basic.t: Test that ANSI_COLORS_DISABLED must be true.

  * t/synopsis.t: New test for SYNOPSIS syntax.

  * ANSIColor.pm: Add COMPATIBILITY section to the documentation,
  collecting all information about when features were introduced and
  adding the version of Perl that they shipped with.  Add
  appropriate version numbers to the use statements in the SYNOPSIS.

  * ANSIColor.pm: Use coloralias to load aliases from the
  environment.  Improve commenting in the SYNOPSIS.  Document the
  new alias name restrictions.
  (coloralias): New function to set a color alias.  Enforce
  restrictions on the acceptable alias name.

  * t/aliases-env.t: Adjust warning test for new error message.
  * t/aliases-func.t: New test of coloralias.

2012-12-29  Stephen Thirlwall  <stephen.thirlwall@strategicdata.com.au>
      Russ Allbery  <rra@stanford.edu>

  * ANSIColor.pm: Add support for custom color names configured with
  the ANSI_COLORS_ALIASES environment variable as set during module
  load.
  (color): Support custom colors.
  (colorvalid): Likewise.
  * t/aliases-env.t: New test of custom colors from the environment.
  * t/basic.t: Delete ANSI_COLORS_ALIASES from the environment before
  module load to avoid any effects from the test runner's settings.
  * t/basic256.t: Likewise.
  * t/eval.t: Likewise.
  * t/stringify.t: Likewise.
  * t/taint.t: Likewise.

2012-12-28  Kurt Starsinic  <kstarsinic@gmail.com>
      Russ Allbery  <rra@stanford.edu>

  * ANSIColor.pm: Add constants (with tag :constants256) and
  attributes for 256-color emulators.
  (uncolor): Support the three-part 256-color codes.
  * t/basic256.t: New test for 256-color support.
  * examples/generate-colors: New script to generate 256-color test
  or demonstration files.

2012-12-28  Russ Allbery  <rra@stanford.edu>

  * t/basic.t: Test uncolor with \e[m and '' as only arguments.

  * ANSIColor.pm: $AUTOLOCAL takes precedence over $AUTORESET,
  reversing the previous behvior.  Document the precedence.
  * t/basic.t: Test for $AUTOLOCAL vs. $AUTORESET precedence.

  * t/taint.t: New check for proper untainting in AUTOLOAD.
  * ANSIColor.pm: Comment the untainting of $AUTOLOAD so that it
  isn't accidentally removed as apparently unnecessary.

  * t/strict.t: Ignore t/taint.t for coverage checking, since
  Test::Strict doesn't know how to invoke tests that require
  tainting.

  * t/strict.t: Add test suite coverage checking if running the test
  in maintainer mode.
  * ANSIColor.pm (AUTOLOAD): Drop a redundant check on the result of
  eval so that 100% test coverage can be achieved.
  * t/basic.t: Remove taint checking, which is incompatible with
  coverage testing.  Add tests to achieve 100% coverage.
  * t/eval.t: Remove taint checking.
  * t/stringify.t: Likewise.

  * ANSIColor.pm: Document $Term::ANSIColor::AUTOLOCAL.

  * ANSIColor.pm (AUTOLOAD): Support ANSI_COLORS_DISABLED in the
  generated constant subs.  Fixes a bug where the environment
  variable would be ignored if the constant were used before it was
  set.
  * t/basic.t: Test for proper ANSI_COLORS_DISABLED support in
  generated constant subs.

  * t/critic.t: New test that runs perlcritic (and perltidy) on all
  source files and checks for violations.
  * t/data/perlcriticrc: New file.
  * t/data/perltidyrc: New file.
  * ANSIColor.pm: Substantial reworking to improve coding style and
  layout.  Update to Perl 5.6 syntax.  Unconditionally load Carp for
  simplicity.
  * Makefile.PL: Require Perl 5.6.  Remove conditionals for
  configuration that was not supported prior to Perl 5.6.
  * t/basic.t: Update coding style.
  * t/eval.t: Likewise.
  * t/stringify.t: Likewise.

  * t/minimum-version.t: New test for the minimum required version
  of Perl.

  * t/pod-coverage.t: New test for POD coverage.

  * ANSIColor.pm: Add use warnings.
  * Makefile.PL: Add use strict and use warnings.
  * t/strict.t: New test for strict and warnings in all code.

  * t/pod.t: Update coding style.
  * t/pod-spelling.t: Use Test::Spelling instead of including a
  less-tested version of the same code.  Update coding style.

11 years agoUpdate excluded files for Term-ANSIColor
Chris 'BinGOs' Williams [Tue, 1 Jan 2013 10:12:39 +0000 (10:12 +0000)]
Update excluded files for Term-ANSIColor

11 years agoregcomp.c: Fix upper loop limit
Karl Williamson [Tue, 1 Jan 2013 05:38:37 +0000 (22:38 -0700)]
regcomp.c: Fix upper loop limit

The upper limit test for this loop should be strictly less than, like
all other instances in the code for similar loops.  The class at
ANYOF_MAX is \v, which is not subject to locale rules, and this loop is
testing for which locale rule classes have been set.  Thus the loop
should not include \v.

Thanks to George Greer for spotting this.

11 years agoChange core calls of isALNUM() to isWORDCHAR()
Karl Williamson [Sun, 30 Dec 2012 03:51:00 +0000 (20:51 -0700)]
Change core calls of isALNUM() to isWORDCHAR()

The latter is more clearly named to indicate it includes the underscore.

11 years agoConvert uses of isALNUM_lazy_if to isWORDCHAR_lazy_if
Karl Williamson [Sun, 30 Dec 2012 03:35:50 +0000 (20:35 -0700)]
Convert uses of isALNUM_lazy_if to isWORDCHAR_lazy_if

This is to prevent confusion between the Posix alnum and the Perl \w.

11 years agoAdd isWORDCHAR_lazy_if() macro
Karl Williamson [Sun, 30 Dec 2012 03:33:41 +0000 (20:33 -0700)]
Add isWORDCHAR_lazy_if() macro

This is a synonym for the existing isALNUM_lazy_if(), which can be
confused with meaning the Posix alnum instead of the Perl \w.

11 years agoregcomp.c: White-space, comment only; no code changes
Karl Williamson [Mon, 31 Dec 2012 17:48:41 +0000 (10:48 -0700)]
regcomp.c: White-space, comment only; no code changes

This puts proper indentation, adds comments for code that was moved
around in the previous commit.

11 years agoregcomp.c: Refactor out a switch statement
Karl Williamson [Mon, 31 Dec 2012 17:21:37 +0000 (10:21 -0700)]
regcomp.c: Refactor out a switch statement

Previous work had collapsed most of the cases of this switch.  This
removes the entire switch, allowing more of the logic to be collapsed
into single code paths.  Most of this commit is just moving things
around; the heavy lifting has been done in previous commits.

11 years agoregcomp.c: Collapse switch cases
Karl Williamson [Mon, 31 Dec 2012 17:00:55 +0000 (10:00 -0700)]
regcomp.c: Collapse switch cases

These cases differ only in that the union is of the complement in one of
them.  There is a function that provides both possibilities.

11 years agoregcomp.c: Collapse two switch cases
Karl Williamson [Mon, 31 Dec 2012 16:45:06 +0000 (09:45 -0700)]
regcomp.c: Collapse two switch cases

These two cases differ only in that the union is of the complement in
one of them.  There is a function that provides both possibilities.

11 years agoregcomp.c: Remove redundant code
Karl Williamson [Mon, 31 Dec 2012 16:03:14 +0000 (09:03 -0700)]
regcomp.c: Remove redundant code

The statements just above the lines removed by this commit cause the
above-ASCII range to always match, not just under the conditions of the
removed code, so it is redundant.

11 years agoregcomp.c: Use data structure to remove special handling
Karl Williamson [Mon, 31 Dec 2012 15:45:10 +0000 (08:45 -0700)]
regcomp.c: Use data structure to remove special handling

[:digit:] matches nothing in the upper Latin1 range.  That means the
inversion list for the whole of Latin1 is the same as the one for the
ASCII range.  By copying the ASCII one into the Latin1's slot, we
eliminate the need for code to handle this case specially.

Future commits will remove the switch statement affected by this
commit entirely, and eliminating this special case becomes more
important given this direction.

11 years agolocale.t, pat_advanced.t: Remove TODOs
Karl Williamson [Mon, 31 Dec 2012 04:41:44 +0000 (21:41 -0700)]
locale.t, pat_advanced.t: Remove TODOs

The previous commit fixed these TODOs.

11 years agoregex: Add pseudo-Posix class: 'cased'
Karl Williamson [Mon, 31 Dec 2012 04:14:58 +0000 (21:14 -0700)]
regex: Add pseudo-Posix class: 'cased'

/[[:upper:]]/i and /[[:lower:]]/i should match the Unicode property
\p{Cased}. This commit introduces a pseudo-Posix class, internally named
'cased', to represent this.  This class isn't specifiable by the user,
except through using either /[[:upper:]]/i or /[[:lower:]]/i.  Debug
output will say ':cased:'.

The regex parsing either of :lower: or :upper: will change them into
:cased:, where already existing logic can handle this, just like any
other class.

This commit fixes the regression introduced in
3018b823898645e44b8c37c70ac5c6302b031381, and that these have never
worked under 'use locale'.  The next commit will un-TODO the tests for
these things.

11 years agohandy.h, regcomp.h, regexec.c: Sort initializers, switch()
Karl Williamson [Mon, 31 Dec 2012 03:55:49 +0000 (20:55 -0700)]
handy.h, regcomp.h, regexec.c: Sort initializers, switch()

Until recently, these were needed to be (or it made sense to be) in
numerical value of what the rhs of each #define evaluates to.  But now,
they are all initialized to something else, and the numerical value is
not even apparent.  Alphabetical order gives a logical ordering to help
a reader find things.

11 years agolocale.t: Add TODO tests
Karl Williamson [Mon, 31 Dec 2012 03:39:37 +0000 (20:39 -0700)]
locale.t: Add TODO tests

It turns out that Perl has always assumed that the Posix character
classes are closed under folding.  For example, if a character is in
[:alpha:], its fold will be in [:alpha:] as well.

This seems like a reasonable assumption except for two classes, where it
is almost certainly wrong.  If a character matches [:upper:], its fold
likely won't.  Same for [:lower:].  What this means is that a regex of
the form

    /[[:lower:]]/i

has never properly matched the uppercased versions of the characters in
the target string.

This commit adds TODO tests for these.

11 years agolocale.t: Add tests for [:upper:], [:lower:]
Karl Williamson [Mon, 31 Dec 2012 03:28:20 +0000 (20:28 -0700)]
locale.t: Add tests for [:upper:], [:lower:]

If our uc() and lc() functions are working properly, and the locale is
properly set up, things that are uppercase and not lowercase should
match [:upper:], and vice-versa.  This adds tests for that.

11 years agolocale.t: Add extra debugging info
Karl Williamson [Mon, 31 Dec 2012 03:23:07 +0000 (20:23 -0700)]
locale.t: Add extra debugging info

The tryneoalpha() routine is given an extra parameter to print when
debugging is enabled.

11 years agolocale.t: Fix off by 1 error in debug output
Karl Williamson [Mon, 31 Dec 2012 03:19:35 +0000 (20:19 -0700)]
locale.t: Fix off by 1 error in debug output

The message about skipping tests was giving the wrong initial test
number for the range of those skipped.

11 years agolocale.t: Add capability to have TODO tests
Karl Williamson [Mon, 31 Dec 2012 03:15:09 +0000 (20:15 -0700)]
locale.t: Add capability to have TODO tests

This .t has hand-rolled tests.

11 years agore/pat_advanced.t: Add TODO test for recent regression
Karl Williamson [Sun, 30 Dec 2012 16:42:35 +0000 (09:42 -0700)]
re/pat_advanced.t: Add TODO test for recent regression

Commit 3018b823898645e44b8c37c70ac5c6302b031381 added a regression for
the Posix classes [:upper:] and [:lower:] when matching
case-insensitively.  If an above-Latin1 code point has been matched by
one of these classes at the time another regex is compiled which also
has the same class as the first one, and the second regex is /i, the
case-insensitivity is ignored.

11 years agoregcomp.c: Add comments
Karl Williamson [Fri, 28 Dec 2012 17:53:36 +0000 (10:53 -0700)]
regcomp.c: Add comments

11 years agoCorrect typo in test description.
James E Keenan [Mon, 31 Dec 2012 00:52:37 +0000 (19:52 -0500)]
Correct typo in test description.