| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
All compile-time uses of the ** typeglob now warn.
|
|
|
|
|
| |
The intent is that $*, @*, %*, &* and ** stop being parsed as punctuation
variables, freeing up the syntax for other use (possibly "splats").
|
|
|
|
|
|
|
|
|
|
| |
Previously it would fail to be generated if another variable using the same
typeglob was seen first (e.g. @* before $*), and would not be generated for
the second and subsequent uses.
It's hard to fix the failure to generate warnings at all without also
generating them every time, and warning every time is consistent with the
warnings that $[ used to generate.
|
| |
|
|
|
|
| |
The test is not sensitive to which typeglob is used.
|
|
|
|
|
|
|
|
| |
S_reg() recurses to itself to parse various constructions used as the
conditionals in conditional matching. Look-aheads and look-behinds can turn
out to need to be sized as UTF-8, which can cause the inner S_reg() to use
the macro REQUIRE_UTF8 is used to restart the parse. Test that this is
handled correctly.
|
|
|
|
|
|
|
|
|
|
|
|
| |
S_reg() can discover midway through parsing the pattern to determine its
size, that the pattern will actually need to be encoded as UTF-8. If
calculations so far have been done in terms of bytes, then the macro
REQUIRE_UTF8 is used to restart the parse, so that sizes can be calculated
correctly for UTF-8.
It is possible to trigger this restart when processing multi-character
charnames interpolated into the pattern using \N{}. Test that this is
handled correctly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inserting into a hash that is being traversed with each()
has always produced undefined behavior. With hash traversal
randomization this is more pronounced, and at the same
time relatively easy to spot. At the cost of an extra U32
in the xpvhv_aux structure we can detect that the xhv_rand
has changed and then produce a warning if it has.
It was suggested on IRC that this should produce a fatal
error, but I couldn't see a clean way to manage that with
"strict", it was much easier to create a "severe" (internal)
warning, which is enabled by default but suppressible with
C<no warnings "internal";> if people /really/ wanted.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds:
S_ptr_hash() - A new static function in hv.c which can be used to
hash a pointer or integer.
PL_hash_rand_bits - A new interpreter variable used as a cheap
provider of "semi-random" state for use by the hash infrastructure.
xpvhv_aux.xhv_rand - Used as a mask which is xored against the
xpvhv_aux.riter during iteration to randomize the order the actual
buckets are visited.
PL_hash_rand_bits is initialized as interpreter start from the random
hash seed, and then modified by "mixing in" the result of ptr_hash()
on the bucket array pointer in the hv (HvARRAY(hv)) every time
hv_auxinit() allocates a new iterator structure.
The net result is that every hash has its own iteration order, which
should make it much more difficult to determine what the current hash
seed is.
This required some test to be restructured, as they tested for something
that was not necessarily true, we never guaranteed that two hashes with
the same keys would produce the same key order, we merely promised that
using keys(), values(), or each() on the same hash, without any
insertions in between, would produce the same order of visiting the
key/values.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This also changes the link to blog() to an internal one; it remains
broken, but should be documented in this pod, not outside it
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
While assembling the regex, it was was examining CONSTs in the optree
using the wrong pad. When consts are moved into the pad on threaded
builds, segvs might be the result.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
${ var } (and ${ \7LOBAL_PHASE}) were broken by 32833930e. However,
it turns out that the behavior prior to that commit was already
strange:
${ .}; # Legal
${. }; # Illegal
${ . }; # Illegal
${ \7LOBAL_PHASE}; # Legal
${ ^GLOBAL_PHASE}; # Illegal
${^GLOBAL_PHASE }; # Illegal
This commit restores ${ var } and makes all of the above work by
always ignoring spaces on both sides of ${ ... }.
|
| |
|
|
|
|
|
|
|
|
| |
pieces, one in t/op/for.t. Update and sort MANIFEST.
From work done at NY Perl Hackathon by Charlie Gonzalez and Taqqai Karim.
For: RT #116615
|
|
|
|
|
| |
Add test case for this bug, which was actually fixed 6 months ago with
ad9e6ae10fb581c6c053b862286f8e187063c3ab.
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 3283393 replaced the use of isWORDCHAR (\p{Word}) in scan_ident
with isIDFIRST (\p{XIDS}). Generally this was not troublesome, since
there are other places that deal with variables matching \d, but
one use of isWORDCHAR had given digit variables an unintended special
case:
$$1 meant ${$1}, whereas $$@ or $$* were syntax errors.
This commit restores the special case for \p{POSIX_Digit} variables.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
t/lib/common.pl needs to run test files within a subdirectory, and hence
needs change directory into it. Changing a directory poses a problem when
running the tests, because @INC is typically '../lib'. The fix for this had
been to prepend '../../lib' to @INC, which is the correct relative path
while in the subdirectory.
However, the END block changes directory upwards (so that it can delete the
temporary directory), and in the process of deletion may end up lazy-loading
more modules. This will end up searching in ../lib first (ie outside the
build directory), which is wrong, and will cause problems if a directory lib/
exists up one level with files of the expected names (eg a lib/ directory
from a different version of Perl).
Problem identified and diagnosed by Daniel Dragan in RT #116971.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes:
* Length-one identifiers are now restricted to
[\p{XIDS}\p{POSIX_Punct}\p{POSIX_Digit}\p{POSIX_Cntrl}]
plus, if under 'no utf8', the 128 non-ASCII characters in the
Latin1 range.
* Identifiers that start with ASCII letters can be followed with
XIDC characters
(The committer made some small edits in the pod)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Namely:
* The first character in ${...} used to have no restrictions
* ${foo:bar} used to be legal
* ${foo::bar} worked, but ${foo'bar} didn't
And possibly other subtle, so far undiscovered bugs. This was
resolved by simply using the same code for both things.
Note that this commit is not entirely useful on its own; While
tests pass, it requires changes from the following commit to work
entirely.
|
|
|
|
|
| |
Without this, it's possible to hit assertion failures when global destruction
attempts to skip the PVIO for PL_stderrgv while cleaning up all objects.
|
|
|
|
| |
For: RT #117011
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix for RT #116981. If a sub is declared with our, the name is added
to the stash early, and left with a NULL ptr if there's a syntax error
while compiling it.
Since the only time it becomes an issue is when that same name
is used in the same scope after a syntax error, what happens in
the pad is not particularly important. The simple fix is to
simply fall back to treating it like a bareword, and pretending
it was never added to the pad in the first place.
|
|
|
|
|
|
|
|
| |
It was felt that the new COW feature wasn't ready to be enabled be default
in 5.18: principally because too much XS code will assume it can just
manipulate the PVX buffer of an SVf_POK SV.
See RT #116569 for the discussion.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
888a67f6b95603701 added a new test that failed on VMS because it
expected the value of an undefined element in %ENV to be an empty
string, whereas on VMS it's actually a one-byte string containing
a null. This is made possible by the fact that the logical name
API uses strings of known lengths, and made necessary by the fact
that a zero-length value (equivalence name in VMS parlance) is
not allowed.
So patch up the test implementation to handle this special case.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Some 'set' commands in this test are intended to verify that an environment
variable is not set, which causes the command to send a warning message to
stderr.
|
|
|
|
|
|
|
| |
Change 888a67f6b9 added manipulation of __NoNeSuCh2, but it gets
accidentally picked up by the 'set' command looking for __NoNeSuCh in test
157 because 'set' will display the value of *all* variables whose prefix
matches the name given to the command.
|
|
|
|
|
|
|
| |
Craig Berry pointed out that an implementation can have the C locale
give meanings to the above-ASCII code points. (I had thought this was
an error.) Change label name and comments in these .t files
correspondingly.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 569f7fc5d4ec06501b46a72075ff434fe1bf4332 caused this test file
to start failing on VMS. The reason is that the test for locale became
run-time. This patch restores the test to compile time, by using the
'if' module.
The reason 'if' wasn't used in the original patch was to reduce reliance
on possibly untested modules, but it makes things easier. We hope to
get a resolution on p5p on which test groups in the suite can use things
like 'if', but since 5.17.9 is due out momentarily, I'm using 'if' for
now so that VMS will pass its tests again.
|
| |
|
|
|
|
|
|
| |
Leon Timmermans is short of tuits right now, so I added these tests for
his patch. Since I don't really know what I'm doing here, other tests
should eventually be added by someone who does know.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[DELTA]
$Revision: 2.48 $ $Date: 2013/02/18 02:23:56 $
! encoding.pm
t/Mod_EUCJP.pm t/enc_data.t t/enc_eucjp.t t/enc_module.t t/enc_utf8.t
t/encoding.t t/jperl.t
[PATCH] Deprecate encoding.pm
https://rt.cpan.org/Ticket/Display.html?id=81255
! Encode/Supported.pod
Fixed: Pod errors
https://rt.cpan.org/Ticket/Display.html?id=81426
! Encode.pm t/Encode.t
[PATCH] Fix for shared hash key scalars
https://rt.cpan.org/Ticket/Display.html?id=80608
! Encode.pm
Fixed: Uninitialized value warning from Encode->encodings()
https://rt.cpan.org/Ticket/Display.html?id=80181
! Makefile.PL
Install to 'site' instead of 'perl' when perl version is 5.11+
https://rt.cpan.org/Ticket/Display.html?id=78917
! Encode/Makefile_PL.e2x
find enc2xs.bat if it works on windows.
https://github.com/dankogai/p5-encode/pull/7
! t/piconv.t
Fix finding piconv in t/piconv.t
https://github.com/dankogai/p5-encode/pull/6
|