platform/upstream/perl.git
10 years agoLong verbatim lines in SDBM_File.pm
Father Chrysostomos [Wed, 18 Dec 2013 14:21:22 +0000 (06:21 -0800)]
Long verbatim lines in SDBM_File.pm

10 years agoDocument ->$#* in perlref
Father Chrysostomos [Wed, 18 Dec 2013 02:06:34 +0000 (18:06 -0800)]
Document ->$#* in perlref

10 years agoperldelta for ff25e5dbb
Father Chrysostomos [Wed, 18 Dec 2013 02:04:58 +0000 (18:04 -0800)]
perldelta for ff25e5dbb

10 years agoperldelta todos
Father Chrysostomos [Wed, 18 Dec 2013 02:01:11 +0000 (18:01 -0800)]
perldelta todos

10 years agoperldelta for ebdc88085
Father Chrysostomos [Wed, 18 Dec 2013 01:53:54 +0000 (17:53 -0800)]
perldelta for ebdc88085

10 years agoperldelta for 5b50ddc0fe
Tony Cook [Wed, 18 Dec 2013 04:47:25 +0000 (15:47 +1100)]
perldelta for 5b50ddc0fe

10 years ago[perl #120384] make hash key quoting compatible between perl and XS
Tony Cook [Wed, 18 Dec 2013 04:32:20 +0000 (15:32 +1100)]
[perl #120384] make hash key quoting compatible between perl and XS

In particular:

- if quotekeys is set all hash keys are now quoted, previously the perl
  code didn't quote "safe" numeric keys

- keys of the form ::foo are now quoted by XS as the perl code always did

- XS code quoted "safe" numbers, while the perl code didn't

- perl code didn't quote strings like "1\x{660}", since \x{660}
  matches \d

10 years ago[perl #120635] don't leak semaphores
Tony Cook [Wed, 18 Dec 2013 03:42:22 +0000 (14:42 +1100)]
[perl #120635] don't leak semaphores

I was calling semctl() with parameters in the incorrect order

10 years agoperldelta for ee71f1d151a
Tony Cook [Wed, 18 Dec 2013 02:56:54 +0000 (13:56 +1100)]
perldelta for ee71f1d151a

10 years ago[perl #118651] don't overwrite $! in readdir()
Tony Cook [Thu, 12 Dec 2013 05:22:06 +0000 (16:22 +1100)]
[perl #118651] don't overwrite $! in readdir()

POSIX expects readdir() to leave errno alone when it reaches end of
directory without an error so that case can be detected.  Do the same
in perl.

10 years agoperldelta for 18f6a8aad, 5ab2cf16cd, 17b33ba0df
Tony Cook [Tue, 17 Dec 2013 22:53:13 +0000 (09:53 +1100)]
perldelta for 18f6a8aad5ab2cf16cd17b33ba0df

10 years ago[perl #114350] access to SDBM constants and explicit filenames
Tony Cook [Tue, 17 Dec 2013 22:33:31 +0000 (09:33 +1100)]
[perl #114350] access to SDBM constants and explicit filenames

10 years ago[perl #114350] improved documentation
Kevin Ryde [Mon, 16 Dec 2013 00:44:11 +0000 (11:44 +1100)]
[perl #114350] improved documentation

10 years ago[perl #114350] access to sdbm_prep()
Tony Cook [Wed, 11 Dec 2013 03:37:20 +0000 (14:37 +1100)]
[perl #114350] access to sdbm_prep()

This allows the .dir and .pag filenames to be specified explicitly

10 years ago[perl #114350] add exportable PAGFEXT, DIRFEXT and PAIRMAX constants
Tony Cook [Thu, 5 Dec 2013 04:01:11 +0000 (15:01 +1100)]
[perl #114350] add exportable PAGFEXT, DIRFEXT and PAIRMAX constants

10 years agomg.c: White-space only
Karl Williamson [Sun, 15 Dec 2013 02:53:29 +0000 (19:53 -0700)]
mg.c: White-space only

Indent code that's in a block added in the previous commit.

10 years agoFix HP-UX $! failure
Karl Williamson [Sun, 15 Dec 2013 02:48:00 +0000 (19:48 -0700)]
Fix HP-UX $! failure

HP-UX strerror() returns an empty string for an unknown error code.
This caused an assertion to fail under DEBUGGING builds.  This patch
removes the assertion and changes the return into  a non-empty string
indicating the errno is for an unknown error.

10 years agoperl.h: Move a string constant to a #define
Karl Williamson [Mon, 16 Dec 2013 18:52:20 +0000 (11:52 -0700)]
perl.h: Move a string constant to a #define

This is so it can be used in another file

10 years agomg.c: White-space only
Karl Williamson [Sun, 15 Dec 2013 02:46:27 +0000 (19:46 -0700)]
mg.c: White-space only

Properly indent code that is interior to a block

10 years agoperllocale: Note that LC_MESSAGES affects $^E
Karl Williamson [Wed, 11 Dec 2013 18:26:02 +0000 (11:26 -0700)]
perllocale: Note that LC_MESSAGES affects $^E

10 years agorun/locale.t: Fix bareword error
Karl Williamson [Wed, 11 Dec 2013 16:03:03 +0000 (09:03 -0700)]
run/locale.t: Fix bareword error

This string should be in quotes to be properly eval'd.  Prior to this
patch this .t failed when run by hand as the bareword warning is made
fatal.

10 years agolib/locale.t: Add tests
Karl Williamson [Sun, 8 Dec 2013 16:34:18 +0000 (09:34 -0700)]
lib/locale.t: Add tests

Commit b99851e1941e002dd4816ee6c76fd49bbee1d7f3 should have added tests
in two places.  This adds them in the second place, plus a cautionary
comment.  The reason for the two places is the alternative I can think
of is to use a string eval, but that perturbs the test environment so
might affect the outcome.

10 years agolib/locale.t: Move some lines
Karl Williamson [Sun, 8 Dec 2013 15:42:49 +0000 (08:42 -0700)]
lib/locale.t: Move some lines

Commit b99851e1941e002dd4816ee6c76fd49bbee1d7f3 should have added tests
at the end of the block.  This moves them.

10 years agoposix.t, time.t: Correct saving/restoring locales
Karl Williamson [Thu, 12 Dec 2013 06:33:22 +0000 (23:33 -0700)]
posix.t, time.t: Correct saving/restoring locales

Code in these two tests assumed that setlocale returns the old locale.
Instead it returns the new one.  A separate setlocale() call is needed
to get the previous locale value.  These are the only two places I found
with this error.

10 years agoperldelta for b183d514e3e
Tony Cook [Tue, 17 Dec 2013 05:48:23 +0000 (16:48 +1100)]
perldelta for b183d514e3e

10 years agobump $Data::Dumper::VERSION
Tony Cook [Thu, 21 Nov 2013 05:48:13 +0000 (16:48 +1100)]
bump $Data::Dumper::VERSION

10 years ago[perl #82948] use re::regexp_pattern in list context for dumping qr//
Tony Cook [Thu, 21 Nov 2013 05:46:19 +0000 (16:46 +1100)]
[perl #82948] use re::regexp_pattern in list context for dumping qr//

10 years agoperldelta for [perl #120799]
Karl Williamson [Tue, 17 Dec 2013 01:51:02 +0000 (18:51 -0700)]
perldelta for [perl #120799]

10 years agoperldelta for 892089cd68
Tony Cook [Tue, 17 Dec 2013 00:25:36 +0000 (11:25 +1100)]
perldelta for 892089cd68

10 years agobump $VERSION for base.pm
Tony Cook [Tue, 17 Dec 2013 00:08:31 +0000 (11:08 +1100)]
bump $VERSION for base.pm

10 years agomake base.pm more strict about nonexistent module check
Graham Knop [Wed, 4 Dec 2013 10:54:02 +0000 (05:54 -0500)]
make base.pm more strict about nonexistent module check

10 years agoFix reference to chmod portability in chown
Peter Martini [Mon, 16 Dec 2013 23:01:23 +0000 (18:01 -0500)]
Fix reference to chmod portability in chown

10 years agoAdd comments that re tests can be commented in col 7
Karl Williamson [Mon, 16 Dec 2013 18:14:02 +0000 (11:14 -0700)]
Add comments that re tests can be commented in col 7

10 years agoregcomp.c: Add comment
Karl Williamson [Mon, 16 Dec 2013 18:13:35 +0000 (11:13 -0700)]
regcomp.c: Add comment

10 years agoPATCH: [perl #120799] 5.18 regression with [:^ascii] and \x80-\xFF
Karl Williamson [Mon, 16 Dec 2013 17:59:36 +0000 (10:59 -0700)]
PATCH: [perl #120799] 5.18 regression with [:^ascii] and \x80-\xFF

Posix classes generally match different sets of characters under /d
rules than otherwise.  This isn't true for [:ascii:], but the handling
for it is shared with the others, so it needs to use the same mechanism
to deal with that.  I forgot this in commit
bb9ee97444732c84b33c2f2432aa28e52e4651dc which created this regression.

Our tests for this only use regexes with a single element, and an
optimization added in 5.18 causes this bug to be bypassed.  These tests
should be enhanced to force both code paths, but not for this commit,
which should be suitable for a maintenance release.

10 years agoGet optree_samples.t passing when PERL_UNICODE is set
Father Chrysostomos [Mon, 16 Dec 2013 14:04:29 +0000 (06:04 -0800)]
Get optree_samples.t passing when PERL_UNICODE is set

The testing infrastructure knows to strip out the ‘open’ hints when
they do not apply.

10 years agoAdd Dabrien Murphy to AUTHORS
Father Chrysostomos [Mon, 16 Dec 2013 05:26:22 +0000 (21:26 -0800)]
Add Dabrien Murphy to AUTHORS

10 years ago[perl #120752] Fix t/op/coreamp.t rand test
Dabrien 'Dabe' Murphy [Mon, 16 Dec 2013 05:24:54 +0000 (21:24 -0800)]
[perl #120752] Fix t/op/coreamp.t rand test

The way it was written it would even accept an empty string as
valid output.

10 years agoperldelta for 6b44ec6808
Tony Cook [Mon, 16 Dec 2013 04:47:34 +0000 (15:47 +1100)]
perldelta for 6b44ec6808

10 years agoMake tests work with detached git dir
Dennis Kaarsemaker [Sun, 10 Nov 2013 22:17:38 +0000 (23:17 +0100)]
Make tests work with detached git dir

In my jenkins replacement, I run all tests with .git outside the work tree,
pointed to by $GIT_DIR. This is fairly common git practice, so let's make the
testsuite support this and run the relevant porting tests that are skipped
without this patch.

10 years agofix format string warnings in regcomp.c
Tony Cook [Sun, 15 Dec 2013 22:35:00 +0000 (09:35 +1100)]
fix format string warnings in regcomp.c

10 years ago[perl #72406] Bad read with do{} until CONST
Father Chrysostomos [Sun, 15 Dec 2013 20:39:18 +0000 (12:39 -0800)]
[perl #72406] Bad read with do{} until CONST

According to the original bug report, ‘do{print("foobar");}until(1)}’
crashes.  In recent perls it doesn’t, partly because of the slab allo-
cator, partly because such crashes are naturally fleeting.

‘foo while bar’ and ‘foo until bar’ make their way through newLOOPOP,
which then usually calls S_new_logop, to create and AND or OR op with
special pointers that turn it into a loop.

Because S_new_logop knows about folding ‘$x if 1’ down to a simple $x,
and because ‘do{foo()} while 0’ should still execute the do block,
newLOOPOP skips the call to S_new_logop in that case.

Hence, it assumes that if it has seen a do block on its lhs, then
S_new_logop must return an AND or OR op.

‘foo until bar’ is actually changed early on (in perly.y) to ‘foo
while !bar’, before it reaches newLOOPOP.  Constant folding usually
folds !1 down to a simple ""/0 (actually &PL_sv_no), so newLOOPOP sees
‘foo while 0’ for ‘foo until 1’.

If constant folding fails (e.g., because the parser has seen an
unmatched } and constant folding is skipped after such errors), then
newLOOPOP will see the unfolded !1.

S_new_logop has a special optimisation that changes ‘!foo && bar’ to
‘foo || bar’, etc.

That optimisation allows it to ‘see through’ the unoptimised !1 (a NOT
with a CONST kid) and get to the constant, folding the resulting op
and returning something that newLOOPOP is not expecting to be folded.
In the case of ‘do{print("foobar");}until(1)}’, it optimises the do
block away, which is wrong.

So newLOOPOP reads past the end of the op in this line:

o->op_next = ((LOGOP*)cUNOPo->op_first)->op_other;

because it is treating an SVOP as a LOGOP.

I can trigger this condition by defeating constant folding some other
way.  Croaking in boolean overloading, but just the first time, will
do that, and crashes with blead:

{ package o; use overload bool => sub { die unless $::ok++; return 1 } }
use constant OK => bless [], o::;
do{print("foobar");}until OK;
__END__
Bus error: 10

My reading of the source code leads me to believe that this bad read
has been present since perl 5.000.  But back then it was not possible
to trigger it with this particular test case involving fatal overload-
ing (as of b7f7fd0bb it seems*), but ‘do{print("foobar");}until(1)}’
would have triggered it.

* Thanks to Matthew Horsfall for finding it.

10 years agoAlso optimise returning lists: 'return ($one, $two);'
Matthew Horsfall [Sun, 15 Dec 2013 03:25:22 +0000 (22:25 -0500)]
Also optimise returning lists: 'return ($one, $two);'

10 years agoTests for rpeep optimisations in e45d8982ae
Matthew Horsfall (alh) [Fri, 13 Dec 2013 17:57:47 +0000 (12:57 -0500)]
Tests for rpeep optimisations in e45d8982ae

10 years agoFix ‘Can't declare null operation in "my"’
Father Chrysostomos [Sat, 14 Dec 2013 01:48:34 +0000 (17:48 -0800)]
Fix ‘Can't declare null operation in "my"’

This message is very unhelpful.  This was brought up in
ticket #115688.

10 years agoop.c: Factor out two identical yyerror calls
Father Chrysostomos [Sat, 14 Dec 2013 01:01:46 +0000 (17:01 -0800)]
op.c: Factor out two identical yyerror calls

10 years agoExplain how '--' works in command-line invocation.
James E Keenan [Sat, 14 Dec 2013 00:08:09 +0000 (01:08 +0100)]
Explain how '--' works in command-line invocation.

Excerpted from 'man bash': GNU Bash-2.05b, 2002 July 15.

For: RT #120732, as requested by bulk88.

10 years agoOptimise out PUSHMARK/RETURN if return is the last statement in a sub.
Matthew Horsfall [Wed, 11 Dec 2013 23:28:21 +0000 (18:28 -0500)]
Optimise out PUSHMARK/RETURN if return is the last statement in a sub.

This makes:

  sub baz { return $cat; }

Behave like:

  sub baz { $cat; }

Which is notably faster.

Unpatched:

  ./perl -Ilib/ ~/stuff/bench.pl
  Benchmark: timing 40000000 iterations of normal, ret...
    normal:  3 wallclock secs ( 1.60 usr +  0.01 sys =  1.61 CPU) @ 24844720.50/s (n=40000000)
       ret:  3 wallclock secs ( 2.08 usr +  0.00 sys =  2.08 CPU) @ 19230769.23/s (n=40000000)

Patched:

  ./perl -Ilib ~/stuff/bench.pl
  Benchmark: timing 40000000 iterations of aret, normal...
    normal:  2 wallclock secs ( 1.72 usr +  0.00 sys =  1.72 CPU) @ 23255813.95/s (n=40000000)
       ret:  2 wallclock secs ( 1.72 usr +  0.00 sys =  1.72 CPU) @ 23255813.95/s (n=40000000)

The difference in OP trees can be seen here:

Unpatched:

  $ perl  -MO=Concise,baz -e 'sub baz { return $cat }'
  main::baz:
  5  <1> leavesub[1 ref] K/REFC,1 ->(end)
  -     <@> lineseq KP ->5
  1        <;> nextstate(main 1 -e:1) v ->2
  4        <@> return K ->5
  2           <0> pushmark s ->3
  -           <1> ex-rv2sv sK/1 ->4
  3              <#> gvsv[*cat] s ->4
  -e syntax OK

Patched:

  $ ./perl -Ilib  -MO=Concise,baz -e 'sub baz { return $cat }'
  main::baz:
  3  <1> leavesub[1 ref] K/REFC,1 ->(end)
  -     <@> lineseq KP ->3
  1        <;> nextstate(main 1 -e:1) v ->2
  -        <@> return K ->-
  -           <0> pushmark s ->2
  -           <1> ex-rv2sv sK/1 ->-
  2              <$> gvsv(*cat) s ->3
  -e syntax OK

(Includes some modifications from Steffen)

10 years agocflags.SH: Fix a typo, cflags should be ccflags
Brian Fraser [Mon, 18 Nov 2013 18:49:22 +0000 (15:49 -0300)]
cflags.SH: Fix a typo, cflags should be ccflags

This went undetected for the longest time since most flags are
irrelevant at this point, but is vital if you are using --sysroot.

10 years agopod/perlhacktips: Further info on glibc bug
Karl Williamson [Mon, 9 Dec 2013 23:06:01 +0000 (16:06 -0700)]
pod/perlhacktips: Further info on glibc bug

Commit 6bfe0388956736a32b874cc5e31cc6437260b227 prompted me to do some
more digging.  The bug in glibc has apparently been fixed in 2.17.

10 years agoperlfunc: clarify subroutine value of caller()
David Mitchell [Mon, 9 Dec 2013 14:18:44 +0000 (14:18 +0000)]
perlfunc: clarify subroutine value of caller()

The docs don't actually say what the fourth value returned by caller()
is; in particular, the $subroutine value is a bit confusing because
it's the sub called by the call site, not the sub containing the call
site. [perl #120696].

10 years agoWinCE makefile will now hypothetically build git_version.h
Daniel Dragan [Mon, 9 Dec 2013 00:46:19 +0000 (19:46 -0500)]
WinCE makefile will now hypothetically build git_version.h

The dependency on $(CONFIGPM) is for git_version.h to exist early enough
to be copied to the CORE dir. In real life, git_version.h still is built
by a Desktop build since WinCE doesn't yet support being built with a
system Perl. This commit is a step in getting WinCE to build without
needing a Desktop build first and for better integration with Castaway's
Cross changes in the future. The changes in this commit were tested with
other unpublished changes that tried to do a WinCE build with a system
Perl.

10 years agocleanup ..\git_version.h rule in win32/Makefile
Daniel Dragan [Mon, 9 Dec 2013 00:38:49 +0000 (19:38 -0500)]
cleanup ..\git_version.h rule in win32/Makefile

Group the nmake line onto 1 line similar to the dmake version, for 1 shell
call out vs 3. "&&" makes sure the build stops if miniperl returns non-0
instead of ignoring the code, cd'ing back to dir win32, and continuing
the build. Part of RT #120727.

10 years agoperldelta for 64d7628235
Tony Cook [Mon, 9 Dec 2013 03:39:20 +0000 (14:39 +1100)]
perldelta for 64d7628235

10 years agoBrian Childs is now a perl AUTHOR
Tony Cook [Wed, 4 Dec 2013 00:30:57 +0000 (01:30 +0100)]
Brian Childs is now a perl AUTHOR

10 years agoFixes the case where on 64bit big-endian boxes, calls to semctl(id,semnum,SETVAL...
Brian Childs [Tue, 3 Dec 2013 05:33:41 +0000 (06:33 +0100)]
Fixes the case where on 64bit big-endian boxes, calls to semctl(id,semnum,SETVAL,$wantedval) will ignore the passed in $wantedval, and always use 0

10 years agoTest previously untested branches in lib/File/Find.pm.
James E Keenan [Sun, 8 Dec 2013 15:10:01 +0000 (16:10 +0100)]
Test previously untested branches in lib/File/Find.pm.

10 years agoImprove comments
Karl Williamson [Sun, 8 Dec 2013 16:48:55 +0000 (09:48 -0700)]
Improve comments

These improve some comments introduced by
99dd98225733b6b66a524dfeb20a486e012e39b3.

Suggested by Lukas Mai

10 years agoSilence core test Useless use of greediness modifier
Karl Williamson [Sun, 8 Dec 2013 15:20:58 +0000 (08:20 -0700)]
Silence core test Useless use of greediness modifier

There are two .t files that have useless greediness modifiers.  A
warning was instroduced in commit
4fa6dd16d2149c2aeeb32633e3a796d5ebc5b657 when this occurs.  This
silences those warnings in the two .t files

10 years agoError check VMS's backticks stdin inheritance.
Craig A. Berry [Sun, 8 Dec 2013 14:06:58 +0000 (08:06 -0600)]
Error check VMS's backticks stdin inheritance.

This is a follow-up to e2d6c6fbf5bb.  The use case I've seen is
that the translation of SYS$INPUT succeeds but the stat on the
resulting file/device fails, possibly due to object protections.
So we would be giving the child something it can't open.

Add error checking to the logic so in order to set up inheritance
of SYS$INPUT:

 1.) The translation of SYS$INPUT must succeed.
 2.) stat() on the resulting spec must succeed.
 3.) The resulting spec must not be a directory.

10 years agoregcomp.c: Silence compiler warnings
Karl Williamson [Sat, 7 Dec 2013 16:32:51 +0000 (09:32 -0700)]
regcomp.c: Silence compiler warnings

This changes some formats to add an 'l' modifier, and adds a cast.

10 years agoPATCH: [Perl #42957] Suggesting warning for useless greediness operator
Karl Williamson [Fri, 6 Dec 2013 22:50:52 +0000 (15:50 -0700)]
PATCH: [Perl #42957] Suggesting warning for useless greediness operator

This adds the requested warning.  Now we'll see if anything breaks as a
result.

10 years agoregcomp.c: White-space only
Karl Williamson [Fri, 6 Dec 2013 22:26:53 +0000 (15:26 -0700)]
regcomp.c: White-space only

Vertically stack ? : ternary operators for better visibility

10 years agoRemove tests of $File::Find::untaint_pattern.
James E Keenan [Sat, 7 Dec 2013 13:45:16 +0000 (14:45 +0100)]
Remove tests of $File::Find::untaint_pattern.

This in effect reverts commit 5ea8618bf5cf20c62d2ccca6aca10d97e0945b89.
The effects of this package variable are not yet well enough understood to
write tests that pass consistently.  The block of tests removed was failing on
Win32 in all situations and on Linux in some.

For: RT #120711

10 years agoUpdate Unicode-Collate to CPAN version 1.04
Chris 'BinGOs' Williams [Sat, 7 Dec 2013 09:40:43 +0000 (09:40 +0000)]
Update Unicode-Collate to CPAN version 1.04

  [DELTA]

1.04  Sat Dec  7 11:34:18 2013
    - XS: a workaround for perl 5.6.x to handle U+FFFF correctly.
      unpack_U() is implemented by using XS again as well as that in 1.02,
      but now that is used only in the versions before perl 5.8.0.

10 years ago[Merge] Get minitest passing again
Father Chrysostomos [Sat, 7 Dec 2013 02:41:08 +0000 (18:41 -0800)]
[Merge] Get minitest passing again

One significant change is to the way miniperl gets its @INC set up.
Now buildcustomize.pl replaces lib with its special list, instead of
clobbering the entirety of @INC.  This allows tests to use runperl
with -I, without having to go through hoops to get things to work.

10 years agot/uni/variables.t: Skip $[ test under miniperl
Father Chrysostomos [Wed, 4 Dec 2013 14:12:56 +0000 (06:12 -0800)]
t/uni/variables.t: Skip $[ test under miniperl

10 years agoSkip eintr_print.t under miniperl
Father Chrysostomos [Wed, 4 Dec 2013 14:12:35 +0000 (06:12 -0800)]
Skip eintr_print.t under miniperl

10 years agocrlf.t: Add skip count
Father Chrysostomos [Wed, 4 Dec 2013 14:00:01 +0000 (06:00 -0800)]
crlf.t: Add skip count

10 years agoGet switches.t to pass under miniperl
Father Chrysostomos [Wed, 4 Dec 2013 13:56:08 +0000 (05:56 -0800)]
Get switches.t to pass under miniperl

10 years agoDo not clobber @INC completely in buildcustomize.pl
Father Chrysostomos [Wed, 4 Dec 2013 13:46:40 +0000 (05:46 -0800)]
Do not clobber @INC completely in buildcustomize.pl

buildcustomize.pl (for miniperl) replaces @INC (usually qw(lib .))
with the whole list of build directories we need followed by
qw(lib .).

runperl from test.pl is such that this:

    runperl(switches => [ "-Irun/flib" ], ...)

turns into:

    /path/to/perl.git/miniperl "-I../lib" -Irun/flib

The end result is that -Irun/flib gets stripped out and clobbered, and
switchM.t fails under minitest.

10 years agoAdd DO NOT EDIT notice to buildcustomize.pl
Father Chrysostomos [Wed, 4 Dec 2013 13:28:20 +0000 (05:28 -0800)]
Add DO NOT EDIT notice to buildcustomize.pl

10 years agoperlapi, sv.c: Comments and API documentation
Karl Williamson [Fri, 6 Dec 2013 21:23:43 +0000 (14:23 -0700)]
perlapi, sv.c: Comments and API documentation

10 years agoperlretut: Spelling
Karl Williamson [Fri, 6 Dec 2013 21:03:51 +0000 (14:03 -0700)]
perlretut: Spelling

10 years agoperlrebackslash: Add clarifying note about \X
Karl Williamson [Fri, 6 Dec 2013 20:56:51 +0000 (13:56 -0700)]
perlrebackslash: Add clarifying note about \X

10 years agoperlhacktips: Note sprintf glibc bug and workarounds
Karl Williamson [Thu, 12 Sep 2013 03:41:32 +0000 (21:41 -0600)]
perlhacktips: Note sprintf glibc bug and workarounds

http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2013-09/msg00506.htmlP

10 years agoutf8.c: White-space only
Karl Williamson [Fri, 6 Dec 2013 05:19:09 +0000 (22:19 -0700)]
utf8.c: White-space only

Rearrange this multi-line conditional to be easier to read.

10 years agoutf8.h: Add parameter checking to some macros in DEBUGGING builds
Karl Williamson [Tue, 3 Dec 2013 04:55:55 +0000 (21:55 -0700)]
utf8.h: Add parameter checking to some macros in DEBUGGING builds

This change should catch some wrong calls to these macros.  The meat of
the macros is extracted out into two internal-only macros, and the other
macros are rearranged to call these.

10 years agoperlapi: Grammar nits
Karl Williamson [Thu, 5 Dec 2013 06:56:34 +0000 (23:56 -0700)]
perlapi: Grammar nits

"The" referring to a parameter here does not look right to me, a native
English speaker.

10 years agoutf8.c: Remove hard-coded names.
Karl Williamson [Thu, 5 Dec 2013 06:53:14 +0000 (23:53 -0700)]
utf8.c: Remove hard-coded names.

The names of these hashes stored in some disk files is retrievable by a
standardized lookup.  There is no need to have them hard-coded in C
code.  This is one less opportunity for the file and the code to get out
of sync.

10 years agoregcomp.c: Rmv inaccurate and tangential comment
Karl Williamson [Thu, 5 Dec 2013 06:01:30 +0000 (23:01 -0700)]
regcomp.c: Rmv inaccurate and tangential comment

This comment contained inaccuracies and referred to behavior that has
been removed from the core for years.  isPRINT() is sufficiently
documented elsewhere to not need to have its use justified here.

I considered moving part of it to perlebcdic, but it's not generally
true: it's not true for one of Perl's supported EBCDIC code pages, for
example.

10 years agomktables: Add comments to output tables
Karl Williamson [Thu, 5 Dec 2013 05:46:08 +0000 (22:46 -0700)]
mktables: Add comments to output tables

10 years ago[perl #120694] Fix ->SUPER::foo and AUTOLOAD
Father Chrysostomos [Thu, 5 Dec 2013 00:00:48 +0000 (16:00 -0800)]
[perl #120694] Fix ->SUPER::foo and AUTOLOAD

Commit aae438050a20 (5.17.4) broke ->SUPER::foo with AUTOLOAD by look-
ing up AUTOLOAD from the current package, rather than the current
package’s superclass.

Instead of keeping track of whether it was doing a SUPER lookup via a
::SUPER prefix on the package name, that commit changed method lookup
to pass a GV_SUPER flag around (to fix another bug) and to pass the
current stash, rather than __PACKAGE__::SUPER.  But it did not update
gv_autoload_pvn to pass that flag through to gv_fetchmeth_pvn when
actually looking up the method.

10 years agoregexec.c: No statements before declarations
Karl Williamson [Thu, 5 Dec 2013 04:24:38 +0000 (21:24 -0700)]
regexec.c: No statements before declarations

Commit b99851e1941e002dd4816ee6c76fd49bbee1d7f3 moved a statement to
before the declarations in its block.  Mea culpa.  It turns out that I
missed the warnings that were shown for -W=declaration-after-statement.
I'm henceforth changing that to -Werror=declaration-after-statement.

10 years agoperllocale: Add info about locale testing.
Karl Williamson [Thu, 5 Dec 2013 02:50:04 +0000 (19:50 -0700)]
perllocale: Add info about locale testing.

10 years agoperllocale: Nit, and clarification
Karl Williamson [Thu, 5 Dec 2013 02:47:19 +0000 (19:47 -0700)]
perllocale: Nit, and clarification

10 years agoPATCH: [perl #120675] Unexpected tainting via regex using locale
Karl Williamson [Wed, 4 Dec 2013 17:06:04 +0000 (10:06 -0700)]
PATCH: [perl #120675] Unexpected tainting via regex using locale

Tainting should only be turned on if something that could be tainted is
actually tried.  Hence in a [bracketed character class], if the
character being matched is something like

    "a" =~ /([a-z])/l;

tainting isn't turned on because the match doesn't actually depend on
the locale definition.  That is, it would match regardless of the
locale.  Similarly,

    "A" =~ /([a-z])/l;

shouldn't turn on tainting because it shouldn't match no matter what
locale is in effect.  However, until this commit, this worked only
because of a compilte time optimization.  The following (from the
ticket) isn't optimized and didn't work until this commit:

    "foo.bar_baz" =~ /^(.*)[._](.*?)$/';

The [._] was causing tainting even though there is nothing in the
pattern that is locale-dependent.

This commit just moves the tainting to code branches where the locale
actually does matter.  It was just turning it on for any bracketed
character class where the target character didn't match any of the
explicit characters in the class.

10 years agomktables: Clean up relict usage
Karl Williamson [Tue, 3 Dec 2013 06:23:50 +0000 (23:23 -0700)]
mktables: Clean up relict usage

The 'status' of a table generated by mktables was split into two
concepts; these lines should have been changed to reflect that split,
but weren't.  This didn't affect what actually gets generated.
concept

10 years agomktables: Default those tables whose names begin with '_' to internal
Karl Williamson [Tue, 3 Dec 2013 05:44:36 +0000 (22:44 -0700)]
mktables: Default those tables whose names begin with '_' to internal

Some tables that mktables generates are for specialized internal core
use, and should not be accessible through Unicode::UCD nor listed in
perluniprops.  The creation code for _Perl_Any_Folds was moved by commit
8d88896d10ee81fb95a9494ca771f9d2b14f5fc7, but it wasn't a clean move and
the line that caused it to be marked as internal was accidentally removed.
This commit changes things to default to internal-only if the name
begins with an underscore, overridable by an explicit setting.  Thus the
line that got omitted is no longer necessary, and future mistakes like
this won't have any effect.  This is the only property currently
affected by this change.

10 years agoperluniprops: Nit
Karl Williamson [Tue, 3 Dec 2013 05:20:51 +0000 (22:20 -0700)]
perluniprops: Nit

This uses the singular, but might be output applying to more than one.

10 years agoperlapi: Nits
Karl Williamson [Tue, 3 Dec 2013 05:00:31 +0000 (22:00 -0700)]
perlapi: Nits

10 years agoutf8.h: Fix grammar in comment
Karl Williamson [Tue, 3 Dec 2013 04:54:37 +0000 (21:54 -0700)]
utf8.h: Fix grammar in comment

10 years agolib/locale.t: Only output debug message if relevant
Karl Williamson [Tue, 3 Dec 2013 02:28:52 +0000 (19:28 -0700)]
lib/locale.t: Only output debug message if relevant

This message telling people to set an environment variable was output
even if the variable was already set; this is potentially confusing

10 years agoperllocale.pod: clarify tainting of $1 et al
David Mitchell [Wed, 4 Dec 2013 17:05:16 +0000 (17:05 +0000)]
perllocale.pod: clarify tainting of $1 et al

[perl #120675]

The docs weren't clear that *any* locale info used in a regex taints *all*
of $1, $2,...

10 years agotoke.c: Pass GV_NOTQUAL for override lookup
Father Chrysostomos [Wed, 4 Dec 2013 12:24:32 +0000 (04:24 -0800)]
toke.c: Pass GV_NOTQUAL for override lookup

We know in this code path that the name is unqualified, so tell
gv_fetchpvn_flags to skip the parser that looks for package
separators.

10 years agoUpdate CPAN-Meta to CPAN version 2.133380
Chris 'BinGOs' Williams [Wed, 4 Dec 2013 08:46:07 +0000 (08:46 +0000)]
Update CPAN-Meta to CPAN version 2.133380

  [DELTA]

2.133380  2013-12-03 23:01:07 America/New_York

  [FIXED]

  - Improved bad version handling during META conversion

  - When downgrading multiple licenses to version 1.x META formats, if all
    the licenses are open source, the downgraded license will be
    "open_source", not "unknown"

10 years agoUpdate Time-Piece to CPAN version 1.24
Chris 'BinGOs' Williams [Wed, 4 Dec 2013 08:21:39 +0000 (08:21 +0000)]
Update Time-Piece to CPAN version 1.24

  [DELTA]

1.24      2013-12-03
        - add repository metadata (thanks, David Steinbrunner)

10 years agoAdd test for previously uncovered case.
James E Keenan [Wed, 4 Dec 2013 02:56:13 +0000 (03:56 +0100)]
Add test for previously uncovered case.

Explicitly assigned $File::Find::untaint_pattern.

10 years agoStandardize dir_path() and file_path() in package Testing.
James E Keenan [Sun, 1 Dec 2013 18:24:06 +0000 (19:24 +0100)]
Standardize dir_path() and file_path() in package Testing.

The versions of dir_path() and file_path() previously found in find.t and
taint.t differed only in VMS-specific provisions in taint.t.  Move the
taint.t-versions to the package and use them in both files.

10 years agolib/locale.t: Test /il matching
Karl Williamson [Sun, 1 Dec 2013 18:25:34 +0000 (11:25 -0700)]
lib/locale.t: Test /il matching

Case-insensitive matching was essentially being skipped here.  This was
because some locales were broken on some platforms which caused locale.t
to always fail somewhere.  However, the previous commit has changed that
so if just a few locales are bad, the tests are marked as TODOs.  Thus
we can make the /il match tests robust.