This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
10 years agopod/perldelta: Add in some deprecations; fix a typo
Karl Williamson [Tue, 7 May 2013 23:00:10 +0000 (17:00 -0600)]
pod/perldelta: Add in some deprecations; fix a typo

Feel free to improve the wording of these.

10 years agobump dist/IO/lib/IO/Handle.pm version to 1.34
Dominic Hargreaves [Tue, 7 May 2013 22:25:09 +0000 (23:25 +0100)]
bump dist/IO/lib/IO/Handle.pm version to 1.34

10 years ago[perl #117791] Clarify that write does not match the C 'write' semantics
Dominic Hargreaves [Sun, 28 Apr 2013 21:11:57 +0000 (22:11 +0100)]
[perl #117791] Clarify that write does not match the C 'write' semantics

10 years agodocument and improve hash algorithm randomization related build options
Yves Orton [Tue, 7 May 2013 21:52:16 +0000 (23:52 +0200)]
document and improve hash algorithm randomization related build options

Install was a copy of other material, made heavy reference to 5.8.x and
and didnt really document what it should have. I reworked it to be more
up to date.

10 years agocleanup and test PERL_PERTURB_KEYS environment variable handling
Yves Orton [Tue, 7 May 2013 20:24:20 +0000 (22:24 +0200)]
cleanup and test PERL_PERTURB_KEYS environment variable handling

10 years agoremove the 5.17 deltas, update for 5.18
Ricardo Signes [Tue, 7 May 2013 02:01:25 +0000 (22:01 -0400)]
remove the 5.17 deltas, update for 5.18

10 years agoput the perldelta we had been working on in place
Ricardo Signes [Tue, 7 May 2013 01:54:24 +0000 (21:54 -0400)]
put the perldelta we had been working on in place

10 years agoupdate perldiag with new warnings
Ricardo Signes [Tue, 7 May 2013 02:31:40 +0000 (22:31 -0400)]
update perldiag with new warnings

10 years agoregenerate uconfig.h and META.json
Ricardo Signes [Tue, 7 May 2013 01:34:32 +0000 (21:34 -0400)]
regenerate uconfig.h and META.json

10 years agoBump version to 5.18.0-RC0
Ricardo Signes [Tue, 7 May 2013 01:24:52 +0000 (21:24 -0400)]
Bump version to 5.18.0-RC0

This was done with:

  ./perl -Ilib Porting/bump-perl-version -i 5.17.12 5.18.0

Followed by two tiny manual edits: INSTALL and patchlevel.h

10 years agoThe URL for the dist source repo changed
H.Merijn Brand [Tue, 7 May 2013 21:47:21 +0000 (23:47 +0200)]
The URL for the dist source repo changed

10 years agoRMG: say that for maint there are two RMG versions
David Mitchell [Tue, 7 May 2013 16:53:49 +0000 (17:53 +0100)]
RMG: say that for maint there are two RMG versions

10 years agoRMG: add note about maint and Module::CoreList
David Mitchell [Tue, 7 May 2013 16:45:02 +0000 (17:45 +0100)]
RMG: add note about maint and Module::CoreList

10 years agoRMG: maint perlhist: change from push to pull
David Mitchell [Tue, 7 May 2013 16:25:11 +0000 (17:25 +0100)]
RMG: maint perlhist: change from push to pull

When creating a new maint release, rather than copying its perlhist entry
into every other branch just after release, instead just copy it into
blead; then when creating a new maint release, just pull the latest
perlhist file from blead.

10 years agoRMG: maint perldeltas: change from push to pull
David Mitchell [Mon, 6 May 2013 16:12:30 +0000 (17:12 +0100)]
RMG: maint perldeltas: change from push to pull

When creating a new maint release, rather than copying its perldelta into
every other branch just after release, instead just copy it into blead,
then when creating a new maint release, copy any newer perldeltas from
blead.

10 years agoadd PERL_NEW_COPY_ON_WRITE to perl -V output
David Mitchell [Tue, 7 May 2013 15:53:20 +0000 (16:53 +0100)]
add PERL_NEW_COPY_ON_WRITE to perl -V output

10 years agohoping this works finally. gcc is too permissive with my build options
Yves Orton [Tue, 7 May 2013 11:20:34 +0000 (13:20 +0200)]
hoping this works finally. gcc is too permissive with my build options

10 years agodocument Hash::Util::hash_traversal_mask()
Yves Orton [Tue, 7 May 2013 09:22:44 +0000 (11:22 +0200)]
document Hash::Util::hash_traversal_mask()

It still needs tests. But I figured it would be easier to test
by someone else if I documented it. (Ill try to get tests done for it
soon).

10 years agofix build issue with picky compilers
Yves Orton [Tue, 7 May 2013 09:22:22 +0000 (11:22 +0200)]
fix build issue with picky compilers

10 years agoEnsure -DUSE_PERLIO gets into Config's ccflags when using dmake on Windows
Steve Hay [Tue, 7 May 2013 07:44:45 +0000 (08:44 +0100)]
Ensure -DUSE_PERLIO gets into Config's ccflags when using dmake on Windows

The -DUSE_PERLIO flag was being used to build perl itself, but amazingly
didn't end up in Config's ccflags, potentially causing trouble later when
building XS extensions. (The problem isn't new: it's been this way ever
since PerlIO support for Windows was added by e601c439, way back in
November 2000.)

10 years agoMake it possible to disable and control hash key traversal randomization
Yves Orton [Sun, 5 May 2013 14:33:43 +0000 (16:33 +0200)]
Make it possible to disable and control hash key traversal randomization

Adds support for PERL_PERTURB_KEYS environment variable, which in turn allows one to control
the level of randomization applied to keys() and friends.

When PERL_PERTURB_KEYS is 0 we will not randomize key order at all. The
chance that keys() changes due to an insert will be the same as in
previous perls, basically only when the bucket size is changed.

When PERL_PERTURB_KEYS is 1 we will randomize keys in a non repeatedable
way. The chance that keys() changes due to an insert will be very high.
This is the most secure and default mode.

When PERL_PERTURB_KEYS is 2 we will randomize keys in a repeatedable way.
Repititive runs of the same program should produce the same output every
time. The chance that keys changes due to an insert will be very high.

This patch also makes PERL_HASH_SEED imply a non-default
PERL_PERTURB_KEYS setting. Setting PERL_HASH_SEED=0 (exactly one 0) implies
PERL_PERTURB_KEYS=0 (hash key randomization disabled), settng PERL_HASH_SEED
to any other value, implies PERL_PERTURB_KEYS=2 (deterministic/repeatable
hash key randomization). Specifying PERL_PERTURB_KEYS explicitly to a
different level overrides this behavior.

Includes changes to allow one to compile out various aspects of the
patch. One can compile such that PERL_PERTURB_KEYS is not respected, or
can compile without hash key traversal randomization at all. Note that
support for these modes is incomplete, and currently a few tests will
fail.

Also includes a new subroutine in Hash::Util::hash_traversal_mask()
which can be used to ensure a given hash produces a predictable key
order (assuming the same hash seed is in effect). This sub acts as a
getter and a setter.

NOTE - this patch lacks tests, but I lack tuits to get them done quickly,
so I am pushing this with the hope that others can add them afterwards.

10 years agoRemoved confusing reference to new in ties perlfunc entry
Brad Gilbert [Mon, 6 May 2013 15:52:05 +0000 (10:52 -0500)]
Removed confusing reference to new in ties perlfunc entry

10 years agoimprove unpackstring() API docs
David Mitchell [Mon, 6 May 2013 15:28:53 +0000 (16:28 +0100)]
improve unpackstring() API docs

See ticket RT #116366 for the full discussion

10 years agoRevert "Update docs to concur with $`,$&,$' changes"
David Mitchell [Mon, 6 May 2013 11:34:59 +0000 (12:34 +0100)]
Revert "Update docs to concur with $`,$&,$' changes"

This reverts commit d78f32f607952d58a998c5b7554572320dc57b2a.

Since COW has now not been enabled by default for 5.18, revert the
documentation changes which say that that $' etc no longer have a
performance penalty, etc.

10 years agomake /(?p:...)/ keep RXf_PMf_KEEPCOPY flag
David Mitchell [Mon, 6 May 2013 11:14:26 +0000 (12:14 +0100)]
make /(?p:...)/ keep RXf_PMf_KEEPCOPY flag

RT #117135

The /p flag, when used internally within a pattern, isn't like the
other internal patterns, e.g. (?i:...), in that once seen, the
pattern should have the RXf_PMf_KEEPCOPY flag globally set and not
just enabled within the scope of the (?p:...).

10 years agoUse PTR2IV() instead of casting a pointer to IV, to avoid warnings.
Robin Barker [Wed, 1 May 2013 17:39:26 +0000 (18:39 +0100)]
Use PTR2IV() instead of casting a pointer to IV, to avoid warnings.

The cast to IV was added to avoid problems on platforms where pointers are
larger than longs. However, the change instead generates warnings on
platforms where IVs are larger than pointers. Instead, use the PTR2IV()
macro provided by perl.h to make everyone happy.

Also change the type of the variable on that line, because it is cast to
STRLEN the first time it is used, and then passed to a macro that assigns it
to an int regardless.

10 years agoImprove the logic in regen_perly.pl for manually generating token macros.
Nicholas Clark [Thu, 2 May 2013 11:34:13 +0000 (13:34 +0200)]
Improve the logic in regen_perly.pl for manually generating token macros.

Without this fixup the build breaks on Win32. Previously it was enabled using
a second regular expression to parse the bison version string. This
effectively duplicates the first regular expression that parses the bison
version string to determine if the version of bison found can be used.

The second regular expression could get missed when changing the first, as
happened with commit f5cf236ddbe8e24e. So refactor the code to extract the
bison version once, and then use this later as a simple numeric comparison.

With this change, we can actually use bison 2.7 to regenerate perly.*

10 years agoFix non-blocking sockets on VMS.
Craig A. Berry [Sun, 5 May 2013 19:50:54 +0000 (14:50 -0500)]
Fix non-blocking sockets on VMS.

It turns out sockets on VMS (just like Windows) are blocking by
default, but the same code already in IO::Socket::blocking for
Windows that uses ioctl to set non-blocking works just fine on VMS.

This is part of [perl #116433] as the deficieny was exposed by
tests in IO::Socket::IP.

10 years agoMerge perldelta for 5.18, work from past weeks
Ricardo Signes [Sun, 5 May 2013 20:05:53 +0000 (16:05 -0400)]
Merge perldelta for 5.18, work from past weeks

10 years agoperldelta: split change is incompatible
Ricardo Signes [Sun, 21 Apr 2013 23:56:00 +0000 (19:56 -0400)]
perldelta: split change is incompatible

10 years agoperldelta: "corrupts"
Smylers [Thu, 4 Apr 2013 13:14:30 +0000 (14:14 +0100)]
perldelta: "corrupts"

10 years agoperldelta: singular agreement
Smylers [Thu, 4 Apr 2013 13:10:32 +0000 (14:10 +0100)]
perldelta: singular agreement

10 years agoperldelta: "no" missing
Smylers [Thu, 4 Apr 2013 12:55:04 +0000 (13:55 +0100)]
perldelta: "no" missing

10 years agoperldelta: unwanted comma removed
Smylers [Thu, 4 Apr 2013 12:07:14 +0000 (13:07 +0100)]
perldelta: unwanted comma removed

The sense is "matching no longer excludes", which can't take a comma (even
though the qualifiers on "matching" are quite long)>

10 years agoperldelta: mark $_ as code in header
Ricardo Signes [Fri, 5 Apr 2013 23:53:26 +0000 (19:53 -0400)]
perldelta: mark $_ as code in header

10 years agoperldelta: "continuation of"
Smylers [Thu, 4 Apr 2013 11:58:06 +0000 (12:58 +0100)]
perldelta: "continuation of"

Not "for".

10 years agoperldelta: fatal error is an error, not a warning
Smylers [Thu, 4 Apr 2013 11:46:50 +0000 (12:46 +0100)]
perldelta: fatal error is an error, not a warning

"(F)" removed, since everything in the 'New Errors' section is obviously
an error, and none of the other errors in there are marked as such.

10 years agoperldelta: semicolon there isn't code
Smylers [Thu, 4 Apr 2013 10:47:58 +0000 (11:47 +0100)]
perldelta: semicolon there isn't code

10 years agoperldelta: extraneous word removed
Smylers [Thu, 4 Apr 2013 10:43:57 +0000 (11:43 +0100)]
perldelta: extraneous word removed

10 years agoperldelta: join sentence fragment
Smylers [Thu, 4 Apr 2013 10:41:00 +0000 (11:41 +0100)]
perldelta: join sentence fragment

10 years agoperldelta: avoid comma splice
Smylers [Thu, 4 Apr 2013 10:34:21 +0000 (11:34 +0100)]
perldelta: avoid comma splice

10 years agoperldelta: short-circuit cross-reference chain
Smylers [Thu, 4 Apr 2013 09:26:23 +0000 (10:26 +0100)]
perldelta: short-circuit cross-reference chain

perlre/(?[ ]) just says to see perlrecharclass/Extended Bracketed
Character Classes, so may as well point people there in the first place.

10 years agoperldelta: DTrace probes as bullet list
Smylers [Thu, 4 Apr 2013 09:20:11 +0000 (10:20 +0100)]
perldelta: DTrace probes as bullet list

It was a definition list, but with only terms (no definitions), and hence
no indentation.

10 years agoperldelta: spelling fix
Smylers [Thu, 4 Apr 2013 09:17:05 +0000 (10:17 +0100)]
perldelta: spelling fix

10 years agoperldelta: an env var doesn't do anything itself
Smylers [Thu, 4 Apr 2013 09:12:54 +0000 (10:12 +0100)]
perldelta: an env var doesn't do anything itself

10 years agoperldelta: missing parenthetical comma
Smylers [Thu, 4 Apr 2013 09:07:50 +0000 (10:07 +0100)]
perldelta: missing parenthetical comma

"in hex" is parenthetical

10 years agoperldelta: "order" is intended word
Smylers [Thu, 4 Apr 2013 09:04:48 +0000 (10:04 +0100)]
perldelta: "order" is intended word

10 years agowarn of more things to be removed
Ricardo Signes [Thu, 4 Apr 2013 13:58:42 +0000 (09:58 -0400)]
warn of more things to be removed

10 years agocarry forward future deprecations from 5.16 delta
Ricardo Signes [Thu, 4 Apr 2013 02:11:47 +0000 (22:11 -0400)]
carry forward future deprecations from 5.16 delta

10 years agoperldelta: mention the removal of BeOS
Ricardo Signes [Thu, 4 Apr 2013 02:11:21 +0000 (22:11 -0400)]
perldelta: mention the removal of BeOS

10 years agoperldelta: the selected bugs
Ricardo Signes [Wed, 3 Apr 2013 02:13:28 +0000 (22:13 -0400)]
perldelta: the selected bugs

10 years agoperldelta: miscellaneous editing in the middle parts
Ricardo Signes [Wed, 3 Apr 2013 01:48:41 +0000 (21:48 -0400)]
perldelta: miscellaneous editing in the middle parts

10 years agoperldelta: deprecations section
Ricardo Signes [Wed, 3 Apr 2013 01:27:32 +0000 (21:27 -0400)]
perldelta: deprecations section

10 years agoperldelta: the incompatible changes section
Ricardo Signes [Wed, 3 Apr 2013 01:14:43 +0000 (21:14 -0400)]
perldelta: the incompatible changes section

10 years agoperldelta: finish reordering and first pass through Core Enh.
Ricardo Signes [Wed, 3 Apr 2013 01:03:28 +0000 (21:03 -0400)]
perldelta: finish reordering and first pass through Core Enh.

10 years agoexperimental feature warning categories have ::
Ricardo Signes [Wed, 3 Apr 2013 00:58:10 +0000 (20:58 -0400)]
experimental feature warning categories have ::

10 years agoperldelta: collect hash changes
Ricardo Signes [Tue, 2 Apr 2013 14:05:52 +0000 (10:05 -0400)]
perldelta: collect hash changes

10 years agoperldelta: tweak/fix "earlier changes" section
Ricardo Signes [Tue, 2 Apr 2013 14:03:47 +0000 (10:03 -0400)]
perldelta: tweak/fix "earlier changes" section

10 years agoimport perl51710delta content to perl5180delta
Ricardo Signes [Mon, 1 Apr 2013 21:53:27 +0000 (17:53 -0400)]
import perl51710delta content to perl5180delta

10 years agoimport perl5179delta content to perl5180delta
Ricardo Signes [Mon, 1 Apr 2013 21:49:52 +0000 (17:49 -0400)]
import perl5179delta content to perl5180delta

10 years agoimport perl5178delta content to perl5180delta
Ricardo Signes [Mon, 1 Apr 2013 21:42:53 +0000 (17:42 -0400)]
import perl5178delta content to perl5180delta

10 years agoimport perl5177delta content to perl5180delta
Ricardo Signes [Mon, 1 Apr 2013 21:14:03 +0000 (17:14 -0400)]
import perl5177delta content to perl5180delta

10 years agoimport perl5176delta content to perl5180delta
Ricardo Signes [Mon, 1 Apr 2013 21:05:48 +0000 (17:05 -0400)]
import perl5176delta content to perl5180delta

10 years agoimport perl5175delta content to perl5180delta
Ricardo Signes [Mon, 1 Apr 2013 20:56:06 +0000 (16:56 -0400)]
import perl5175delta content to perl5180delta

10 years agoimport perl5174delta content to perl5180delta
Ricardo Signes [Mon, 1 Apr 2013 20:49:25 +0000 (16:49 -0400)]
import perl5174delta content to perl5180delta

10 years agoimport perl5173delta content to perl5180delta
Ricardo Signes [Mon, 1 Apr 2013 20:32:56 +0000 (16:32 -0400)]
import perl5173delta content to perl5180delta

10 years agoimport perl5172delta content to perl5180delta
Ricardo Signes [Wed, 13 Mar 2013 02:52:38 +0000 (22:52 -0400)]
import perl5172delta content to perl5180delta

10 years agoimport perl5171delta content to perl5180delta
Ricardo Signes [Wed, 13 Mar 2013 02:39:37 +0000 (22:39 -0400)]
import perl5171delta content to perl5180delta

10 years agoimport perl5170delta content to perl5180delta
Ricardo Signes [Wed, 13 Mar 2013 02:33:52 +0000 (22:33 -0400)]
import perl5170delta content to perl5180delta

11 years agoFix typo in Module::CoreList POD
Chris 'BinGOs' Williams [Sat, 4 May 2013 21:19:06 +0000 (22:19 +0100)]
Fix typo in Module::CoreList POD

11 years agoupdate AUTHORS
David Mitchell [Fri, 3 May 2013 14:07:46 +0000 (15:07 +0100)]
update AUTHORS

11 years agofix two my_setenv/my_clearenv bugs
Markus Jansen [Fri, 3 May 2013 14:02:30 +0000 (15:02 +0100)]
fix two my_setenv/my_clearenv bugs

RT #117121. This commit fixes two bugs. First, some old glibc's can crash
if unsetenv() is called with a null environ.

Secondly, the code in Perl_my_clearenv(), when freeing env vars with a
name longer than 80 chars, reallocs a tmp buffer, but didn't
update the buf lencausing this to fail under valgrind:

    $ENV{"a"x 90}=1; local %ENV;

11 years agoMerge in -DPERL_NO_INLINE_FUNCTIONS and t/porting/extrefs.t which tests it.
Nicholas Clark [Fri, 3 May 2013 12:13:08 +0000 (14:13 +0200)]
Merge in -DPERL_NO_INLINE_FUNCTIONS and t/porting/extrefs.t which tests it.

11 years agoAdd a space after -o to keep Darwin's g++ happy, in t/porting/extrefs.t
Nicholas Clark [Tue, 30 Apr 2013 14:19:15 +0000 (16:19 +0200)]
Add a space after -o to keep Darwin's g++ happy, in t/porting/extrefs.t

Darwin's g++ 4.2.1 is fussy. FreeBSD's g++ 4.2.1 is not. Hateful software.

11 years agoAdd a "verbose" option to t/porting/extrefs.t for debugging.
Nicholas Clark [Tue, 30 Apr 2013 13:56:53 +0000 (15:56 +0200)]
Add a "verbose" option to t/porting/extrefs.t for debugging.

11 years agosupport MSWin32 too
Tony Cook [Sun, 14 Apr 2013 06:10:04 +0000 (16:10 +1000)]
support MSWin32 too

11 years agoremove code for non-core builds and "modernize"
Tony Cook [Sat, 13 Apr 2013 05:05:33 +0000 (15:05 +1000)]
remove code for non-core builds and "modernize"

11 years agotest that perl headers don't introduce external references
Tony Cook [Sat, 13 Apr 2013 04:49:26 +0000 (14:49 +1000)]
test that perl headers don't introduce external references

This is as close as possible to the original Time::HiRes probe code,
further commits will clean that up.

[perl #116989]

[Amended from Tony's original to add -DPERL_NO_INLINE_FUNCTIONS]

11 years agoIf PERL_NO_INLINE_FUNCTIONS is defined, don't include "inline.h"
Nicholas Clark [Fri, 26 Apr 2013 10:18:41 +0000 (12:18 +0200)]
If PERL_NO_INLINE_FUNCTIONS is defined, don't include "inline.h"

This permits test code to include the perl headers for definitions without
creating a link dependency on the perl library (which may not exist yet).

Some of the static inline functions in inline.h reference functions in the
perl object files, and some compilers aren't smart enough to eliminate
unused static inline functions, hence including the inline.h in probe code
can cause link errors even though the probe code uses none of the functions
it declares. When probing, a failed link is taken as meaning that the
probed-for function is not present, as the assumption is that the link fails
because of it. Hence other causes of link failures cause the probing code to
generate incorrect results, and action (and bugs) at a distance.

11 years agoRevert "Change the warning for $* to add ", and will become a syntax error"."
Nicholas Clark [Mon, 8 Apr 2013 15:05:11 +0000 (17:05 +0200)]
Revert "Change the warning for $* to add ", and will become a syntax error"."

This reverts commit 53213d38f22e9356f489162e494d2ffa46ec2ca2.

Conflicts:

pod/perldelta.pod

11 years agoRevert "Add a deprecation warning for all uses of @*, %*, &* and **."
Nicholas Clark [Mon, 8 Apr 2013 14:53:47 +0000 (16:53 +0200)]
Revert "Add a deprecation warning for all uses of @*, %*, &* and **."

This reverts commit 982110e06e40aad7a538cb788327cca8aaabce22.

Conflicts:

pod/perldelta.pod

11 years agoDeprecate spaces/comments in some regex tokens
Karl Williamson [Tue, 23 Apr 2013 19:39:35 +0000 (13:39 -0600)]
Deprecate spaces/comments in some regex tokens

This commit deprecates having space/comments between the first two
characters of regular expression forms '(*VERB:ARG)' and '(?...)'.
That is, the '(' should be immediately be followed by the '*' or '?'.
Previously, things like:

   qr/((?# This is a comment in the middle of a token)?:foo)/

were silently accepted.

The problem is that during regex parsing, the '(' is seen, and the input
pointer advanced, skipping comments and, under /x, white space, without
regard to whether the left parenthesis is part of a bigger token or not.
S_reg() handles the parsing of what comes next in the input, and it
just assumes that the first character it sees is the one that
immediately followed the input parenthesis.

Since the parenthesis may or may not be a part of a bigger token, and
the current structure of handling things, I don't see an elegant way to
fix this.  What I did is flag the single call to S_reg() where this
could be an issue, and have S_reg check for for adjacency if the
parenthesis is part of a bigger token, and if so, warn if not-adjacent.

11 years agolib/utf8_heavy.pl: Fix separated '(?' token
Karl Williamson [Tue, 23 Apr 2013 21:06:57 +0000 (15:06 -0600)]
lib/utf8_heavy.pl: Fix separated '(?' token

The next commit will warn when these aren't adjacent

11 years agoPATCH: [perl #117327]: Sequence (?#...) not recognized in regex
Karl Williamson [Thu, 2 May 2013 01:01:29 +0000 (19:01 -0600)]
PATCH: [perl #117327]: Sequence (?#...) not recognized in regex

This reverts commit 504858073fe16afb61d66a8b6748851780e51432, which
was made under the erroneous belief that certain code was unreachable.
This code appears to be reachable, however, only if the input has
a 2-character lexical token split by space or a comment.  The token
should be indivisible, and was accepted only through an accident of
implementation.  A later commit will deprecate splitting it, with the
view of eventually making splitting it a fatal error.  In the meantime,
though, this reverts to the original behavior, and adds a (temporary)
test to verify that.

11 years agoreg_mesg.t: Turn off regexp warns along with deprecated
Karl Williamson [Thu, 2 May 2013 00:31:34 +0000 (18:31 -0600)]
reg_mesg.t: Turn off regexp warns along with deprecated

Some warnings are both regexp and deprecated.  To test that they are
under control of 'deprecated', it is necessary to turn off both
categories.  We currently don't test that they are also under 'regexp'
control

11 years agoCarp: add a test for top-of-stack longmess
Ricardo Signes [Wed, 1 May 2013 16:54:10 +0000 (12:54 -0400)]
Carp: add a test for top-of-stack longmess

11 years agoCarp: distinguish deleted stash from top of stack
Ricardo Signes [Wed, 1 May 2013 15:41:50 +0000 (11:41 -0400)]
Carp: distinguish deleted stash from top of stack

The change to work with deleted stashes broke the behavior of Carp
at the top of the stack.

This change distinguishes between the two cases: at the top of the
stack, caller(1) returns ().  If the stash has been deleted, it
returns a populated list with an undefined package name.  The test
used here is to check for a defined line number, which should be
sufficient.

11 years agoI cannot find shorter URL's
H.Merijn Brand [Wed, 1 May 2013 10:17:20 +0000 (12:17 +0200)]
I cannot find shorter URL's

11 years agoUpdate HP-UX readme
H.Merijn Brand [Wed, 1 May 2013 09:08:37 +0000 (11:08 +0200)]
Update HP-UX readme

The porting center cannot be said to ship recent perl when 5.18.0 is about
to be released and they just have 5.10.1 available. Trying "very hard" now
sounds like a huge overstatement. Sadly.

Telling what modules were included in the first public perl port from HP is
like digging up corpses.

HP-UX 11.31 has now EOL set to 2022. I've updated all other EOL info too.

11 years agoRemove a comment made obsolete by commit 213f370f28504f3a.
Nicholas Clark [Mon, 29 Apr 2013 14:03:23 +0000 (16:03 +0200)]
Remove a comment made obsolete by commit 213f370f28504f3a.

Commit 213f370f28504f3a enabled running tests in t/op/*.t in parallel. It
should also have removed the comment saying that this would be nice to have.

11 years agoupdate known_pod_issues.dat to account for the README.macosx change
Tony Cook [Mon, 29 Apr 2013 07:50:15 +0000 (17:50 +1000)]
update known_pod_issues.dat to account for the README.macosx change

The insanely long directory name gave us an extra verbatim line over
79 characters.

11 years agoupdating README.macosx to reflect current systems.
Breno G. de Oliveira [Mon, 29 Apr 2013 05:05:17 +0000 (02:05 -0300)]
updating README.macosx to reflect current systems.

11 years ago[perl #117743] don't warn on $@ = undef; die;
Tony Cook [Thu, 25 Apr 2013 23:56:58 +0000 (09:56 +1000)]
[perl #117743] don't warn on $@ = undef; die;

and fix the test that's meant to detect this bug.

11 years ago[perl #117607] don't crash on: use strict; $foo; &CORE::lc
Tony Cook [Fri, 26 Apr 2013 01:57:36 +0000 (11:57 +1000)]
[perl #117607] don't crash on: use strict; $foo; &CORE::lc

11 years ago[perl #117607] don't use a CV after it's been freed
Tony Cook [Thu, 25 Apr 2013 08:27:09 +0000 (18:27 +1000)]
[perl #117607] don't use a CV after it's been freed

11 years ago[perl #117607] TODO test for \&CORE::lc in error context
Tony Cook [Thu, 25 Apr 2013 08:10:10 +0000 (18:10 +1000)]
[perl #117607] TODO test for \&CORE::lc in error context

The original sample was:

BEGIN {
$^H |= 0x00000400; # strict vars
}
# Undeclared variable here
sub foo { return $anyvar; }
# Any CORE:: here
sub bar { \&CORE::lc }

simplified to:

BEGIN {
$^H |= 0x00000400; # strict vars
}
$anyvar;
&CORE::lc;

but it occurs for any compile-time error that doesn't abort compilation,
such as:

$foo/; \&CORE::lc

11 years agot/op/smartkve.t: single-quote some eval stuff
David Mitchell [Wed, 24 Apr 2013 16:57:04 +0000 (17:57 +0100)]
t/op/smartkve.t: single-quote some eval stuff

Three tests were wrong because they incorrectly double- rather than
single-quoted an eval string like

    eval "keys $hash ...."

Since the tests were supposed to generate syntax errors anyway it didn't
show up. However, the $hash ref was being expanded to HASH(0x......)
and on some platform / compiler permutations it would generate some
mysterious

    Hexadecimal number > 0xffffffff non-portable

warnings.

11 years agomake qr/(?{ __SUB__ })/ safe
David Mitchell [Wed, 24 Apr 2013 15:29:42 +0000 (16:29 +0100)]
make qr/(?{ __SUB__ })/ safe

(See RT #113928)

Formerly, __SUB__ within a code block within a qr// returned
a pointer to the "hidden" anon CV that implements the qr// closure. Since
this was never designed to be called directly, it would SEGV if you tried.

The easiest way to make this safe is to skip any CXt_SUB frames that
are marked as CXp_SUB_RE: i.e. skip any subs that are there just to
execute code blocks. For a qr//, this means that we return the sub which
the pattern match is embedded in.

Also, document the behaviour of __SUB__ within code blocks as being
subject to change. It could be argued for example that in these cases it
should return undef. But with the 5.18.0 release a month or two away, just
make it safe for now, and revisit the semantics later if necessary.

11 years agofix caller with re_evals.
David Mitchell [Wed, 24 Apr 2013 13:41:33 +0000 (14:41 +0100)]
fix caller with re_evals.

(See RT #113928)

In code like

    sub foo {  /A(?{ bar; caller(); }B/; }

the regex /A(?{B})C/ is, from a scope point of view, supposed to
be compiled and executed as:

    /A/ && do { B } && /C/;

i.e. the code block in B is part of the same sub as the code surrounding
the regex. Thus the result of caller() above should see the caller as
whoever called foo.

Due to an implementation detail, we actually push a hidden extra
sub CX before calling the pattern. This detail was leaking when caller()
was used. Fux it so that it ignores this extra context frame.

Conversely, for a qr//, that *is* supposed to be seen as an extra level
of anonymous sub, so add tests to ensure that is so.
i.e.

    $r = qr/...(?{code}).../
    /...$r.../

is supposed to behave like

    $r = sub { code };
    $r->();

11 years agoPUSH_MULTICALL_WITHDEPTH becomes ..._FLAGS
David Mitchell [Wed, 24 Apr 2013 10:14:39 +0000 (11:14 +0100)]
PUSH_MULTICALL_WITHDEPTH becomes ..._FLAGS

Two non-API macros were added with 5.17.1 to support the more
complex calling conventions required by /({})/ code blocks:

    PUSH_MULTICALL_WITHDEPTH(the_cv, depth)
    CHANGE_MULTICALL_WITHDEPTH(the_cv, depth)

which allowed us to do the same as the API versions, but to optionally
not increment the caller depth, and to change the current CV.

Replace these with two new macros:

    PUSH_MULTICALL_FLAGS(the_cv, flags)
    CHANGE_MULTICALL_FLAGS(the_cv, flags)

which instead allow us to set extra flags in cx->cx_type.
The depth increment skip is handled by the new CXp_SUB_RE_FAKE flag,
and all (?{}) calls set the new CXp_SUB_RE flag.

These two new flags will shortly allow us to change how caller() and
__SUB__ handle code blocks.