platform/upstream/perl.git
13 years agoutf8_heavy.pl: Use CORE:: case function overridden
Karl Williamson [Mon, 14 Mar 2011 16:25:09 +0000 (10:25 -0600)]
utf8_heavy.pl: Use CORE:: case function overridden

Because an overridden case changing function may end up calling this
routine, it's better to use the CORE:: to avoid a recursive call

13 years agoResolved RT #59511 for Module::CoreList
Chris 'BinGOs' Williams [Mon, 14 Mar 2011 16:57:16 +0000 (16:57 +0000)]
Resolved RT #59511 for Module::CoreList

  Silenced the 'Can't call method "isa" without a package or object reference'
  warnings for the functions.

13 years ago[perl #82250] fix tainted (s)print format
David Mitchell [Mon, 14 Mar 2011 16:04:59 +0000 (16:04 +0000)]
[perl #82250] fix tainted (s)print format

commit 20ee07fbbcfa6be9f90bb8e5474a4d69d7396617
introduced dieing in (s)printf when the format is tainted;
however it only worked when the format is part of an expression
(because TAINT_PROPER checks for PL_tainted being set).

Fix by doing TAINT_PROPER only after get magic has been done on the format
SV (which will set PL_tainted). This is done by moving the checks in
pp_sprintf and pp_prtf into do_sprintf() (which is called by the two pp
functions).

13 years agoregcomp.c: utf8 pattern implies uni rules
Karl Williamson [Mon, 14 Mar 2011 15:18:28 +0000 (09:18 -0600)]
regcomp.c: utf8 pattern implies uni rules

This fixes a regression introduced with charset regex modifiers.  A utf8
pattern without a charset is supposed to mean unicode semantics.  But
it didn't until this patch.

13 years agoConvert t/re/regexp_unicode_prop.t to using test.pl's functions for testing.
Nicholas Clark [Mon, 14 Mar 2011 11:29:19 +0000 (11:29 +0000)]
Convert t/re/regexp_unicode_prop.t to using test.pl's functions for testing.

13 years agoConvert the remainder of t/op/numconvert.t to test.pl, strict and warnings.
Nicholas Clark [Mon, 14 Mar 2011 11:03:55 +0000 (11:03 +0000)]
Convert the remainder of t/op/numconvert.t to test.pl, strict and warnings.

13 years agoConvert t/re/subst_amp.t to test.pl, strict and warnings.
Nicholas Clark [Mon, 14 Mar 2011 09:00:44 +0000 (09:00 +0000)]
Convert t/re/subst_amp.t to test.pl, strict and warnings.

This reduces the line count by about 25%.
Also, remove the unneeded code to load Config, which is never referenced.

13 years agoAdd a test to ensure that test.pl doesn't mention $&
Nicholas Clark [Sun, 13 Mar 2011 17:58:29 +0000 (17:58 +0000)]
Add a test to ensure that test.pl doesn't mention $&

This will allow it to be used safely for tests that explicitly want to test the
behaviour of perl without (and with) $& having been seen by the parser.

13 years agoperlop: Mention the s///le special case
Father Chrysostomos [Mon, 14 Mar 2011 05:28:46 +0000 (22:28 -0700)]
perlop: Mention the s///le special case

This is apparently undocumented except in perldiag and a previous
perldelta.

13 years agoUpdate CPAN.pm to CPAN version 1.9600
David Golden [Mon, 14 Mar 2011 00:53:57 +0000 (20:53 -0400)]
Update CPAN.pm to CPAN version 1.9600

Only blead-visible change from 1.94_65 are version numbers and
the addition of the 2011 PAUSE batch signing key.

13 years agoperldelta up to d24f2be2
Father Chrysostomos [Mon, 14 Mar 2011 00:26:27 +0000 (17:26 -0700)]
perldelta up to d24f2be2

13 years agoRefactor t/op/assignwarn.t to generate all the tested code from data structures
Nicholas Clark [Sun, 13 Mar 2011 23:18:58 +0000 (23:18 +0000)]
Refactor t/op/assignwarn.t to generate all the tested code from data structures

13 years agoConvert t/op/anonsub.t to test.pl, strict and warnings.
Nicholas Clark [Sun, 13 Mar 2011 21:33:25 +0000 (21:33 +0000)]
Convert t/op/anonsub.t to test.pl, strict and warnings.

test.pl no longer uses closures, which removes the principal reason for
avoiding it until now. anonsub.t is now 25% shorter.

13 years agoIn test.pl, avoid using a closure to capture warnings.
Nicholas Clark [Sun, 13 Mar 2011 21:30:55 +0000 (21:30 +0000)]
In test.pl, avoid using a closure to capture warnings.

In the general case a closure is the "right" way to do "it". However, closures,
unlike local and regular subroutines, have some complexity at compile time,
which means that using closures in test.pl runs the risk of closure bugs
causing spurious hard to diagnose collateral damage to other tests. local is
already in use, and "has" to work for capturing warnings, as $SIG{__WARN__} is
localised already.

13 years agoConvert t/re/reg_mesg.t to test.pl and strict.
Nicholas Clark [Sun, 13 Mar 2011 19:08:57 +0000 (19:08 +0000)]
Convert t/re/reg_mesg.t to test.pl and strict.

This reduces its line count by 25%, with no loss of functionality.
(It actually tests slightly more, specifically that the regexps in @death don't
generate warnings, just die.)

13 years agoMove t/re/reg_unsafe.t's test to a fresh_perl_is() inside pat_advanced.t
Nicholas Clark [Sun, 13 Mar 2011 16:42:50 +0000 (16:42 +0000)]
Move t/re/reg_unsafe.t's test to a fresh_perl_is() inside pat_advanced.t

Add a passing variant which mentions $&. Note the bug number (#86042) in the
TODO test.

13 years agoConvert t/re/reg_email.t to test.pl, strict and warnings.
Nicholas Clark [Sun, 13 Mar 2011 15:49:50 +0000 (15:49 +0000)]
Convert t/re/reg_email.t to test.pl, strict and warnings.

13 years agoIn overload.t, move require './test.pl' into BEGIN to avoid stubbing subs.
Nicholas Clark [Sun, 13 Mar 2011 15:20:07 +0000 (15:20 +0000)]
In overload.t, move require './test.pl' into BEGIN to avoid stubbing subs.

Also move the use of strict and warnings after the BEGIN block, so that they
can take advantage of the @INC setting it performs. Swap to done_testing().

13 years agoConvert t/op/magic.t to test.pl, strict and warnings.
Nicholas Clark [Sun, 13 Mar 2011 15:16:15 +0000 (15:16 +0000)]
Convert t/op/magic.t to test.pl, strict and warnings.

Use ok() rather than the more "obvious" is(), cmp_ok() etc to strictly control
the number of accesses made to the passed in value. For example, is() accesses
its $got more than once, which defeats the purpose of this test.

13 years agoConvert t/op/die_unwind.t to test.pl, strict and warnings.
Nicholas Clark [Sun, 13 Mar 2011 15:04:42 +0000 (15:04 +0000)]
Convert t/op/die_unwind.t to test.pl, strict and warnings.

13 years agoConvert t/op/die_except.t to test.pl, strict and warnings.
Nicholas Clark [Sun, 13 Mar 2011 14:44:47 +0000 (14:44 +0000)]
Convert t/op/die_except.t to test.pl, strict and warnings.

13 years agoRemove the couple of references to AutoLoader that remained in
David Leadbeater [Sun, 13 Mar 2011 13:26:18 +0000 (14:26 +0100)]
Remove the couple of references to AutoLoader that remained in
DynaLoader after 0a0b6c96e6.

13 years agoConvert t/op/do.t to test.pl, strict and warnings.
Nicholas Clark [Sun, 13 Mar 2011 14:08:36 +0000 (14:08 +0000)]
Convert t/op/do.t to test.pl, strict and warnings.

Also use tempfile(), rather than names derived from the process ID.

13 years agoConvert t/op/pwent.t to test.pl, strict and warnings.
Nicholas Clark [Sun, 13 Mar 2011 13:19:29 +0000 (13:19 +0000)]
Convert t/op/pwent.t to test.pl, strict and warnings.

Move most of the logic for "hunt the password data" out of the BEGIN block, as
it has no special reason to be in one.

13 years agoC<not> should be C<!> in pwent.t, to fix a precedence bug.
Nicholas Clark [Sun, 13 Mar 2011 12:50:14 +0000 (12:50 +0000)]
C<not> should be C<!> in pwent.t, to fix a precedence bug.

Fortunately the effects are mostly benign. There are two boolean conditions -
$where defined, and PerlIO available, making 4 possible combinations. As was,
the code was:

    if (not defined $where && $Config{useperlio} eq 'define') {
        ...
if (-x '/usr/bin/dscl') {
            ...
            if (open (PW, '<', \$data)) {
                $where = ...;

would enter the first if block for 3 out of 4 possibilities, skipping only if
*both* $where as defined *and* PerlIO was available. This was not the intent.
However, if PerlIO is unavailable, then the open will fail, $where won't be
set, and the logic continues on below, falling back to /etc/passwd

The intended logic is

    if (!defined $where && $Config{useperlio} eq 'define') {
        ...

ie only enter on 1 of the 4 possibilities - skip unless $where was undefined
and PerlIO was available.

The net effect was that usually the behaviour was the same. The only difference
will be if PerlIO is not available (not the default, and rarely changed),
the password data *is* available from one of the services tested earlier, and
an /usr/bin/dscl executable is present.

In this case, the old code would have reached the open, which would have
failed, but would have closed PW as a side effect. However, because $where
would be defined, the fallback to /etc/passwd would not have been tried.
This would have caused the regression test to fail.

Also, the test C<$Config{useperlio} eq 'define'> is not quite correct, as
$Config{useperlio} will be undef if PerlIO is disabled, and the eq will warn.

13 years agoIn pwent.t, sanitise the logic for opening /etc/passwd, and calling skip_all()
Nicholas Clark [Sat, 12 Mar 2011 18:55:18 +0000 (18:55 +0000)]
In pwent.t, sanitise the logic for opening /etc/passwd, and calling skip_all()

It is now clearer what the code is doing when, and why.

13 years agoConvert t/op/mydef.t to test.pl, strict and warnings.
Nicholas Clark [Sun, 13 Mar 2011 11:02:08 +0000 (11:02 +0000)]
Convert t/op/mydef.t to test.pl, strict and warnings.

13 years agoIn t/op/mydef.t, add missing C<eval> to a test.
Nicholas Clark [Sun, 13 Mar 2011 10:39:15 +0000 (10:39 +0000)]
In t/op/mydef.t, add missing C<eval> to a test.

As the test is for 'ne', it passes without the eval. However, the test's
description and surrounding code make it clear that it is a test for the
results of eval.

13 years ago[perl #82111] de-pessimise some my @array = ...
David Mitchell [Sat, 12 Mar 2011 22:01:26 +0000 (22:01 +0000)]
[perl #82111] de-pessimise some my @array = ...

Due to obscure closure and goto tricks, it's sometimes possible for the
array or hash in the LHS of 'my @a = ...' and 'my %h = ...' to be
non-empty. At compile-time, these conditions are detected and the assign
op is compiled with the OPpASSIGN_COMMON, making the assignment slower.

This commit speeds it up again by adding a run-time check to pp_aassign
to only do the OPpASSIGN_COMMON code-branch if the LHS isn't an empty
array or hash.

See also #70171.

13 years agoConvert t/op/inc.t to test.pl and use strict.
Nicholas Clark [Sat, 12 Mar 2011 22:33:01 +0000 (22:33 +0000)]
Convert t/op/inc.t to test.pl and use strict.

13 years agoFix long-standing bug in t/op/inc.t, whereby ok() ignored a failed match.
Nicholas Clark [Sat, 12 Mar 2011 22:16:46 +0000 (22:16 +0000)]
Fix long-standing bug in t/op/inc.t, whereby ok() ignored a failed match.

Unlike test.pl and Test::More, the home-rolled ok() in t/op/inc.t didn't have
a prototype. Hence its arguments are in *list* context, meaning that any match
will return an *empty list* if it fails. Provided ok() was called with a
second, true, parameter, the failed match would not be noticed, because ok()
would register a test pass, because it would now be testing the (intended)
second parameter.

Add a prototype, and fix the logic for the tests affected.
Fortunately this wasn't concealing any bugs.

13 years agoIn t/op/inc.t, inline check_some_code() into its only call point.
Nicholas Clark [Sat, 12 Mar 2011 21:37:58 +0000 (21:37 +0000)]
In t/op/inc.t, inline check_some_code() into its only call point.

13 years agoIn t/op/inc.t, reorder the parameters to check_some_code()
Nicholas Clark [Sat, 12 Mar 2011 21:25:47 +0000 (21:25 +0000)]
In t/op/inc.t, reorder the parameters to check_some_code()

This allows the two (inner) loops that call it to be merged into one.
Swapping the (now merged) inner and outer loops will aid subsequent
refactoring.

13 years agoperldelta entries
Father Chrysostomos [Sat, 12 Mar 2011 22:14:17 +0000 (14:14 -0800)]
perldelta entries

13 years agorelease_managers_guide.pod: Add Module::CoreList to perldelta
Father Chrysostomos [Sat, 12 Mar 2011 20:52:35 +0000 (12:52 -0800)]
release_managers_guide.pod: Add Module::CoreList to perldelta

perl 5.13.6 to 5.13.10 did not include perldelta entries for
Module::CoreList.

13 years agoperlunicode: double space
Father Chrysostomos [Sat, 12 Mar 2011 20:56:12 +0000 (12:56 -0800)]
perlunicode: double space

13 years agoSwitch Storable to IO::File from FileHandle, only load if needed
David Leadbeater [Tue, 8 Mar 2011 21:49:54 +0000 (21:49 +0000)]
Switch Storable to IO::File from FileHandle, only load if needed

On blead IO::File would be autoloaded but can't rely on this as
Storable is dual life.

13 years agoStop using AutoLoader in Storable
David Leadbeater [Tue, 8 Mar 2011 21:45:48 +0000 (21:45 +0000)]
Stop using AutoLoader in Storable

Storable isn't that large by today's standards; using AutoLoader
doesn't make much sense now. Although barely significant this shaves
about 1% off the execution time of the tests on my machine.

13 years agoSwitch Storable to XSLoader from DynaLoader
David Leadbeater [Tue, 8 Mar 2011 21:41:51 +0000 (21:41 +0000)]
Switch Storable to XSLoader from DynaLoader

13 years agoregcomp.c: /a should handle /\xdf/i same as /u
Karl Williamson [Sat, 12 Mar 2011 19:37:40 +0000 (12:37 -0700)]
regcomp.c: /a should handle /\xdf/i same as /u

/a and /u should match identically case-insensitively, but they didn't.
Nor was /a being tested because it was thought that they handled things
identically, and the tests were already taking too long.  So this adds
some tests as well.

13 years agoConvert t/op/study.t to use test.pl, strict and warnings.
Nicholas Clark [Sat, 12 Mar 2011 19:35:00 +0000 (19:35 +0000)]
Convert t/op/study.t to use test.pl, strict and warnings.

Replace its alarm_ok() with test.pl's watchdog().

13 years agoConvert t/op/utf8cache.t to test.pl, strict and warnings.
Nicholas Clark [Sat, 12 Mar 2011 18:11:56 +0000 (18:11 +0000)]
Convert t/op/utf8cache.t to test.pl, strict and warnings.

13 years agoskip_all_without_dynamic_extension() should accepted names containing ::s
Nicholas Clark [Sat, 12 Mar 2011 18:08:24 +0000 (18:08 +0000)]
skip_all_without_dynamic_extension() should accepted names containing ::s

Whilst the package separator is a double colon, config.sh ends up using a /
for the package separator, reflecting how, historically, extensions were
laid out in nested directories beneath ext/. The layout has changed, but the
convention in the config.sh entries, and hence the %Config::Config values,
remains the same.

Hence skip_all_without_dynamic_extension() needs to convert passed-in ::s to
/ before performing a lookup.

13 years agoRename test.pl's skip_all_without_extension to *_dynamic_extension().
Nicholas Clark [Sat, 12 Mar 2011 17:44:59 +0000 (17:44 +0000)]
Rename test.pl's skip_all_without_extension to *_dynamic_extension().

All callers were using it with dynamic extensions, and also had a
skip_all_if_miniperl() for the same extension. Merge the two tests into one
function to save repetition.

13 years agoConvert t/op/readdir.t to test.pl, strict and warnings.
Nicholas Clark [Sat, 12 Mar 2011 17:22:44 +0000 (17:22 +0000)]
Convert t/op/readdir.t to test.pl, strict and warnings.

13 years agoConvert t/op/goto_xs.t to test.pl, strict and warnings.
Nicholas Clark [Sat, 12 Mar 2011 17:06:48 +0000 (17:06 +0000)]
Convert t/op/goto_xs.t to test.pl, strict and warnings.

13 years agoMove pwent.t's test for NIS+ earlier, before the "fallback" of /etc/passwd
Nicholas Clark [Fri, 11 Mar 2011 15:00:31 +0000 (15:00 +0000)]
Move pwent.t's test for NIS+ earlier, before the "fallback" of /etc/passwd

This seems a more logical place for it, on the assumptions that
a: only 1 of the 4 programs tried will produce results
b: Reading from /etc/passwd is intended as a fallback if none produce results.

13 years agoIn t/op/pwent.t, create try_prog() for the common 'try this command' logic.
Nicholas Clark [Fri, 11 Mar 2011 14:52:44 +0000 (14:52 +0000)]
In t/op/pwent.t, create try_prog() for the common 'try this command' logic.

Also refactor the clearing of $reason, without changing the behaviour of when
it is cleared (which is slightly less than logical.)

13 years agoAdd PERL_PRESERVE_IVUV to non_bincompat_options.
Nicholas Clark [Sat, 12 Mar 2011 16:32:08 +0000 (16:32 +0000)]
Add PERL_PRESERVE_IVUV to non_bincompat_options.

It's actually the default, but as all the C code is conditionally (not)
compiled on the basis of that pre-processor macro, seems that it is the one
that needs to be reported.

13 years agoFix RT #84294 /((\w+)(?{print $2})){2,2}/ problem
Yves Orton [Sat, 12 Mar 2011 16:21:54 +0000 (17:21 +0100)]
Fix RT #84294 /((\w+)(?{print $2})){2,2}/ problem

When we are doing a CURLYX/WHILEM loop and the min iterations is
larger than zero we were not saving the buffer state before each
iteration. This mean that partial matches would end up with strange
buffer pointers, with the start *after* the end point.

In more detail WHILEM has four exits, three of which as far as I could
tell would do a regcppush/regcppop in their state transitions, only one,
WHILEM_A_pre which is entered when (n < min) would not. And it is this state
that we repeatedly enter when performing A the min number of times.
When I made the logic similar to the handling of ( n < max ), the bug
went away, and as far as I can tell nothing else broke.

Review by Dave Mitchell required before release.

13 years agoAdd tests for RT #84294 /((\w+)(?{print $2})){2,2}/ problem
Yves Orton [Sat, 12 Mar 2011 16:17:22 +0000 (17:17 +0100)]
Add tests for RT #84294 /((\w+)(?{print $2})){2,2}/ problem

Original ticket reports:

    print "Match: \$1=$1 \$2=$2" if 'ab' =~/^((\w+)(?{print defined $2 ? "\$2=$2\n" : "\$2 not defined\n"})){2}$/;

Produces the following incorrect output:

    $2=ab
    $2 not defined
    $2=b
    Match: $1=b $2=b

It should produce:

    $2=ab
    $2=a
    $2=b
    Match: $1=b $2=b

This adds a TODO test to verify this behavior.

13 years agoIn utf8decode.t, use //x to add comments to the parsing regexp.
Nicholas Clark [Sat, 12 Mar 2011 16:23:32 +0000 (16:23 +0000)]
In utf8decode.t, use //x to add comments to the parsing regexp.

Also, assign directly to variables, instead of going via $1 to $7.

13 years agoIn utf8decode.t, test that we get the expected Unicode character(s)
Nicholas Clark [Sat, 12 Mar 2011 16:02:48 +0000 (16:02 +0000)]
In utf8decode.t, test that we get the expected Unicode character(s)

Previously some (not all) of the "y"es cases detailed the expected code point.
Add all those that were missing, and update the parsing regexp to cope with
multiple Unicode characters.

13 years agoIn utf8decode.t, constrain more tightly the testing of expected warnings.
Nicholas Clark [Sat, 12 Mar 2011 14:32:27 +0000 (14:32 +0000)]
In utf8decode.t, constrain more tightly the testing of expected warnings.

If one warning is expected, use warning_like() to test for it, which will fail
if multiple warnings are generated. Where multiple warnings are generated,
as well as testing that the first seen matches the expected warning, check that
the expected number are seen. Mark as TODO 3.4.1, which Markus Kuhn annotates
as "All the 10 sequences of 3.3 concatenated, you should see 10 malformed
sequences being signalled", because currently perl generates 18 warnings.

13 years agoIn utf8decode.t, use warning_is() for the should-not-warn cases.
Nicholas Clark [Sat, 12 Mar 2011 12:26:06 +0000 (12:26 +0000)]
In utf8decode.t, use warning_is() for the should-not-warn cases.

Move the localised $SIG{__WARN__} handler into the block for the should-warn
case, and avoid using $@ as the warnings accumulator. As an expected warning is
always provided, eliminate the code for dealing with an unspecified expected
warning. The re-ordering allows $id to be a lexical with the same scope as all
others derived from the test table lines.

13 years agoIn utf8decode.t, move the test data from a heredoc to <DATA>
Nicholas Clark [Sat, 12 Mar 2011 12:15:20 +0000 (12:15 +0000)]
In utf8decode.t, move the test data from a heredoc to <DATA>

As the test data is actually somewhat larger than the test code, git's diff
shows this as moving the code upwards :-)
Hence take advantage of the already-churning lines to remove the outermost
block and reindent.

13 years agoIn utf8decode.t, remove the \x sequence strings of bytes
Nicholas Clark [Sat, 12 Mar 2011 12:09:00 +0000 (12:09 +0000)]
In utf8decode.t, remove the \x sequence strings of bytes

For each test case, the information is duplicated in the hex sequences, and
they don't rely on the "" interpolation of the heredoc that initialises the
array @MK

13 years agoIn utf8decode.t, test that the hex sequences and \x escapes are equivalent.
Nicholas Clark [Sat, 12 Mar 2011 11:45:52 +0000 (11:45 +0000)]
In utf8decode.t, test that the hex sequences and \x escapes are equivalent.

The hex sequences had been in the test data since they were first added in
ba210ebec161cde0, but have never actually been used, other than for a length
cross-check.

13 years agoConvert utf8decode.t to test.pl
Nicholas Clark [Sat, 12 Mar 2011 11:41:19 +0000 (11:41 +0000)]
Convert utf8decode.t to test.pl

13 years agoIn test.pl, refactor the implementation of warning_{is,like} and warnings_like.
Nicholas Clark [Sat, 12 Mar 2011 14:09:47 +0000 (15:09 +0100)]
In test.pl, refactor the implementation of warning_{is,like} and warnings_like.

Break out the code to capture warnings from the code to analyse them. Implement
tests directly in warning_{is,like}, rather than implementing them as a call to
warning_like. Remove the C<use warnings "all">, as it is lexically scoped, and
won't apply to the scope of the subroutine being called.

Previously all 3 would erroneously pass if the expectation was for 1 warning,
there were more than 1 warnings, but the first warning matched the expected
warning.

13 years ago11883c88c2a3bf14 introduced an error in 64bitint.t with long doubles.
Nicholas Clark [Sat, 12 Mar 2011 00:03:40 +0000 (00:03 +0000)]
11883c88c2a3bf14 introduced an error in 64bitint.t with long doubles.

On a platform where an NV is long enough to preserve all UVs, division is
always done in floating point. Hence the result may become stringified in E
notation. Hence testing that it is not in E notation (as a testing proxy for
"was integer arithmetic used?") is inappropriate on such a platform.

13 years agoSkip eintr.t on FreeBSD (see perl #85842 and #84688).
Craig A. Berry [Fri, 11 Mar 2011 23:00:46 +0000 (17:00 -0600)]
Skip eintr.t on FreeBSD (see perl #85842 and #84688).

It appears that a larger PerlIO buffer combined with writing to a
pipe triggers an alternate write mechanism in FreeBSD called a
direct write, which is not interruptible by signals.  That's
somewhat speculative and has not been confirmed by someone with
knowledge of FreeBSD internals, but we do know the test hangs, so
it's best not to run it for now.

13 years agoC<not> should be C<!> in utf8decode.t, to fix a precedence bug.
Nicholas Clark [Fri, 11 Mar 2011 23:18:45 +0000 (23:18 +0000)]
C<not> should be C<!> in utf8decode.t, to fix a precedence bug.

Fixing the bug opens a whole can of worms. The test hasn't actually been
testing failure since 35bcd33832d74e56. Indeed, 35bcd33832d74e56 increases
the verbosity of warnings from unpack, meaning that the test needs to aggregate
lines in its $SIG{__WARN__} handler. At which point it passes again.

Until 097fb8e2acde8522, which adds ", immediately" to the UTF-8 diagnostics.
Then 872c91ae155f6880 makes most every form of invalid Unicode warning free,
and also overlong UTF-8 warning free. 618432450ee258c0 makes overlong UTF-8
warn once more. Finally, 08ca2aa38a29585f means that 'U0U*' needs to be
replaced with 'C0U*'.

So now it passes, and (I believe) actually *tests* what it intends to test.
Long may that state of affairs endure.

13 years ago[perl #85884] Erroneous description of File::Basename::fileparse
Father Chrysostomos [Fri, 11 Mar 2011 21:22:43 +0000 (13:22 -0800)]
[perl #85884] Erroneous description of File::Basename::fileparse

Literal backslashes need single quotes.

13 years agoDon't run crashing TODO tests for release builds.
Jan Dubois [Fri, 11 Mar 2011 20:34:39 +0000 (12:34 -0800)]
Don't run crashing TODO tests for release builds.

Crashes on Windows will display an error dialog that has to be
manually dismissed.  This is a bad experience for casual users
not familiar with the practice of TODO tests and might create
doubt in the overall quality of the release.

13 years agoMake sure json_pp is installed on Windows
Jan Dubois [Fri, 11 Mar 2011 18:34:38 +0000 (10:34 -0800)]
Make sure json_pp is installed on Windows

13 years agoAvoid race codition when setting process exit code on Windows.
Jan Dubois [Fri, 11 Mar 2011 18:30:11 +0000 (10:30 -0800)]
Avoid race codition when setting process exit code on Windows.

A Perl program using fork() emulation on Windows may end up
kill()ing the forked child and exiting immediately.  There
is a race condition where the process exit code may be
changed to '9' (the signal used to kill the child thread),
overriding the value the parent thread used in ExitProcess()
(called implicitly with the return value of main()).

Giving up the remainder of the time-slice after terminating
a child thread seems to eliminate this race.

This bug is responsible for various CPAN test failures,
where all tests seem to pass, but Test::Harness still
reports: "Dubious, test returned 9 (wstat 2304, 0x900)"
(e.g. HTTP-Server-Simple, tests based on Test-TCP).

See also https://rt.cpan.org/Ticket/Display.html?id=66016#txn-908976

13 years agoConvert t/op/64bitint.t to test.pl
Nicholas Clark [Fri, 11 Mar 2011 13:58:10 +0000 (13:58 +0000)]
Convert t/op/64bitint.t to test.pl

13 years agoadd more tests for 'my @a =' OPpASSIGN_COMMON
David Mitchell [Fri, 11 Mar 2011 13:36:42 +0000 (13:36 +0000)]
add more tests for 'my @a =' OPpASSIGN_COMMON

bug #70171 was fixed a while ago. This just adds some more tests for the
same (already fixed) bug.

This time its a variant which makes @a already have content at the
'my @a =' declaration, but without requiring a closure.
 See also [perl #82110].

13 years agoRefactor die_exit.t to loop over a list, rather than iterate on an hash.
Nicholas Clark [Fri, 11 Mar 2011 11:37:07 +0000 (11:37 +0000)]
Refactor die_exit.t to loop over a list, rather than iterate on an hash.

13 years agoConvert t/op/die_exit.t to test.pl
Nicholas Clark [Fri, 11 Mar 2011 11:29:23 +0000 (11:29 +0000)]
Convert t/op/die_exit.t to test.pl

13 years agoregexec.c: Use equivalent macro instead of code
Karl Williamson [Fri, 11 Mar 2011 02:52:55 +0000 (19:52 -0700)]
regexec.c: Use equivalent macro instead of code

Recent simplification of this code left it to be the equivalent
of an existing macro

13 years agoCorrect the U<...> link in perlfaq4
Father Chrysostomos [Fri, 11 Mar 2011 00:47:04 +0000 (16:47 -0800)]
Correct the U<...> link in perlfaq4

13 years agoMerge branch 'blead' of ssh://perl5.git.perl.org/gitroot/perl into blead
Father Chrysostomos [Fri, 11 Mar 2011 00:41:39 +0000 (16:41 -0800)]
Merge branch 'blead' of ssh://perl5.git.perl.org/gitroot/perl into blead

13 years agoThe "Send a CC" checkbox on PAUSE is gone
Florian Ragwitz [Fri, 11 Mar 2011 00:23:28 +0000 (01:23 +0100)]
The "Send a CC" checkbox on PAUSE is gone

Update the release-manager's guide accordingly.

13 years agoUpdate link to "What Every Computer Scientist Should Know About Floating-Point Arithm...
brian d foy [Thu, 10 Mar 2011 22:50:45 +0000 (16:50 -0600)]
Update link to "What Every Computer Scientist Should Know About Floating-Point Arithmetic"

13 years agoregexec.c: Add assert() to detect inconsistent ANYOF
Karl Williamson [Thu, 10 Mar 2011 15:22:00 +0000 (08:22 -0700)]
regexec.c: Add assert() to detect inconsistent ANYOF

There have been various segfaults apparently due to trying to access
the swash (and allies) portion of an ANYOF which doesn't have that.
This doesn't show up on all platforms.  The assert() should detect
this and help debugging

13 years agoregexec.c: Fix precedence
Karl Williamson [Thu, 10 Mar 2011 15:17:05 +0000 (08:17 -0700)]
regexec.c: Fix precedence

Commit ac51e94be5daabecdeb0ed734f3ccc059b7b77e3 didn't
do what it purported, because it omitted parentheses that
were necessary to change the natural precedence.  It's strange that
it passed all tests on my machine, and failed so miserably elsewhere
that it was quickly reverted by commit
63c0bfd59562325fed2ac5a90088ed40960ac2ad.

This reinstates it with the correct precedence.  The next commit
will add an assert() so that the underlying issue will be detected
on all platforms

13 years agoregcomp.c: call regclass_swash() only if non-empty
Karl Williamson [Thu, 10 Mar 2011 15:58:34 +0000 (08:58 -0700)]
regcomp.c: call regclass_swash() only if non-empty

We can tell if there is something outside the bitmap and so
can short circuit calling this function if there isn't.

13 years agoRevert "regexec.c: don't try accessing non-bitmap if doesn't exist"
David Mitchell [Thu, 10 Mar 2011 14:42:20 +0000 (14:42 +0000)]
Revert "regexec.c: don't try accessing non-bitmap if doesn't exist"

This reverts commit ac51e94be5daabecdeb0ed734f3ccc059b7b77e3.

This commit made many of the re/*.t tests fail, on my build at least.
Haven't looked at why, just reverting it for the moment.

13 years agoCPAN is upstream for Scalar-List-Utils
Florian Ragwitz [Thu, 10 Mar 2011 13:53:25 +0000 (14:53 +0100)]
CPAN is upstream for Scalar-List-Utils

As confirmed by Graham.

13 years agoregexec.c: don't try accessing non-bitmap if doesn't exist
Karl Williamson [Thu, 10 Mar 2011 04:28:35 +0000 (21:28 -0700)]
regexec.c: don't try accessing non-bitmap if doesn't exist

ANYOF_NONBITMAP is supposed to be set iff there is something outside
the bitmap to try matching in an ANYOF node.  Due to slight changes in
the meaning of this, the code has been trying to access this
if ANYOF_NONBITMAP_NON_UTF8 is set without ANYOF_NONBITMAP being set,
which means it was trying to access something that doesn't exist.

I'm hopeful, based on a stack trace sent to me  that this is the cause
of [perl #85478], but can't reproduce that easily.  But the logic
is clearly wrong.

13 years agoinstallperl: Don't install unnecessary unicore/*.txt
Karl Williamson [Thu, 10 Mar 2011 02:08:48 +0000 (19:08 -0700)]
installperl: Don't install unnecessary unicore/*.txt

This removes from installation certain .txt files in unicore that
are no longer needed for execution by Unicode::UCD, since commit
05dbc6f80f8f2d5774f53874803f5a20450bbe82

13 years agoperlfunc/pos: Mention the zero-len flag
Father Chrysostomos [Thu, 10 Mar 2011 01:47:33 +0000 (17:47 -0800)]
perlfunc/pos: Mention the zero-len flag

13 years agoperlre clean-up
Father Chrysostomos [Wed, 9 Mar 2011 20:58:03 +0000 (12:58 -0800)]
perlre clean-up

Mostly typos, grammatical errors and factual errors (mostly due to
bitrot), but also:

• The section explaining how to work around the lack of look behind
  obviously has not been relevant for years. :-)
• Since we have relative backreferences, we might as well use them in
  the explanation of the (?>...) construct.
• Note that it’s possible to backtrack *past* (?>...), but
  not into it.
• (?:non-zero-length|zero-length)* is *not* equivalent to nzl*|zl? as
 "aaaaab" =~ /(?:a|(?{print "hello"})(?=(b)))*/ demonstrates.
• The custom re engine section doesn’t mention custom re engines. :-)

13 years agoperldelta for 9407f9c1
David Leadbeater [Wed, 9 Mar 2011 20:48:54 +0000 (20:48 +0000)]
perldelta for 9407f9c1

13 years agoHave git-deltatool list the commit's author
Florian Ragwitz [Wed, 9 Mar 2011 20:53:56 +0000 (21:53 +0100)]
Have git-deltatool list the commit's author

Some authors are more likely to include delta entries in their commits than
others. Knowing who wrote a commit at a glance when reviewing it is helpful.

13 years ago[perl #85738] cc deprecated option warnings on solaris 10 sparc 64-bit
Arvan [Wed, 9 Mar 2011 19:35:48 +0000 (11:35 -0800)]
[perl #85738] cc deprecated option warnings on solaris 10 sparc 64-bit

When building on Solaris 10 multiple warnings are produced saying:

Warning: -xarch=generic64 is deprecated, use -m64 to create 64-bit
programs

This is because the config script hints/solaris_2.sh uses the values
returned by getconf which are incorrect for newer versions of Sun's
compiler. I believe they are correct for earlier versions, but do not
have a system to test this on. This change to solaris_2.sh checks
that the compiler produces this warning, and if so updates the flags
to the correct values.

13 years agoAdd Arvan to AUTHORS
Father Chrysostomos [Wed, 9 Mar 2011 19:34:04 +0000 (11:34 -0800)]
Add Arvan to AUTHORS

13 years agoA couple of perldelta updates
Florian Ragwitz [Wed, 9 Mar 2011 20:17:08 +0000 (21:17 +0100)]
A couple of perldelta updates

It's still far from being complete :-/

13 years agoUpdate Digest-SHA to CPAN version 5.61
Chris 'BinGOs' Williams [Wed, 9 Mar 2011 14:45:15 +0000 (14:45 +0000)]
Update Digest-SHA to CPAN version 5.61

5.61  Wed Mar  9 05:26:36 MST 2011
        - corrected bug in 'algorithm' method
        - fixed -x option in Makefile.PL
                -- not often used since it deliberately excludes
                        all 64-bit SHA transforms
        - addressed minor documentation oversights

13 years agoRemove DECCRTL_SOCKETS from PL_bincompat_options.
Craig A. Berry [Wed, 9 Mar 2011 13:14:41 +0000 (07:14 -0600)]
Remove DECCRTL_SOCKETS from PL_bincompat_options.

The socket libraries provided by the C run-time have been the
only viable option for building sockets in Perl for many years,
so we don't need to take up a valuable slot in the options list
to record that we're using them.

Also, the new bincompat.t test requires options to be in alpha-
betical order, and this wasn't.

13 years agoIn fold_grind.t only report OK for each charset/target combination
David Leadbeater [Wed, 9 Mar 2011 00:48:24 +0000 (16:48 -0800)]
In fold_grind.t only report OK for each charset/target combination

This brings the number of tests down significantly and due to the
reduced amount of printing the runtime too. Failing tests are still
reported and a complete run can be enabled by setting
$ENV{PERL_DEBUG_FULL_TEST} to a true value.

13 years agoregcomp.c: Rmv unused parameter
Karl Williamson [Wed, 9 Mar 2011 06:19:16 +0000 (23:19 -0700)]
regcomp.c: Rmv unused parameter

This silences a compiler warning

13 years agore/pat.t: Remove TODO message on passing tests
Karl Williamson [Wed, 9 Mar 2011 06:14:45 +0000 (23:14 -0700)]
re/pat.t: Remove TODO message on passing tests

A previous commit fixed these.

13 years agoregcomp.c: Rmv unused parameter
Karl Williamson [Wed, 9 Mar 2011 06:13:59 +0000 (23:13 -0700)]
regcomp.c: Rmv unused parameter

This silences a compiler warning

13 years agoregcomp.c: Rmv unused parameter
Karl Williamson [Wed, 9 Mar 2011 06:08:16 +0000 (23:08 -0700)]
regcomp.c: Rmv unused parameter

This silences a compiler warning

13 years agoPATCH: [perl #85528], add initialization
Karl Williamson [Wed, 9 Mar 2011 05:56:02 +0000 (22:56 -0700)]
PATCH: [perl #85528], add initialization

Commit 137165a601b852a9679983cdfe8d35be29f0939c omitted
required initialization for the synthetic start class.  Adding it
exposed other bugs in cl_and() and cl_or(), which have been fixed
by a previous commit.

13 years agoregcomp.c: revamp cl_and() and cl_or()
Karl Williamson [Wed, 9 Mar 2011 05:35:36 +0000 (22:35 -0700)]
regcomp.c: revamp cl_and() and cl_or()

These two routines have not kept pace with the changes in the ANYOF
flags.  And, I believe there were issues even before them.  I did a
systematic re-thinking of what their behaviors should be.

13 years agoregcomp.h: #define of ANYOF flags immune from inversion
Karl Williamson [Wed, 9 Mar 2011 04:57:24 +0000 (21:57 -0700)]
regcomp.h: #define of ANYOF flags immune from inversion