platform/upstream/perl.git
11 years agoregcomp.c: Remove now useless initialization
Karl Williamson [Fri, 12 Jul 2013 01:38:53 +0000 (19:38 -0600)]
regcomp.c: Remove now useless initialization

This code was designed to cause a segfault by initializing an offset
into an address to a very large value.  But now, it is stored as a bool,
so there is not point in doing this.  We also remove an assert that it
is a bool, because it always has to be.

11 years agoregcomp.c: Only White-space, comments, name of variable change
Karl Williamson [Fri, 12 Jul 2013 01:16:55 +0000 (19:16 -0600)]
regcomp.c: Only White-space, comments, name of variable change

11 years agoReinstate "Use new Svt_INVLIST for inversion lists."
Karl Williamson [Sat, 6 Jul 2013 21:33:57 +0000 (15:33 -0600)]
Reinstate "Use new Svt_INVLIST for inversion lists."

This reverts commit 2e0b8fbeab3502bee36f25825c3cdd0d075c4fd3, which
reverted e0ce103ae532f9576f54a5938a24d1ee98dfb928, thus reinstating the
latter commit.  It turns out that the error being chased down was not
due to this commit.

Its original message was:

This converts inversion lists to use their own scalar type.

11 years agoReinstate "Create SVt_INVLIST"
Karl Williamson [Sat, 6 Jul 2013 21:29:11 +0000 (15:29 -0600)]
Reinstate "Create SVt_INVLIST"

This reverts commit 49cf1d6641a6dfd301302f616e4f25595dcc65d4, which
reverted e045dbedc7da04e20cc8cfccec8a2e3ccc62cc8b, thus reinstating the
latter commit.  It turns out that the error being chased down was not
due to this commit.

Its original message was:

This reshuffles the svtype enum to remove the dummy slot created in a
previous commit, and add the new SVt_INVLIST type in its proper order.
It still is unused, but since it is an extension of SVt_PV, it must be
greater than that type's enum value.  Since it can't be upgraded to any
other PV type, it comes right after SVt_PV.

 Affected tables in the core are updated.

11 years agoReinstate "regcomp.c: Move some #defines to only file that uses them"
Karl Williamson [Sat, 6 Jul 2013 21:10:14 +0000 (15:10 -0600)]
Reinstate "regcomp.c: Move some #defines to only file that uses them"

This reverts commit 247f9b19318882fd9a52fe49aa31fc8d3d3db4f7, which
reverted 05944450e0fc82eb8fc1fb5a4bf63f23785262a0, thus reinstating the
latter commit.  It turns out that the error being chased down was not
due to this commit.

Its original message was:

These were used in a header file to provide synchronization between
files.  However, the only other file that would need them is a .pl file
which doesn't have access to them.  So simplify things so that the
variables are either removed entirely if only used in a single place, or
are #defined in the area where they are used

11 years agoReinstate "regcomp.c: Make C-array inversion lists const"
Karl Williamson [Sat, 6 Jul 2013 20:56:39 +0000 (14:56 -0600)]
Reinstate "regcomp.c: Make C-array inversion lists const"

This reverts commit 18505f093a44607b687ae5fe644872f835f66313, which
reverted 241136e0ed70738cccd6c4b20ce12b26231f30e5, thus reinstating the
latter commit.  It turns out that the error being chased down was not
due to this commit.

Its original message was:

The inversion lists that are compiled into a C header are now const.

11 years agoReinstate "regcomp.c: Move inversion list hdr field to SV hdr"
Karl Williamson [Sat, 6 Jul 2013 20:44:32 +0000 (14:44 -0600)]
Reinstate "regcomp.c: Move inversion list hdr field to SV hdr"

This reverts commit 2eb2feb9f4a226d0fe0fd3d66e2ce341296f0072, which
reverted d913fb457b732da4c31d0d1b8c085989a7ecd12d, thus reinstating the
latter commit.  It turns out that the error being chased down was not
due to this commit.

Its original message was:

This moves the final field that can vary from the inversion list data
structure into the header of the SV that contains it.  With this commit,
the body of an inversion list is now const.

The field is converted to a U8, to correspond with the header field in
the SV type that we currently use to hold inversion lists.

11 years agoReinstate "regcomp.c: Change, variable, fcn name"
Karl Williamson [Sat, 6 Jul 2013 20:29:35 +0000 (14:29 -0600)]
Reinstate "regcomp.c: Change, variable, fcn name"

This reverts commit 0b58015e05b2ab93b080b7c49a70bf82435363c0, which
reverted 875c4e2c5193b5245da578b222e9c93aad31d93b, thus reinstating the
latter commit.  It turns out that the error being chased down was not
due to this commit.

Its original message was (slightly revised for clarity):

These have always been slightly misnamed, but a recent commit made them
more so.  The old name contained "zero", but now there is a new element
which always has zero.  The renamed element indicates whether the
inversion list is offset, that is if the beginning is the zero element,
or if the beginning is the next element beyond the zero element.

11 years agoReinstate "regcomp.c: Move 2 hdr inversion fields to SV hdr"
Karl Williamson [Sat, 6 Jul 2013 20:13:35 +0000 (14:13 -0600)]
Reinstate "regcomp.c: Move 2 hdr inversion fields to SV hdr"

This reverts commit 67434bafe4f2406e7c92e69013aecd446c896a9a, which
reverted 4fdeca7844470c929f35857f49078db1fd124dbc, thus reinstating the
latter commit.  It turns out that the error being chased down was not
due to this commit.

Its original message was:

This commit continues the process of separating the header area of
inversion lists from the body.  2 more fields are moved out of the
header portion of the inversion list, and into the header portion of the
SV that contains it.

11 years agoReinstate "regcomp.c: Remove unused data structure field"
Karl Williamson [Sat, 6 Jul 2013 19:58:55 +0000 (13:58 -0600)]
Reinstate "regcomp.c: Remove unused data structure field"

This reverts commit c7995b20ccfbb4248b23aeae9fd1eab838852fcc, which
reverted 4b98096221966ea01c046f4f61b2dc4f60b534b9, thus reinstating
the latter commit.  It turns out that the error being chased down was
not due to this commit.

Its original message was:

This removes a field that is set in the inversion list data structure
and examined just once.  And that sole examiner is the function that
calls the function that does the set.  In other words X calls Y passing
it data D.  Y puts D into a structure.  Upon return from Y, X looks for
D in the structure.  No one else looks at D.  X might just as well have
looked at D directly, without involving Y, and without the structure
needing a space for D.

11 years agoReinstate "regcomp.c: Make inversion lists SVt_PVLV"
Karl Williamson [Sat, 6 Jul 2013 18:39:22 +0000 (12:39 -0600)]
Reinstate "regcomp.c: Make inversion lists SVt_PVLV"

This reverts commit ac7a6f5849b5fd57b2e837f4ddbc18c992610e9c which
reverted 2c3365de8c1168f115576a4976d067e3b911c490, thus reinstating the
latter commit.  It turns out that the error being chased down was not
due to this commit.

This commit additionally changes some now-obsolete wording in a pod.
This change was not in 2c3365de8c1168f115576a4976d067e3b911c490.

The original message for commit 2c3365de8c1168f115576a4976d067e3b911c490
was:

This is the 2nd step in separating the inversion list body from header.
This commit gives inversion lists the header from a SVt_PVLV, and
repurposes one of its fields into being the length of the inversion
list.

This is a temporary measure, in case binary compatibility is an issue.
Future commits will create a new SV type just for inversion lists.  This
SV type was chosen because it has a sufficient number of fields to
accommodate all the header fields from inversion lists.

11 years agoReinstate + fix "Revert "regcomp.c: Add a constant 0 element before inversion lists" "
Karl Williamson [Sat, 6 Jul 2013 18:26:43 +0000 (12:26 -0600)]
Reinstate + fix "Revert "regcomp.c: Add a constant 0 element before inversion lists" "

This reverts commit de353015643cf10b437d714d3483c1209e079916 which
reverted 533c4e2f08b42d977e5004e823d4849f7473d2d0, thus reinstating it,
plus this commit adds a fix to get it to pass under Address Sanitizer.

The root cause of the problem is that there are two measures of the
length of an inversion list.  One is SvCUR(), and the other is
invlist_len().  The original commit caused these to get off-by-one in
some cases.  The ultimate solution is to only store one value, and
return the other one based off that.  Rather than redo the whole branch,
I've taken an easier way out, which is to add a dummy element at the end
of some inversion lists, so that they aren't off-by-one.  Then the other
patches from the original branch will be applied.  Each will be
tested with Address Sanitizer.  Then the work to fix the underlying
problem will be done.

The original commit's message was:

This commit is the first step to separating the header from the body of
inversion lists.  Doing so will allow the compiled-in inversion lists to
be fully read-only.

To invert an inversion list, one simply unshifts a 0 to the front of it
if one is not there, and shifts off the 0 if it does have one.

The current data structure reserves an element at the beginning of each
inversion list that is either 0 or 1.  If 0, it means the inversion list
begins there; if 1, it means the inversion list starts at the next
element.  Inverting involves flipping this bit.

This commit changes the structure so that there is an additional element
just after the element that flips.  This new element is always 0, and
the flipping element now says whether the inversion list begins at the
constant 0 element, or the one after that.

Doing this allows the flipping element to be separated in later commits
from the body of the inversion list, which will always begin with the
constant 0 element.  That means that the body of the inversion list can
be const.

11 years agoembed.fnc: Clarify comments on E,X flag usage; nit
Karl Williamson [Tue, 16 Jul 2013 18:41:45 +0000 (12:41 -0600)]
embed.fnc: Clarify comments on E,X flag usage; nit

11 years agoMove version from lib/ to cpan/
Nicholas Clark [Tue, 16 Jul 2013 09:23:50 +0000 (11:23 +0200)]
Move version from lib/ to cpan/

Whilst there are still several differences between what's in core and what's
in the CPAN tarball, moving the files in core to their own directory with
the same layout as the CPAN distribution simplifies things.

Somewhat surprisingly, none of the toolchain modules C<use version;> so
there's no need to add to lib/buildcustomize.pl

11 years agoperldelta for #27010
Father Chrysostomos [Tue, 16 Jul 2013 06:52:44 +0000 (23:52 -0700)]
perldelta for #27010

11 years ago[perl #27010] Make tie work through defelems
Father Chrysostomos [Tue, 16 Jul 2013 06:51:15 +0000 (23:51 -0700)]
[perl #27010] Make tie work through defelems

When elements of @_ refer to nonexistent hash or array elements, then
the magic scalar in $_[0] delegates all set/get actions to the element
in represents, vivifying it if needed.

tie/tied/untie, however, were not delegating to the element, but were
tying the the magical ‘deferred element’ scalar itself.

11 years agoembed.fnc: E does not imply X
Father Chrysostomos [Tue, 16 Jul 2013 05:49:31 +0000 (22:49 -0700)]
embed.fnc: E does not imply X

I thought it did.

11 years agoConvert lib/FileHandle.t to use of Test::More; provide descriptions.
James E Keenan [Wed, 10 Jul 2013 02:13:10 +0000 (04:13 +0200)]
Convert lib/FileHandle.t to use of Test::More; provide descriptions.

Previously, file used hand-coded 'print "ok"' statements and no tests had
descriptions (a.k.a. labels or names).  Convert to use of Test::More functions
and provide descriptions for all individual tests.

Previously, file used global variables extensively and did not 'use strict'
(except 'use strict subs').  The globals have been converted to lexicals
where appropriate and the file now runs fully under strictures.  Other
than that, no attempt was made to improve the design of the file or the
quality of the tests.  (That can be done in a later RT, if desired.)

Thanks to Peter Martini for guidance, Dagfinn Ilmari Mannsåker for guidance
and code review on list and Tony Cook for additional review.

For: RT #118883

11 years agoperldelta for #77814
Father Chrysostomos [Tue, 16 Jul 2013 02:00:21 +0000 (19:00 -0700)]
perldelta for #77814

11 years ago[perl #77814] Make defelems propagate pos
Father Chrysostomos [Tue, 16 Jul 2013 01:57:01 +0000 (18:57 -0700)]
[perl #77814] Make defelems propagate pos

When elements of @_ refer to nonexistent hash or array elements, then
the magic scalar in $_[0] delegates all set/get actions to the element
in represents, vivifying it if needed.

pos($_[0]), however, was not delegating the value to the element, but
storing it on the magical ‘deferred element’ scalar.

11 years agoperldelta for vstrings and set-magic
Father Chrysostomos [Mon, 15 Jul 2013 07:21:55 +0000 (00:21 -0700)]
perldelta for vstrings and set-magic

11 years agoMake set-magic handle vstrings properly
Father Chrysostomos [Mon, 15 Jul 2013 07:05:57 +0000 (00:05 -0700)]
Make set-magic handle vstrings properly

Assigning a vstring to a tied variable would result in a plain string
in $_[1] in STORE.

Assigning a vstring to a magic deferred element would result in a
plain string in the aggregate’s actual element.

When magic is invoked, the magic flags are temporarily turned off on
the sv so that recursive calls to magic don’t happen.  This makes it
easier to implement functions like Perl_magic_set to read the value of
the sv without triggering get-magic.

Since vstrings are only considered vstrings when they are SvRMAGICAL,
this meant that set-magic would turn vstrings temporarily into plain
strings.  Subsequent copying (e.g., in STORE) would then fail to copy
the vstring magic.

This commit changes mg_set to leave the rmagical flag on, since it
does not affect the functionaiity of set-magic.

11 years agot/op/array.t: remove ‘no warnings "deprecated"’
Father Chrysostomos [Sun, 14 Jul 2013 00:57:46 +0000 (17:57 -0700)]
t/op/array.t: remove ‘no warnings "deprecated"’

The tests using the deprecated feature were removed in e1dccc0d34.

11 years ago[perl #117223] Remove IO::File example from perlfunc
Ed Avis [Tue, 16 Jul 2013 01:17:34 +0000 (11:17 +1000)]
[perl #117223] Remove IO::File example from perlfunc

updated to apply to blead, minor spelling and word wrap fixes by Tony
Cook.

11 years agoParseXS: generate deterministically ordered output
Karl Williamson [Mon, 15 Jul 2013 15:55:40 +0000 (09:55 -0600)]
ParseXS: generate deterministically ordered output

The generated XS file output was varying between builds because of hash
randomisation.  This sorts the output to make it the same for the same
inputs.  This facilitates eyeballing diffs of two workspaces.

11 years agoExtUtils::Embed::canon needs to *globally* substitute / for $as
Nicholas Clark [Mon, 15 Jul 2013 14:58:08 +0000 (16:58 +0200)]
ExtUtils::Embed::canon needs to *globally* substitute / for $as

Otherwise the results are buggy for package names with two or more separators.
This bug broke a -Uusedl build, once ExtUtils::Embed was refactored to use
the existing but always-buggy functionality.

11 years agoThreading 5.005 style is no longer supported
H.Merijn Brand [Mon, 15 Jul 2013 13:53:49 +0000 (15:53 +0200)]
Threading 5.005 style is no longer supported

Modernize the explain message

11 years agoperlexperiment: Sun Studio on Linux: not experimental
Ricardo Signes [Mon, 15 Jul 2013 02:45:16 +0000 (22:45 -0400)]
perlexperiment: Sun Studio on Linux: not experimental

see <20130708133005.GA8284@cancer.codesimply.com>

11 years agoperlexperiment: the M flag is not a useful thing to point out
Ricardo Signes [Mon, 15 Jul 2013 02:44:33 +0000 (22:44 -0400)]
perlexperiment: the M flag is not a useful thing to point out

see <20130708142509.GA8504@cancer.codesimply.com>

11 years agoFix file_name_is_absolute on VMS for device without a directory.
Craig A. Berry [Sun, 14 Jul 2013 19:34:47 +0000 (14:34 -0500)]
Fix file_name_is_absolute on VMS for device without a directory.

To be considered absolute, we had been requiring a file spec to
have a bracketed directory spec after the colon. This meant that
very common and idiomatic expressions such as sys$login:login.com
or sys$manager:operator.log were not considered absolute.  Which
is wrong.

So we now consider a file spec starting with a valid device name
(which would also be a valid logical name) followed by an unescaped
colon to be absolute.

11 years agoSync the Storable version in Maintainers.pl with CPAN version
Chris 'BinGOs' Williams [Sun, 14 Jul 2013 19:23:15 +0000 (20:23 +0100)]
Sync the Storable version in Maintainers.pl with CPAN version

11 years agomention that caller() does not show XSUBs
Daniel Dragan [Sat, 13 Jul 2013 22:20:09 +0000 (18:20 -0400)]
mention that caller() does not show XSUBs

Part of Perl #113438. Someone may write a pure perl sub, or callback from
an XSUB to PP to use caller, to check the package of the sub that called
the current sub and have different behaviour based on the caller sub's
package. Also using a perl debugger will not show XSUB frames in the
call stack. Therefore document this limitation of caller.

11 years agoperldelta: appease podcheck; tweak formatting
Father Chrysostomos [Sat, 13 Jul 2013 23:42:09 +0000 (16:42 -0700)]
perldelta: appease podcheck; tweak formatting

11 years agoperldelta for #118839/bf2614180a65
Father Chrysostomos [Sat, 13 Jul 2013 23:39:28 +0000 (16:39 -0700)]
perldelta for #118839/bf2614180a65

11 years agoperldelta for #118567/50278ed0f
Father Chrysostomos [Sat, 13 Jul 2013 23:38:01 +0000 (16:38 -0700)]
perldelta for #118567/50278ed0f

11 years agoperldelta for #89648/b23eb1831
Father Chrysostomos [Sat, 13 Jul 2013 23:36:37 +0000 (16:36 -0700)]
perldelta for #89648/b23eb1831

11 years agoperldelta for #118627/4e917a04b78
Father Chrysostomos [Sat, 13 Jul 2013 23:33:06 +0000 (16:33 -0700)]
perldelta for #118627/4e917a04b78

11 years agoperldelta for f791a21a2018
Father Chrysostomos [Sat, 13 Jul 2013 23:30:37 +0000 (16:30 -0700)]
perldelta for f791a21a2018

11 years agoperldiag: rewrap an entry for better splain output
Father Chrysostomos [Sat, 13 Jul 2013 23:28:36 +0000 (16:28 -0700)]
perldiag: rewrap an entry for better splain output

11 years agoperldelta for b54d603d2 (consistent proto warnings)
Father Chrysostomos [Sat, 13 Jul 2013 23:23:13 +0000 (16:23 -0700)]
perldelta for b54d603d2 (consistent proto warnings)

11 years agoperldelta for a77c16f7c (*foo->bar)
Father Chrysostomos [Sat, 13 Jul 2013 23:20:43 +0000 (16:20 -0700)]
perldelta for a77c16f7c (*foo->bar)

11 years agoperldelta for #113932 (UNIVERSAL::can)
Father Chrysostomos [Sat, 13 Jul 2013 23:16:13 +0000 (16:16 -0700)]
perldelta for #113932 (UNIVERSAL::can)

11 years agoperldelta for #117917/f5df269c5c
Father Chrysostomos [Sat, 13 Jul 2013 23:13:02 +0000 (16:13 -0700)]
perldelta for #117917/f5df269c5c

11 years agoperldelta for fdf416b69a0 (utf8 cloned protos)
Father Chrysostomos [Sat, 13 Jul 2013 21:43:24 +0000 (14:43 -0700)]
perldelta for fdf416b69a0 (utf8 cloned protos)

11 years agoperldelta for 9700e2d38 (ambiguity warnings)
Father Chrysostomos [Sat, 13 Jul 2013 21:41:12 +0000 (14:41 -0700)]
perldelta for 9700e2d38 (ambiguity warnings)

11 years agoperldelta for e9d9e6f34 (list cx for sort args)
Father Chrysostomos [Sat, 13 Jul 2013 21:39:17 +0000 (14:39 -0700)]
perldelta for e9d9e6f34 (list cx for sort args)

11 years agoperldelta for f65493df1c (lv sort args)
Father Chrysostomos [Sat, 13 Jul 2013 21:37:38 +0000 (14:37 -0700)]
perldelta for f65493df1c (lv sort args)

11 years agoperldelta for 20d5dc239 (fatal in-place sort)
Father Chrysostomos [Sat, 13 Jul 2013 21:35:49 +0000 (14:35 -0700)]
perldelta for 20d5dc239 (fatal in-place sort)

11 years agoperldelta for bdbfc51a7b (undef constant my sub)
Father Chrysostomos [Sat, 13 Jul 2013 21:31:31 +0000 (14:31 -0700)]
perldelta for bdbfc51a7b (undef constant my sub)

11 years agoperldelta for 5e5128ba (@INC and scalarref docs)
Father Chrysostomos [Sat, 13 Jul 2013 21:30:11 +0000 (14:30 -0700)]
perldelta for 5e5128ba (@INC and scalarref docs)

11 years agoperldelta for ee3818ca2c5e (Can’t coerce readonly REF)
Father Chrysostomos [Sat, 13 Jul 2013 21:28:29 +0000 (14:28 -0700)]
perldelta for ee3818ca2c5e (Can’t coerce readonly REF)

11 years agoperldelta for c72a4eedf (sv_force_normal at compile time)
Father Chrysostomos [Sat, 13 Jul 2013 21:28:01 +0000 (14:28 -0700)]
perldelta for c72a4eedf (sv_force_normal at compile time)

11 years agoperldelta for 9657ccb4f (@INC sub returning scalar ref)
Father Chrysostomos [Sat, 13 Jul 2013 21:17:16 +0000 (14:17 -0700)]
perldelta for 9657ccb4f (@INC sub returning scalar ref)

11 years agoperldelta: typos; consistency tweaks
Father Chrysostomos [Sat, 13 Jul 2013 19:14:19 +0000 (12:14 -0700)]
perldelta: typos; consistency tweaks

11 years agoperldelta for 310f4fdb24 (more index constant mangling)
Father Chrysostomos [Sat, 13 Jul 2013 19:13:21 +0000 (12:13 -0700)]
perldelta for 310f4fdb24 (more index constant mangling)

11 years agoperldelta for 948d23704 (index constant mangling)
Father Chrysostomos [Sat, 13 Jul 2013 19:09:45 +0000 (12:09 -0700)]
perldelta for 948d23704 (index constant mangling)

11 years agoperldelta for 60041a0991 (split constant mangling)
Father Chrysostomos [Sat, 13 Jul 2013 19:08:47 +0000 (12:08 -0700)]
perldelta for 60041a0991 (split constant mangling)

11 years agoperldelta for proto parsing changes
Father Chrysostomos [Sat, 13 Jul 2013 19:06:24 +0000 (12:06 -0700)]
perldelta for proto parsing changes

11 years agoperldelta for 8922e438 (BmRARE/PREVIOUS removal)
Father Chrysostomos [Sat, 13 Jul 2013 19:06:15 +0000 (12:06 -0700)]
perldelta for 8922e438 (BmRARE/PREVIOUS removal)

11 years agoperldelta for #118305/88dbe4a
Father Chrysostomos [Sat, 13 Jul 2013 18:57:02 +0000 (11:57 -0700)]
perldelta for #118305/88dbe4a

11 years agoWrap a long verbatim line in perlvar.pod
Father Chrysostomos [Sat, 13 Jul 2013 21:19:48 +0000 (14:19 -0700)]
Wrap a long verbatim line in perlvar.pod

11 years ago[perl #118839] Make ‘n’ debugger cmd respect lv subs
Father Chrysostomos [Sat, 13 Jul 2013 18:41:44 +0000 (11:41 -0700)]
[perl #118839] Make ‘n’ debugger cmd respect lv subs

The ‘n’ debugger command, which is supposed to step over subs, was not
stepping over lvalue subs.

This is a regression from 5.8, but 5.8 was worse.

This bug did not occur in 5.8 because there was no mechanism back then
for handling lvalue subs specially (via DB::lsub), so assignment to an
lvalue sub was completely broken under the debugger.

Perl 5.10 introduced DB::lsub.  The implementation in perl5db.pl
contains these lines at the end of the sub:

    # Pop the single-step value back off the stack.
    $single |= $stack[ $stack_depth-- ];

    # call the original lvalue sub.
    &$sub;

The regular DB::sub does this:

        {
            no strict 'refs';
            @ret = &$sub;
        }

        # Pop the single-step value back off the stack.
        $single |= $stack[ $stack_depth-- ];

Notice how $single (i.e., $DB::single) is modified before and after
the sub call, respectively.  The order is different.

There are two types of lvalue list context for lvalue subs.  (foo)=3
will allow sub foo:lvalue{@a} to return the array itself.  \(foo) and
bar(foo) will flatten the array.

So there is no way in pure Perl to capture the return value and have
it returned to the caller unchanged.  That is why DB::lsub has to call
the sub last of all (and have the context propagated).

The solution here is to use localisation to accomplish the assigment
to $single after the lvalue sub exits.

11 years agoperl5db.pl: Remove obsolete comment
Father Chrysostomos [Sat, 13 Jul 2013 08:12:20 +0000 (01:12 -0700)]
perl5db.pl: Remove obsolete comment

The regexp engine is now fully reëntrant.

11 years agotodo.pod: Don’t mention ‘make test.taintwarn’
Father Chrysostomos [Sat, 13 Jul 2013 08:06:46 +0000 (01:06 -0700)]
todo.pod: Don’t mention ‘make test.taintwarn’

11 years agotodo.pod: Class set regexp operations are done
Father Chrysostomos [Sat, 13 Jul 2013 08:02:24 +0000 (01:02 -0700)]
todo.pod: Class set regexp operations are done

but they are still experimental.

11 years agoEdit ChangeLog, Bump VERSION before rebase/release
Abhijit Menon-Sen [Sat, 13 Jul 2013 15:59:49 +0000 (21:29 +0530)]
Edit ChangeLog, Bump VERSION before rebase/release

11 years agoTweak the new Storable destroy test, and the ChangeLog
Nicholas Clark [Tue, 28 May 2013 21:10:30 +0000 (23:10 +0200)]
Tweak the new Storable destroy test, and the ChangeLog

Use Test::More instead of Test, as all the other tests now use Test::More.
Use 2-argument open to be compatible with 5.005. (Where it passes)
Close the test file before unlinking it.
Check the error returns of open and close.
Update the comment now that we have a better understanding of the bug's cause.

As the previous commit as applied had no 5.6 compatibility changes, remove
that note from the ChangeLog.

11 years ago[perl #118139] Storable 2.42 - die in global destruction
Reini Urban [Tue, 28 May 2013 20:46:12 +0000 (22:46 +0200)]
[perl #118139] Storable 2.42 - die in global destruction

Protect against SEGV during global destruction, e.g. when used
in DESTROY blocks.

[Part of a patch submitted by Reini. MANIFEST change added by the committer]

11 years agoUse magic rather than DESTROY to free memory in Storable's context.
Nicholas Clark [Tue, 28 May 2013 20:36:48 +0000 (22:36 +0200)]
Use magic rather than DESTROY to free memory in Storable's context.

Suggested by Leon Timmermans.

11 years agoRestore Storable support for 5.005 and (astoundingly) 5.004
Nicholas Clark [Tue, 28 May 2013 19:37:06 +0000 (21:37 +0200)]
Restore Storable support for 5.005 and (astoundingly) 5.004

It even passes all tests on 5.004.

11 years agoMerge the refactoring of the Makefile install targets into blead.
Nicholas Clark [Sat, 13 Jul 2013 11:29:38 +0000 (13:29 +0200)]
Merge the refactoring of the Makefile install targets into blead.

11 years agoDon't call CPAN to install any "extra" modules for the install-notify target.
Nicholas Clark [Wed, 25 Apr 2012 20:00:09 +0000 (22:00 +0200)]
Don't call CPAN to install any "extra" modules for the install-notify target.

Previously the Makefile's install-notify target built extra.install just like
the other 5 install targets. However, the other 5 actually install perl,
whereas install-notify (a.k.a. no-install) runs installperl and installman
with the --notify option (formerly -n), to cause them to print what they would
do but take no action. Hence if -Dextras was used, make no-install would
actually install the extra modules, but nothing else. This is inconsistent.

11 years agoInline the Makefile rule for extra.install into all 6 targets which use it.
Nicholas Clark [Wed, 25 Apr 2012 18:04:08 +0000 (20:04 +0200)]
Inline the Makefile rule for extra.install into all 6 targets which use it.

This eliminates 6 recursive calls from Makefile to itself. As five of these
are generated from a loop in Makefile.SH, this isn't massive code
duplication. It's not obvious how to merge the sixth without increasing the
code complexity.

Additionally, if the user has specified extra modules to download and build
from CPAN using Configure's -Dextra, this avoids building perl, the non-XS
modules and the CPAN modules twice on make install.

11 years agoRefactor Makefile.SH to generate the install-* targets in a loop.
Nicholas Clark [Wed, 25 Apr 2012 16:28:39 +0000 (18:28 +0200)]
Refactor Makefile.SH to generate the install-* targets in a loop.

This slightly reduces the line count, merges five-fold duplication into one,
and works toward removing 5 recursive calls from Makefile to itself.

11 years agoIn Makefile.SH, use the long names for options passed to install{perl,man}
Nicholas Clark [Wed, 25 Apr 2012 16:05:24 +0000 (18:05 +0200)]
In Makefile.SH, use the long names for options passed to install{perl,man}

This makes it clearer what is going on, and enables a simplifying refactoring.

11 years agoRefactor the Makefile so that the install target depends on install-all.
Nicholas Clark [Tue, 24 Apr 2012 16:41:47 +0000 (18:41 +0200)]
Refactor the Makefile so that the install target depends on install-all.

Also, add targets install_notify and install-notify, as synonyms for
no_install and no-install. Previously install, install-all and install_all
were all generated by the same rule.

These changes make future refactoring easier.

11 years agoMerge installperl and installman refactoring to blead.
Nicholas Clark [Sat, 13 Jul 2013 10:16:57 +0000 (12:16 +0200)]
Merge installperl and installman refactoring to blead.

11 years agoDocument installperl and installman refactoring in perldelta.pod
Nicholas Clark [Sat, 13 Jul 2013 10:16:20 +0000 (12:16 +0200)]
Document installperl and installman refactoring in perldelta.pod

11 years agoAdd a no-op option --strip to installman.
Nicholas Clark [Wed, 25 Apr 2012 13:48:33 +0000 (15:48 +0200)]
Add a no-op option --strip to installman.

This intentionally does nothing.

--strip for installperl instructs it to strip the installed binaries. Hence
by permitting installman to accept --strip without error Makefile.SH can be
simplified, as it's possible to pass identical flags to both install scripts.

11 years agoRefactor installman's option handling to use Getopt::Long's "multiple names".
Nicholas Clark [Wed, 25 Apr 2012 13:21:54 +0000 (15:21 +0200)]
Refactor installman's option handling to use Getopt::Long's "multiple names".

Previously installman specified synonyms for options as distinct
options, and then used explicit code to merge them.

Also add -h and -? as synonyms for --help.

11 years agoConvert installperl to use Getopt::Long.
Nicholas Clark [Wed, 25 Apr 2012 12:38:00 +0000 (14:38 +0200)]
Convert installperl to use Getopt::Long.

This requires some special handling for the +v option. Fortunately, we can
cheat, because we know that no other non-options are acceptable. This does
change the behaviour slightly from before:

* single letter options now also have long names
* invalid options are now rejected
* command line arguments that are not options are now rejected

However, the behaviour for all valid documented invocations is unchanged.

Also, add a --help option to display the usage message.

11 years agoIn installperl rename $opt{dostrip} to $opt{strip}.
Nicholas Clark [Wed, 25 Apr 2012 14:57:22 +0000 (16:57 +0200)]
In installperl rename $opt{dostrip} to $opt{strip}.

This will provide a more meaningful long option name once installperl is
converted to Getopt::Long.

11 years agoIn installperl, record the state of options in %opts instead of lexicals.
Nicholas Clark [Wed, 25 Apr 2012 11:17:41 +0000 (13:17 +0200)]
In installperl, record the state of options in %opts instead of lexicals.

Replace all lexicals used to track the state of command line options with
entries in the hash %opts. Make an exception for $versiononly, as it is
controlled by 2 different command line options, and accessed in significantly
more places than the state of any other command line option.

11 years agoIn installperl, invert the sense of the variable used for the -o option.
Nicholas Clark [Wed, 25 Apr 2012 10:47:53 +0000 (12:47 +0200)]
In installperl, invert the sense of the variable used for the -o option.

Previously it was $otherperls, and had to have its default of 1 explicitly
set. Change it to $skip_otherperls, and the default default of undef is
perfect.

11 years agoRemove dead code from installperl, related to a 5.000->5.001 change.
Nicholas Clark [Wed, 25 Apr 2012 10:06:26 +0000 (12:06 +0200)]
Remove dead code from installperl, related to a 5.000->5.001 change.

5.000 installed autosplit files into archlib. 5.001 and later install into
privlib. archlib is earlier in @INC. It wasn't until 5.005 that perl put the
version number into the paths used for privlib and archlib, hence without
special treatment, the files installed by 5.001 would not be found, because
those from 5.000 would be earlier in @INC.

See commit a841533b5cf319b3 (Oct 2009) which removes similar special casing
code dealing with perldiag.pod confusion between 5.003 and 5.004

All this code became redundant when 5.005 added the version number to
library paths. (strictly, commit bfb7748a896459cc in Jul 1998)

11 years agoGenerate Errno and Pod::Functions with deterministic order.
Nicholas Clark [Fri, 12 Jul 2013 14:50:13 +0000 (16:50 +0200)]
Generate Errno and Pod::Functions with deterministic order.

Previously the order of duplicate names in Errno was determined by hash
iteration order, as was the order of the list of types for built-ins in
Pod::Functions. With hash randomisation this meant that the generated file
could differ between builds, which isn't ideal if the input is the same.

(Spotted as a side effect of running a diff on two installation trees.)

11 years ago[perl #118567] Add a warning for prototypes if a missing
Peter Martini [Sat, 13 Jul 2013 02:10:06 +0000 (22:10 -0400)]
[perl #118567] Add a warning for prototypes if a missing
 closing bracket is detected

11 years agodiagnostics.t: Adjust tests
Father Chrysostomos [Sat, 13 Jul 2013 07:38:39 +0000 (00:38 -0700)]
diagnostics.t: Adjust tests

They are sensitive to changes in perldiag.pod

11 years agoperlvar: Don’t mention dev version
Father Chrysostomos [Sat, 13 Jul 2013 07:27:00 +0000 (00:27 -0700)]
perlvar: Don’t mention dev version

Also, use the v convention used elsewhere in the same doc.

11 years agocheckAUTHORS.pl: Add alt addr for Kent Fredric
Father Chrysostomos [Sat, 13 Jul 2013 07:25:04 +0000 (00:25 -0700)]
checkAUTHORS.pl: Add alt addr for Kent Fredric

11 years agopod/perl5180delta.pod: Clarify %ENV Changes
Kent Fredric [Sat, 15 Dec 2012 13:13:39 +0000 (02:13 +1300)]
pod/perl5180delta.pod: Clarify %ENV Changes

Clarifies the slightly vague ( and  possibly wrong ) explanation for the change in %ENV behaviour.

11 years agopod/perlvar.pod: Document changes to %ENV
Kent Fredric [Sat, 15 Dec 2012 10:21:29 +0000 (23:21 +1300)]
pod/perlvar.pod: Document changes to %ENV

Including Historical context, and relevance to IPC.

reformatted with Jim Keenans Suggestions

11 years agodiag.t: Handle ckWARN2reg_d properly
Father Chrysostomos [Sat, 13 Jul 2013 07:13:20 +0000 (00:13 -0700)]
diag.t: Handle ckWARN2reg_d properly

11 years agoMove folding rules warning from 'D' to 'S'.
James E Keenan [Sun, 17 Feb 2013 00:58:26 +0000 (19:58 -0500)]
Move folding rules warning from 'D' to 'S'.

For RT #89648

11 years ago[perl #89648] Remove ‘Perl folding rules...’ from dep cat
Father Chrysostomos [Sat, 13 Jul 2013 07:07:20 +0000 (00:07 -0700)]
[perl #89648] Remove ‘Perl folding rules...’ from dep cat

This warning message:

Perl folding rules are not up-to-date for 0x%x; please use the perlbug utility to report;

is in both ‘regexp’ and ‘deprecated’ warning categories. It is under
deprecated warnings so that it has a better chance of showing up.

I think this logic is faulty, because it’s not the deprecatedness that
makes a warning show up by default, but its defaultness; i.e., whether
Perl_ck_warner_d is used instead of Perl_ck_warner. The wide character
warning, for instance, is not under ‘deprecated’, but only ‘utf8’. Yet
it’s a default warning marked as S in perldiag. I think this message
should be treated similarly (and listed with (S regex)).

The next commit will update perldiag accordingly.

11 years agoRevert "[perl #118525] Return B::HEK for B::CV::GV of lexical subs"
Father Chrysostomos [Sat, 13 Jul 2013 06:33:06 +0000 (23:33 -0700)]
Revert "[perl #118525] Return B::HEK for B::CV::GV of lexical subs"

This reverts commit 8748370e90a24f3901d476f43ed77f1ac3d861f4.

There appears to be a typemap problem.  I accidentally pushed the patch
too soon.  Sorry for the noise.

11 years agoRevert "Allow => to quote built-in keywords across lines"
Father Chrysostomos [Sat, 13 Jul 2013 06:23:20 +0000 (23:23 -0700)]
Revert "Allow => to quote built-in keywords across lines"

This reverts commit 5969c5766a5d3f6b42a5140548d7c3d6812fec8b.

It appears to be failing with non-mad builds.

11 years ago[perl #118525] Return B::HEK for B::CV::GV of lexical subs
Reini Urban [Thu, 11 Jul 2013 17:09:15 +0000 (12:09 -0500)]
[perl #118525] Return B::HEK for B::CV::GV of lexical subs

A lexsub has a hek instead of a gv. Provide a ref to a PV for the name
in the new B::HEK class.
This crashed previously accessing the not existing SvFLAGS of the hek.

11 years ago[perl #118857] Test punct vars’ exemption from ‘once’ warnings
Father Chrysostomos [Sat, 13 Jul 2013 06:18:08 +0000 (23:18 -0700)]
[perl #118857] Test punct vars’ exemption from ‘once’ warnings

11 years ago[perl #113932] Make UNIVERSAL::can("STDOUT"...) work
Father Chrysostomos [Sat, 13 Jul 2013 05:53:48 +0000 (22:53 -0700)]
[perl #113932] Make UNIVERSAL::can("STDOUT"...) work

For consistency with the way method lookup works, UNIVERSAL::can(...)
should treat a bareword representing a filehandle as a lookup in the
IO::File package (or whichever package implements that filehandle
object).