This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
10 years ago[perl #118955] bump $bignum::VERSION to 0.36
Tony Cook [Wed, 24 Jul 2013 07:16:13 +0000 (17:16 +1000)]
[perl #118955] bump $bignum::VERSION to 0.36

set all other modules in dist/bignum to 0.36 too, the CPAN dist has
them all at the same version

10 years agoInitialize BigInt's $MBI correctly with "use bigrat lib => '...'".
Nathan Trapuzzano [Wed, 24 Jul 2013 00:34:16 +0000 (20:34 -0400)]
Initialize BigInt's $MBI correctly with "use bigrat lib => '...'".

10 years agoRefactor t/porting/regen.t to check everything (and the return values!).
Nicholas Clark [Thu, 18 Jul 2013 14:57:00 +0000 (16:57 +0200)]
Refactor t/porting/regen.t to check everything (and the return values!).

Previously it was fire-and-forget for the 3 programs it ran (and for the
programs that regen.pl ran). Now we die if any program fails to return 0.

Also regen.t had an explicit list of programs to test. It turned out that it
was not testing regen/mk_invlists.pl. Now regen.t has a skip list of what
not to test, and everything not skipped it tested. This way any new
additions will not get missed.

This was implemented by refactoring regen.pl to read the list of programs it
runs from <DATA>, so that regen.t can open regen.pl to extract the same
list.

10 years agoSyntax check regen/uconfig_h.pl using t/porting/utils.t
Nicholas Clark [Thu, 18 Jul 2013 13:10:29 +0000 (15:10 +0200)]
Syntax check regen/uconfig_h.pl using t/porting/utils.t

It's the only regen script that we can't run as part of the tests (because it
requires a Unix shell), but can syntax check (because it only uses core
modules).

In theory we could make it skip with --tap if $Config{sh} is not what we
expect, but to be robust this looks to be a problem. Firstly, $Config{sh}
can be undef, or something "non-Unix". To be useful a whitelist needs to be
(at least) (?:/usr)?/bin/sh, and potentially also ksh. But the output is not
valid TAP:

$ ./perl -Ilib regen/uconfig_h.pl --tap
Extracting uconfig.h-new (with variable substitutions)
ok - regen/uconfig_h.pl uconfig.h

and t/TEST would choke, so we'd need to capture it or otherwise comment out
that "Extracting" line which just adds both complexity and fragility.

So the right trade off appears to be just to syntax check it.

10 years agoMissed this when updating Module-Build
Chris 'BinGOs' Williams [Wed, 24 Jul 2013 06:55:36 +0000 (07:55 +0100)]
Missed this when updating Module-Build

10 years agoperldelta for ab5c89ab2
Tony Cook [Wed, 24 Jul 2013 06:08:48 +0000 (16:08 +1000)]
perldelta for ab5c89ab2

10 years ago[perl #118907] Do not call DESTROY on empty objects with STORABLE_attach
Tony Cook [Wed, 24 Jul 2013 06:00:45 +0000 (16:00 +1000)]
[perl #118907] Do not call DESTROY on empty objects with STORABLE_attach

avoids creating temporary objects for STORABLE_attach when they aren't
needed.

10 years ago[perl #118907] bump $Storable::VERSION
Tony Cook [Wed, 24 Jul 2013 05:58:46 +0000 (15:58 +1000)]
[perl #118907] bump $Storable::VERSION

10 years ago[perl #118907] fix some issues with patch
Tony Cook [Mon, 15 Jul 2013 04:17:25 +0000 (14:17 +1000)]
[perl #118907] fix some issues with patch

10 years agoRestore Storable speed after previous fix.
Vladimir Timofeev [Fri, 12 Jul 2013 20:40:23 +0000 (00:40 +0400)]
Restore Storable speed after previous fix.

Pull out getting stash by name from macro BLESS and SEEN.
So results of gv_stashpv may be reused by calling side. This allow
to not evaluate same things twice in retrieve_hook.

10 years agoDo not call DESTROY for empty objects
Vladimir Timofeev [Thu, 11 Jul 2013 23:14:19 +0000 (03:14 +0400)]
Do not call DESTROY for empty objects

Before this fix, deserialization process for object with STORABLE_attach
hook looks like:
1. create SV of needed type
2. lookup classname
3. bless SV to class
4. lookup for STORABLE_attach
5. destroy SV
6. return result of STORABLE_attach call
As a result DESTROY method of target class was called with empty, not
initialized object. This behaviour very bad especially for non
hash-based XS objects.

Fix it, by move blessing temprorary SV after STORABLE_attach hook check.

This commit slowdown deserialization of other objects (with
STORABLE_thaw hook). It will be fixed later.

10 years ago[perl #118923] Add some edge cases to join.t
Tony Cook [Wed, 24 Jul 2013 05:39:46 +0000 (15:39 +1000)]
[perl #118923] Add some edge cases to join.t

10 years agojoin() with an empty list and undef separator may not warn in the future
Tony Cook [Wed, 24 Jul 2013 05:37:37 +0000 (15:37 +1000)]
join() with an empty list and undef separator may not warn in the future

but keep the test to avoid it changing by accident

10 years agoadd Victor Efimov to AUTHORS
Tony Cook [Wed, 24 Jul 2013 05:36:42 +0000 (15:36 +1000)]
add Victor Efimov to AUTHORS

10 years agoAdd some edge cases to join.t test
Victor Efimov [Tue, 16 Jul 2013 16:39:12 +0000 (20:39 +0400)]
Add some edge cases to join.t test

test what join return if called with empty LIST, also
test that it produce warning if separator is undef

10 years agoperldelta: note the perlopentut rewrite
Ricardo Signes [Wed, 24 Jul 2013 04:37:32 +0000 (21:37 -0700)]
perldelta: note the perlopentut rewrite

10 years agoMerge branch 'perlopentut' into blead
Ricardo Signes [Wed, 24 Jul 2013 04:34:36 +0000 (21:34 -0700)]
Merge branch 'perlopentut' into blead

10 years agoperlopentut: standardize on no newline in die
Ricardo Signes [Wed, 24 Jul 2013 04:25:07 +0000 (21:25 -0700)]
perlopentut: standardize on no newline in die

it is nice to know from where an error originates!

10 years agoperlopentut: Spelling and stylistic improvements only.
James E Keenan [Fri, 12 Jul 2013 15:35:42 +0000 (17:35 +0200)]
perlopentut: Spelling and stylistic improvements only.

10 years agoperlopentut: add copyright/author, remove history
Ricardo Signes [Fri, 12 Jul 2013 14:55:59 +0000 (10:55 -0400)]
perlopentut: add copyright/author, remove history

10 years agoperlopentut: correct perlfaq links
Ricardo Signes [Fri, 12 Jul 2013 14:42:06 +0000 (10:42 -0400)]
perlopentut: correct perlfaq links

thanks to David Golden for pointing this out

10 years agoDon't patch perlopentut: rewrite it completely
Tom Christiansen [Fri, 12 Jul 2013 14:20:36 +0000 (10:20 -0400)]
Don't patch perlopentut: rewrite it completely

Patch made by rjbs, from <10107.1361064602@chthon>

> Nearly [all of perlopentut] is non-simple. That is not a tutorial,
> and it is not just about open.  It is more like "FMTEYEWTK About
> open() and I/O in Perl". If the goal is to create a document that
> teaches people how to use open() for the simple cases, then there
> is no hope for perlopentut.  It cannot be turned into that,
> because that is not what it is.  You have to start over.

10 years agoRevert "Remove the non-inline function S_croak_memory_wrap from inline.h."
Tony Cook [Tue, 23 Jul 2013 01:36:01 +0000 (11:36 +1000)]
Revert "Remove the non-inline function S_croak_memory_wrap from inline.h."

This reverts commit 43387ee1abcd83c3c7586b7f7aa86e838d239aac.

Which reverted parts of f019c49e380f764c1ead36fe3602184804292711, but that
reversion may no longer be necessary.

See [perl #116989]

10 years agoFor changelogs suggest name it Changes and follow CPAN::Changes::Spec
Neil Bowers [Sun, 21 Jul 2013 19:59:20 +0000 (20:59 +0100)]
For changelogs suggest name it Changes and follow CPAN::Changes::Spec

10 years agoRevert "perl5180delta: typo"
Father Chrysostomos [Wed, 24 Jul 2013 01:01:35 +0000 (18:01 -0700)]
Revert "perl5180delta: typo"

This reverts commit cbd5ead563d5a5df04e771f407468c0d3bcdb9f7.

Tony Cook pointed out in
<20130724003722.GA12260@mars.tony.develop-help.com> that I have no
idea what I am talking about.

(I did mean gigabyte.)

10 years agopos.t: test something I almost broke
Father Chrysostomos [Tue, 23 Jul 2013 21:38:30 +0000 (14:38 -0700)]
pos.t: test something I almost broke

10 years agofix typo in sv.c apidocs
Father Chrysostomos [Tue, 23 Jul 2013 21:37:29 +0000 (14:37 -0700)]
fix typo in sv.c apidocs

sv_pos_u2b_flags has no offsetp parameter.  This was copied from
sv_pos_u2b.

10 years agosv.c: Remove overflow check in utf8 length cache
Father Chrysostomos [Sun, 21 Jul 2013 13:56:07 +0000 (06:56 -0700)]
sv.c: Remove overflow check in utf8 length cache

In order to make large values of pos() possible, the previous commit
enlarged the mg_len field of the magic struct.  That field is also
used for cached utf8 length values.  Since it is now large enough to
store any length the OS/compiler supports, the overflow never happens.

10 years ago[perl #72766] Allow huge pos() settings
Father Chrysostomos [Sun, 21 Jul 2013 07:38:28 +0000 (00:38 -0700)]
[perl #72766] Allow huge pos() settings

This is part of #116907, too.  It also fixes #72924 as a side effect;
the next commit will explain.

The value of pos($foo) was being stored as an I32, not allowing values
above I32_MAX.  Change it to SSize_t (the signed equivalent of size_t,
representing the maximum string length the OS/compiler supports).

This is accomplished by changing the size of the entry in the magic
struct, which is the simplest fix.

Other parts of the code base can benefit from this, too.

We actually cast the pos value to STRLEN (size_t) when reading
it, to allow *very* long strings.  Only the value -1 is special,
meaning there is no pos.  So the maximum supported offset is
2**sizeof(size_t)-2.

The regexp engine itself still cannot handle large strings, so being
able to set pos to large values is useless right now.  This is but one
piece in a larger puzzle.

Changing the size of mg->mg_len also requires that
Perl_hv_placeholders_p change its type.  This function
should in fact not be in the API, since it exists
solely to implement the HvPLACEHOLDERS macro.  See
<https://rt.perl.org/rt3/Ticket/Display.html?id=116907#txn-1237043>.

10 years agoAdd sv_pos_b2u_flags
Father Chrysostomos [Sun, 21 Jul 2013 07:30:20 +0000 (00:30 -0700)]
Add sv_pos_b2u_flags

This, similar to sv_pos_u2b_flags, is a more friendly variant of
sv_pos_u2b that works with 2GB strings and actually returns a
value instead of modifying a passed-in value in place through
a pointer.

The next commit will use this.

10 years agoperl5180delta: typo
Father Chrysostomos [Sun, 21 Jul 2013 02:02:13 +0000 (19:02 -0700)]
perl5180delta: typo

10 years ago_invlist_intersection() didn't work for NULL first param
Karl Williamson [Tue, 23 Jul 2013 16:40:07 +0000 (10:40 -0600)]
_invlist_intersection() didn't work for NULL first param

It is supposed to accept a NULL first parameter (one of the operands to
the intersection).  This adds a special case for it.

10 years agosv.c: Remove duplicate dups
Karl Williamson [Tue, 23 Jul 2013 15:42:25 +0000 (09:42 -0600)]
sv.c: Remove duplicate dups

These dupes of two tinterpreter variables were already done a few lines
above; also move a third, related, dupe to where the others are done.

10 years agoRemove useless assignments
Karl Williamson [Sun, 21 Jul 2013 16:49:05 +0000 (10:49 -0600)]
Remove useless assignments

These aren't used after setting.  They came from blindly copying code to
this.

10 years agoregcomp.c: Fix #define
Karl Williamson [Sat, 20 Jul 2013 19:21:14 +0000 (13:21 -0600)]
regcomp.c: Fix #define

cl_init_zero should not be defined as S_cl_init, just 'cl_init'.  The S_
prefix is wrong should cl_init be changed to have a pTHX_.

10 years agoregcomp.c: Remove wrong/obsolete line
Karl Williamson [Sat, 20 Jul 2013 19:16:55 +0000 (13:16 -0600)]
regcomp.c: Remove wrong/obsolete line

This line was made obsolete and wrong by commit
a0316a6cd4a14261beb22d95530d5763e8b6756b, which changed the format of
inversion lists.  This hasn't caused problems because the code currently
is #ifdef'd out.

10 years agoregcomp.c: Add some asserts()
Karl Williamson [Tue, 23 Jul 2013 15:25:36 +0000 (09:25 -0600)]
regcomp.c: Add some asserts()

Now that inversion lists are their own scalar types, we can verify that
the parameters to their manipulation functions are indeed inversion
lists.  This adds such assertions to the bottom level code that deals
with the bare metal of the scalars.  Functions that call these (even if
only in other asserts) didn't have asserts added to them, as they call
these anyway.

10 years agoMerge the install_lib.pl/installman/installperl refactoring into blead.
Nicholas Clark [Tue, 23 Jul 2013 12:36:03 +0000 (14:36 +0200)]
Merge the install_lib.pl/installman/installperl refactoring into blead.

10 years agoinstall_lib.pl's samepath() should not warn if $p1 does not exist.
Nicholas Clark [Sun, 14 Jul 2013 09:44:20 +0000 (11:44 +0200)]
install_lib.pl's samepath() should not warn if $p1 does not exist.

If $p1 is a non-existent path, then the two paths can't be the same, so
samepath() should promptly return false.

10 years agoIn install_lib.pl, no need to Config->import for the relocatableinc setup.
Nicholas Clark [Sun, 14 Jul 2013 09:12:17 +0000 (11:12 +0200)]
In install_lib.pl, no need to Config->import for the relocatableinc setup.

require Config; within the BEGIN block instead of using it outside it to
save creating one implicit BEGIN block, and running its import twice.

Remove the require 5.004; as the require of Config will fail if running
with anything other than the version about to be installed.

Note in installperl and installman that install_lib.pl imports Config.

10 years agoMove the wrapper for File::Path::mkpath() to install_lib.pl
Nicholas Clark [Sat, 13 Jul 2013 18:50:44 +0000 (20:50 +0200)]
Move the wrapper for File::Path::mkpath() to install_lib.pl

installperl and installman call File::Path::mkpath with identical arguments
and options, so move the repeated code into a single place.

10 years agoMove {safe_,}rename() from install{man,perl} into install_lib.pl
Nicholas Clark [Sat, 13 Jul 2013 16:33:53 +0000 (18:33 +0200)]
Move {safe_,}rename() from install{man,perl} into install_lib.pl

installman's rename() was identical to installperl's safe_rename() in all
but name (and whitespace), so de-duplicate by moving the code to
install_lib.pl

10 years ago[perl #74798] fix the build for -Duseithreads
Tony Cook [Tue, 23 Jul 2013 01:48:54 +0000 (11:48 +1000)]
[perl #74798] fix the build for -Duseithreads

10 years agoFix missing single quote in a sed in hints/aix.sh
Peter Martini [Sun, 21 Jul 2013 22:45:45 +0000 (18:45 -0400)]
Fix missing single quote in a sed in hints/aix.sh

10 years agoepigraphs.pod: Fix too long verbatim lines
Karl Williamson [Tue, 23 Jul 2013 00:01:30 +0000 (18:01 -0600)]
epigraphs.pod: Fix too long verbatim lines

The new 5.19.2 epigraph is prose, so it can just be block-quoted
instead of verbatim.

This commit also fixes the 5.13.11 epigraph, which already had some long
lines wrapped.

10 years agoperldelta for 1d5bb6ba43b89
Tony Cook [Tue, 23 Jul 2013 00:38:57 +0000 (10:38 +1000)]
perldelta for 1d5bb6ba43b89

10 years ago[perl #116190] -F implies -a, either implies -n
Tony Cook [Tue, 23 Jul 2013 00:24:45 +0000 (10:24 +1000)]
[perl #116190] -F implies -a, either implies -n

Previously -F without -a was a no-op, and -a without -n or -p was a
no-op, with this change, if you supply -F then both -a and -n are
implied (you can still use -p for its extra behaviour), and if you
supply -a then -n is implied.

10 years ago[perl #116190] feed an empty stdin to run_multiple_progs() programs
Tony Cook [Tue, 16 Jul 2013 04:57:20 +0000 (14:57 +1000)]
[perl #116190] feed an empty stdin to run_multiple_progs() programs

Two tests for -a were attempting to read stdin and blocking with the -a
implies -n change.

10 years ago[perl #116190] -F and -a now imply -n
Tony Cook [Tue, 16 Jul 2013 02:11:55 +0000 (12:11 +1000)]
[perl #116190] -F and -a now imply -n

10 years ago[perl #116190] use the true and trusted fresh_perl_is()
Tony Cook [Tue, 16 Jul 2013 02:00:41 +0000 (12:00 +1000)]
[perl #116190] use the true and trusted fresh_perl_is()

instead of re-inventing it yet again

10 years agoMake the -F switch imply -a
Aristotle Pagaltzis [Wed, 9 Jan 2013 10:26:56 +0000 (11:26 +0100)]
Make the -F switch imply -a

10 years agoperldelta for 059639d5cdd
Tony Cook [Mon, 22 Jul 2013 23:52:29 +0000 (09:52 +1000)]
perldelta for 059639d5cdd

10 years agobump version for Data-Dumper
Tony Cook [Mon, 22 Jul 2013 23:46:55 +0000 (09:46 +1000)]
bump version for Data-Dumper

I had a stray 5.19.2 tag (possibly from testing a few weeks back) that
allowed cmp_version.t to pass

10 years ago[perl #74798] improved useqq compatibility with the pure perl version
Tony Cook [Mon, 22 Jul 2013 23:18:41 +0000 (09:18 +1000)]
[perl #74798] improved useqq compatibility with the pure perl version

Currently for non-useqq, the pure perl and XS output for numbers like
these is different, but XS useqq is new, so try to remain vaguely
compatible.

10 years agoAvoid read-after-free in S_scan_heredoc() if the terminator line has no "\n".
Nicholas Clark [Thu, 27 Jun 2013 16:09:32 +0000 (18:09 +0200)]
Avoid read-after-free in S_scan_heredoc() if the terminator line has no "\n".

The code added by commit 112d128413206514 to fix RT #65838 (Allow here-doc
with no final newline) could in some rare cases cause a read of free()d
memory during parsing. The code itself is only run if the Perl program
ends with a heredoc (which is an unusual structure), and if the last line of
the file on disk has no terminating newline character (which is also unusual,
as many editors default to adding a final newline). The bug would be
triggered if the fixup code in S_scan_heredoc() triggered a reallocation of
the buffer in PL_linestr when adding a newline to it.

10 years agoModule-CoreList is 2.94 on CPAN now
Chris 'BinGOs' Williams [Mon, 22 Jul 2013 10:55:23 +0000 (11:55 +0100)]
Module-CoreList is 2.94 on CPAN now

10 years agoUpdate Module-Build to CPAN version 4.007
Chris 'BinGOs' Williams [Mon, 22 Jul 2013 08:41:01 +0000 (09:41 +0100)]
Update Module-Build to CPAN version 4.007

  [DELTA]

0.4007 - Fri Jul 19 13:44:39 CEST 2013

  [BUG FIXES]

  - Removed undeclared test dependency on parent.pm [Leon Timmermans]

  - Declared dependency on Pod::Man 2.17 for utf8 support [Leon Timmermans]

  - Force generation of man pages in manify_with_utf8.t [Leon Timmermans]

0.4006 - Thu Jul 18 14:19:49 CEST 2013

  [ENHANCEMENTS]

  - Significantly sped up some tests by not forcing HTML docs to be
    built when the user's config doesn't ask for them anyway.
    [Ken Williams]

  - The Module::Metadata package was split out from this distro back
    in 2010.  Removed its regression tests. [Ken Williams]

  - Removed dependence on IO::File, replacing it with safe invocations
    of open(). [Sven Dowideit]

  - Added an 'extra_manify_args' parameter to facilitate man pages
    containing Unicode. [Joenio Costa]

  - Added an '--html_links 0' argument for the 'html' action, which
    can hugely speed things up.  The main effect is speeding up the
    M::B tests themselves. [Ken Williams]

  [BUG FIXES]

  - Fix hash argument parsing in subclasses [Graham Ollis]

  - Revised detildification on VMS [Craig Berry]

  - Fix run_test_harness for case when $Switches is an empty string
    [Victor Efimov, Ken Williams]

10 years agoUpdate IPC-SysV to CPAN version 2.04
Chris 'BinGOs' Williams [Mon, 22 Jul 2013 08:28:39 +0000 (09:28 +0100)]
Update IPC-SysV to CPAN version 2.04

  [DELTA]

  2.04 - 2013-07-20

    * CPAN #72458: Add 'all' export
      (thanks to Milan Kocian for providing a patch)
    * CPAN #79821: Install to 'site' for perl 5.11+
      (thanks to Robert Sedlacek for providing a patch)
    * CPAN #86736: Fix spelling of IPC_CREAT
    * CPAN #78882: Document SIZE parameter of IPC::SharedMem->new()
    * CPAN #78927: Fix spelling of 'nattch'

10 years agoMerge the work which improves test diagnostics from run_multiple_progs().
Nicholas Clark [Mon, 22 Jul 2013 08:09:50 +0000 (10:09 +0200)]
Merge the work which improves test diagnostics from run_multiple_progs().

10 years agoReport useful file names and line numbers from run_multiple_progs().
Nicholas Clark [Mon, 15 Jul 2013 09:27:22 +0000 (11:27 +0200)]
Report useful file names and line numbers from run_multiple_progs().

Previously if tests in run_multiple_progs() failed the report gave the file
name and line number of the ok() call in run_multiple_progs(). Now, where
possible, report the file and line of the actual test program. If this
information isn't available, report the error at the file and line which
called run_multiple_progs().

This will improve error reporting from lib/charnames.t, lib/feature.t,
lib/strict.t, lib/subs.t, lib/warnings.t and t/lib/croak.t

10 years agoRemove a duplicate test separator "########\n" line from the pp_sys tests.
Nicholas Clark [Mon, 15 Jul 2013 09:13:48 +0000 (11:13 +0200)]
Remove a duplicate test separator "########\n" line from the pp_sys tests.

The existing parser using split includes the second "########\n" as part of
the extracted test program, which the Perl interpreter treats as a comment
line. The parser refactoring in the next commit no longer adds the line to
the extracted test program, causing the line numbers for the warnings to
differ by one.

The extra "########\n" was added as part of commit c521cf7c8af1697e in Dec
2010, along with the test program which follows it, and the (now) incorrect
line number expectations.

10 years agoMerge the file parsing code for run_multiple_progs() into _setup_one_file().
Nicholas Clark [Sun, 14 Jul 2013 18:44:50 +0000 (20:44 +0200)]
Merge the file parsing code for run_multiple_progs() into _setup_one_file().

setup_multiple_progs() calls _setup_one_file() to parse each file in turn,
and run_multiple_progs() calls it once if passed a file handle.

10 years agoMove file parsing code from t/lib/common.pl to t/test.pl
Nicholas Clark [Sun, 14 Jul 2013 16:58:58 +0000 (18:58 +0200)]
Move file parsing code from t/lib/common.pl to t/test.pl

Move the code that prepares input to run_multiple_progs() by parsing files
into a subroutine setup_multiple_progs(). This will enable the parsing code
in run_multiple_progs() to be merged, and the combined code to be altered to
give improved diagnostics on test failure.

10 years agoRefactor the setup code in t/lib/common.pl
Nicholas Clark [Sun, 14 Jul 2013 15:29:59 +0000 (17:29 +0200)]
Refactor the setup code in t/lib/common.pl

Eliminate the variable $line which has never been used.
(The code was added by commit bd4dea8e97f4a8f5 in June 2001.)
Use a non-capturing group in a regex.
Check the return value of close and die if there is an error.
Explicitly count the tests found.
Avoid indirect object syntax for a method call.

10 years agolib/warnings.t should actually run the test in t/lib/warnings/doop
Nicholas Clark [Mon, 15 Jul 2013 07:48:02 +0000 (09:48 +0200)]
lib/warnings.t should actually run the test in t/lib/warnings/doop

The file containing a single test for a warning in doop.c was added by
commit 0453d815b8a74697 in June 1999. However, as the file does not contain
an __END__ marker, the parser skips the entire contents of the file looking
for the __END__, and then assumes that the file contains no tests. This has
been true since the parser code was first implemented (in t/pragma/warning.t)
in commit 8ebc5c0145d2e355 in Jan 1997.

The simplest fix is to add an __END__ to the start of t/lib/warnings/doop
Also add some sanity checking to ensure that this doesn't happen again.

10 years agosimplify README.macosx instructions
Aristotle Pagaltzis [Mon, 22 Jul 2013 07:38:58 +0000 (09:38 +0200)]
simplify README.macosx instructions

This also removes a repeating version bumping bug.

10 years agofix my stupid perlhist typo
Aristotle Pagaltzis [Mon, 22 Jul 2013 07:28:12 +0000 (09:28 +0200)]
fix my stupid perlhist typo

10 years agostub CoreList for v5.19.3
Aristotle Pagaltzis [Mon, 22 Jul 2013 07:07:37 +0000 (09:07 +0200)]
stub CoreList for v5.19.3

10 years agobump version to v5.19.3
Aristotle Pagaltzis [Mon, 22 Jul 2013 07:05:44 +0000 (09:05 +0200)]
bump version to v5.19.3

10 years agocreate fresh perldelta
Aristotle Pagaltzis [Mon, 22 Jul 2013 06:39:56 +0000 (08:39 +0200)]
create fresh perldelta

10 years agoadd v5.19.2 epigraph
Aristotle Pagaltzis [Mon, 22 Jul 2013 06:33:12 +0000 (08:33 +0200)]
add v5.19.2 epigraph

10 years agoupdate perlhist for v5.19.2 release v5.19.2
Aristotle Pagaltzis [Mon, 22 Jul 2013 04:09:31 +0000 (06:09 +0200)]
update perlhist for v5.19.2 release

10 years agoupdate perldelta for v5.19.2 release
Aristotle Pagaltzis [Mon, 22 Jul 2013 04:09:04 +0000 (06:09 +0200)]
update perldelta for v5.19.2 release

10 years agoupdate Module::CoreList for v5.19.2 release
Aristotle Pagaltzis [Mon, 22 Jul 2013 02:45:01 +0000 (04:45 +0200)]
update Module::CoreList for v5.19.2 release

10 years agoUpdate Socket to CPAN version 2.010
Aristotle Pagaltzis [Sun, 21 Jul 2013 04:43:47 +0000 (06:43 +0200)]
Update Socket to CPAN version 2.010

[DELTA]

2013/06/24
2.010   CHANGES:
         * Wrap some IPTOS_* constants, which may come from <netinet/ip.h>
         * Probe for and optionally include <netinet/ip.h>
         * Defeat C compilers' attempts to optimise away configure-time probes
           for functions that are never called

10 years agoClarify av_shift API docs
Steffen Mueller [Sat, 20 Jul 2013 15:53:08 +0000 (17:53 +0200)]
Clarify av_shift API docs

10 years agoperldelta: #118931 is a known issue
Father Chrysostomos [Sat, 20 Jul 2013 00:58:06 +0000 (17:58 -0700)]
perldelta: #118931 is a known issue

10 years agoBenchmark.t: remove CPU-speed-sensitive test
David Mitchell [Fri, 19 Jul 2013 22:10:50 +0000 (23:10 +0100)]
Benchmark.t: remove CPU-speed-sensitive test

Benchmark.t has been randomly failing test 15 in smokes for ages.
This is the one that checks that a loop run 3*N times burns approximately
3 times more CPU than when run just N times.

For the last month the test has included a calibration loop and test,
which does much the same thing, but without using any code from
Benchmark.pm. This has failed just as much, which confirms that its an
issue with the smoke host (such as a variable speed CPU or whatever),
rather than any flaw in the Benchmark.pm library logic.

So just remove the calibration loop and the dodgy test.

10 years agomore op_folded support: B, dump
Reini Urban [Thu, 18 Jul 2013 19:50:35 +0000 (14:50 -0500)]
more op_folded support: B, dump

also add more B::OP accessors for the missing bitfields

10 years agoAdd Niels Thykier to AUTHORS
Father Chrysostomos [Fri, 19 Jul 2013 01:51:54 +0000 (18:51 -0700)]
Add Niels Thykier to AUTHORS

10 years agoop.c: Add op_folded to BASEOP
Niels Thykier [Wed, 17 Jul 2013 18:59:54 +0000 (20:59 +0200)]
op.c: Add op_folded to BASEOP

Add a new member, op_folded, to BASEOP.  It is replacement for
OPpCONST_FOLDED (which can only be set on OP_CONST).  At the moment
OPpCONST_FOLDED remains, as it is exposed in B (e.g. B::Concise relies
on it).

Signed-off-by: Niels Thykier <niels@thykier.net>
10 years agotoke.c:yylex: assert that PL_linestr is not a COW
Father Chrysostomos [Wed, 17 Jul 2013 06:29:25 +0000 (23:29 -0700)]
toke.c:yylex: assert that PL_linestr is not a COW

and fix the one bug this uncovers.

With COW enabled all the time, it is easy to introduce bugs like this.
See also 4e917a04.  In short, toke.c expects to be able to modify
PL_linestr’s buffer.  Putting this assertion in yylex (a hot path)
will make sure PL_linestr never becomes a COW again.

10 years agosv.c: Assert that sv_[ivp]v are not passed aggregates
Father Chrysostomos [Fri, 19 Jul 2013 15:51:47 +0000 (08:51 -0700)]
sv.c: Assert that sv_[ivp]v are not passed aggregates

The lack of assertions can hide bugs.  See 32a609747bffb for instance

10 years agolocale.c: Add missing STATIC to fcn decl
Karl Williamson [Fri, 19 Jul 2013 15:50:27 +0000 (09:50 -0600)]
locale.c: Add missing STATIC to fcn decl

10 years agoMove some tests from cpan/version to t/run
Karl Williamson [Wed, 17 Jul 2013 04:02:46 +0000 (22:02 -0600)]
Move some tests from cpan/version to t/run

Commit fb7942811c8097ed2e61fd35a90345226546176a recently moved
version.pm to cpan.  Earlier, in commit
b127e37e51c21b0a36755dcd19811be931a03d83, I had added tests to version's
.t that arguably belonged elsewhere.  I did this because I thought that
this .t was the only one around that had the infrastructure already
written to allow such tests to easily be added, and it was in /lib so
p5p controlled it.  (That infrastructure being finding locales with the
decimal point not a dot.)  Since then, I found that t/run/locale.t has
similar infrastructure.  Given that version now may end up being cpan
upstream, I thought it best to move those tests to t/run/locale.t

I notice that changes to this .t prior to these no longer were careful
to avoid 'use locale' in case the platform doesn't support it, and there
have been no field problems; so I just went ahead and did a 'use locale'
too.

10 years agocpan/version/t/07locale.t: Actually test what is claimed
Karl Williamson [Wed, 17 Jul 2013 04:05:57 +0000 (22:05 -0600)]
cpan/version/t/07locale.t: Actually test what is claimed

Commit b127e37e51c21b0a36755dcd19811be931a03d83 wrongly changed two
tests, and failed to change a third.  One of the two ended up doing:
        ok ("$ver eq '1,23'", ...);
That's always going to succeed as ok() doesn't do an eval; it just looks
at the result of the expression, which in this case was a non-empty
string.

The second test was changed from an 'eq' to '=='.  It had this diff:

 -       is ($v, "1.23", "Locale doesn't apply to version objects");
 +       ok ($v == "1.23", "Locale doesn't apply to version objects");

(The code for is() does an 'eq'.)  The is() call is made from within the
scope of a "use locale" in which the decimal point character is a comma,
but version objects are supposed to always use a dot, regardless of the
locale.  The == will numify the operands, potentially throwing away the
locale's decimal point character.  Therefore the test should use an
'eq'.

Before these changes, the two tests also didn't do what they purported
(and hence the motivation for the changes).  The tests previously used
'is()', which is defined in a different file which is outside the locale
scope, so that the scalars ($v and $ver) there should have a dot even
if they have a comma within locale scope, and hence doing an is() would
not catch the bug being tested against.  Hence the third test
(overlooked in the earlier commit) remained wrong until now.

10 years agosv.h: Comments added/typo fixed.
Karl Williamson [Wed, 17 Jul 2013 04:01:08 +0000 (22:01 -0600)]
sv.h: Comments added/typo fixed.

10 years agoperldelta: minor grammar fixes
Ricardo Signes [Fri, 19 Jul 2013 14:58:23 +0000 (10:58 -0400)]
perldelta: minor grammar fixes

10 years agoremove some instruction bloat in S_find_uninit_var
Daniel Dragan [Sat, 22 Dec 2012 14:34:40 +0000 (09:34 -0500)]
remove some instruction bloat in S_find_uninit_var

VC 2003 -O1 put down SvIV(cSVOPx_sv(kid)) twice in asm. Not sure why.

Explicitly store the values to make it more obvious to the compiler to
evaluate the SvIV only once, then do the branch, not do the negate branch,
then in a negate branch do a SvIV. Result is less machine code read by the
CPU. The .text section dropped 0xC01FF to 0xC018F after this change.

10 years agohandle multiple children exiting in perlipc example
Tony Cook [Fri, 12 Jul 2013 07:12:46 +0000 (17:12 +1000)]
handle multiple children exiting in perlipc example

10 years agopod2html output concerns
Tony Cook [Thu, 11 Jul 2013 07:03:44 +0000 (17:03 +1000)]
pod2html output concerns

10 years agoRemove 5.005 thread support from configure.com.
Craig A. Berry [Thu, 18 Jul 2013 20:19:51 +0000 (15:19 -0500)]
Remove 5.005 thread support from configure.com.

Follow-up to 5ff367e3adebb49.

10 years agoUpdate Parse-CPAN-Meta to CPAN version 1.4405
Chris 'BinGOs' Williams [Thu, 18 Jul 2013 11:30:07 +0000 (12:30 +0100)]
Update Parse-CPAN-Meta to CPAN version 1.4405

  [DELTA]

  1.4405    2013-07-17 21:43:34 America/New_York
      - Fixed incorrect "return ... or die ..." constructs
      - Converted distribution to Dist::Zilla management
      - Noted new repository location in the Github Perl-Toolchain-Gang
        organization

10 years agobisect.pl now accepts repeated -e options, just like perl.
Nicholas Clark [Wed, 17 Jul 2013 10:23:42 +0000 (12:23 +0200)]
bisect.pl now accepts repeated -e options, just like perl.

10 years agoperldelta for =>
Father Chrysostomos [Wed, 17 Jul 2013 06:06:53 +0000 (23:06 -0700)]
perldelta for =>

10 years agoAllow => to quote built-in keywords across lines
Father Chrysostomos [Sat, 13 Jul 2013 06:37:26 +0000 (23:37 -0700)]
Allow => to quote built-in keywords across lines

This is the second try.  5969c5766a5d3 had a bug in it under non-
MAD builds.

If I have a sub I can use its name as a bareword as long as I suffix
it with =>, even if the => is on the next line:

$ ./perl -Ilib -e 'sub tim; warn tim' -e '=>'
tim at -e line 1.

If I want to use a built-in keyword’s name as a bareword, I can put =>
after it:

$ ./perl -Ilib -e 'warn time =>'
time at -e line 1.

But if I combine the two (keyword + newline), it does not work:

$ ./perl -Ilib -e 'warn time' -e ' =>'
1373611283 at -e line 1.

unless I override the keyword:

$ ./perl -Ilib -Msubs=time -e 'warn time' -e ' =>'
time at -e line 1.

=> after a bareword is checked for in two places in toke.c.  The first
comes before a comment saying ‘NO SKIPSPACE BEFORE HERE!’; it only
skips spaces and finds a => on the same line.  The second comes later;
it skips vertical space and comments, too.

But the second check is in a code path that is not reached by keywords
that are not overridden (as is the ‘NO SKIPSPACE’ comment).

This commit adds an extra check for built-in keywords after we have
determined that the keyword is not overridden.  In that case, there is
no reason we cannot use skipspace, as we no longer have to worry about
what PL_oldbufptr etc. point to.

This commit leaves __DATA__ and __END__ alone, since they
are special, problematic and controversial.  (See, e.g.,
<https://rt.perl.org/rt3/Ticket/Display.html?id=78348#txn-1234355>.)

Allowing whitespace to be scanned across line boundaries without
increasing the line number (something this commit has to do to make
this work) can cause the way PL_linestr is handled to change.

PL_linestr usually holds just the current line when reading from a
handle.  Now it can hold the current line plus the next line or seve-
ral lines, depending on how much whitespace is to be found there.

When '\n' or '#' was encountered, the lexer would modify the buffer in
place and add a null, setting PL_bufend to point to that null.  That
would make it look as though the end of the line had been reached, and
avoided having to scan to find the end of a comment.

In string eval and quote-like operators, the end of the comment does
have to be scanned for.  We can’t just fake EOL and read the next
line of input.

Under MAD builds, the end of the comment was being scanned for any-
way, even when reading from a handle.  So everything worked under MAD,
which was what I tested 5969c5766a5d3 under.

This commit changes the '\n' and '#' handling to match the MAD code
(scan for the end of the comment instead of faking a buffer trunca-
tion), which 5969c5766a5d3 failed to do.

10 years agoignore the build product lib/version.pod
Tony Cook [Wed, 17 Jul 2013 01:14:30 +0000 (11:14 +1000)]
ignore the build product lib/version.pod

fb7942811 moved version from lib/ to cpan/ and added most of the needed
lib/.gitignore entries, missing only this one.

10 years ago[perl #74798] useqq implementation for xs
Tony Cook [Wed, 17 Jul 2013 01:09:21 +0000 (11:09 +1000)]
[perl #74798] useqq implementation for xs

10 years agohandle xs Useqq dumping of strings with an escape followed by a digit
Tony Cook [Wed, 10 Jul 2013 04:54:20 +0000 (14:54 +1000)]
handle xs Useqq dumping of strings with an escape followed by a digit

The original patch didn't handle a string like "\x001" correctly, encoding
it as "\01" rather than "\0001".

Added tests for this case and some possible corner cases

10 years agoadjust indentation to match other DD code
Tony Cook [Wed, 10 Jul 2013 04:19:17 +0000 (14:19 +1000)]
adjust indentation to match other DD code