| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This bug was spotted by Tom Christiansen, but no bug report has been
written. /[[:ascii:]]/i should match the same set of code points as
/\p{ASCII}/i. But it is matching things outside the ASCII range
|
| |
|
|
|
|
|
|
| |
Applied patch from John Peacock, but added whitespace fixes,
corrected pod link error and updated known Pod issues to reflect
a fix.
|
|
|
|
|
| |
The format added in commit 3ea0c581844689ab had a typo - %cn (committer
name) used instead of %ce (committer e-mail).
|
|
|
|
|
|
| |
This commit delivers the official Unicode character database files for
release 6.1, plus the final bits needed to cope with the changes in them
from release 6.0, including documentation.
|
|
|
|
| |
by mortalising the temporary SVs.
|
|
|
|
| |
This reverts commit 497f7de2d964167330f7260590736e9adb18899c.
|
|
|
|
| |
Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
|
| |
|
|
|
|
|
| |
Add dot to end of message from Carp, to match the formatting from
CORE::die. The stack trace, coming after the message, is unchanged.
|
| |
|
|
|
|
|
|
| |
Some of the discussion in perlxs was duplicated in perlxstypemap.
This also adds several references to the new man page and fixes
a few minor nits.
|
| |
|
| |
|
|
|
|
| |
This is the paranoid version of just using $>.
|
|
|
|
| |
This adds tests for commit b36bf33f6564c3e9a9ff131f4f3c9980b7a8af15
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Along with the simple_casefolding and full_casefolding features.
fc() stands for foldcase, a sort of pseudo case (like lowercase),
which is used to implement Unicode casefolding. It maps a string
to a form where all case differences are erased, so it's a
locale-independent way of checking if two strings are the same,
regardless of case.
This functionality was, and still is, available through the
regular expression engine -- /i matches would use casefolding
internally. The fc keyword merely exposes this for easier access.
Previously, one could attempt to case-insensitively test two strings
for equality by doing
lc($a) eq lc($b)
But that might get you wrong results, for example in the case of
\x{DF}, LATIN SMALL LETTER SHARP S.
|
|
|
|
| |
It doesn't do anything yet.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A simple my($foo,$bar) list is flagged as an lvalue:
$ ./perl -Ilib -MO=Concise -e 'my($foo,$bar)'
7 <@> leave[1 ref] vKP/REFC ->(end)
1 <0> enter ->2
2 <;> nextstate(main 1 -e:1) v:{ ->3
6 <@> list vKPM/128 ->7
3 <0> pushmark vM/128 ->4
4 <0> padsv[$foo:1,2] vM/LVINTRO ->5
5 <0> padsv[$bar:1,2] vM/LVINTRO ->6
-e syntax OK
That 128 that the list op is the same flag as LVINTRO.
When a method call is compiled, the list op for the argument list is
itself converted into an entersub op. That LVINTRO flag is never
turned off. So foo->bar(my($foo,$bar)) becomes this:
$ ./perl -Ilib -MO=Concise -e 'foo->bar(my($foo,$bar))'
9 <@> leave[1 ref] vKP/REFC ->(end)
1 <0> enter ->2
2 <;> nextstate(main 1 -e:1) v:{ ->3
8 <1> entersub[t4] vKMS/LVINTRO,TARG ->9
3 <0> pushmark sM/128 ->4
4 <$> const[PV "foo"] sM/BARE ->5
5 <0> padsv[$foo:1,2] lM/LVINTRO ->6
6 <0> padsv[$bar:1,2] lM/LVINTRO ->7
7 <$> method_named[PV "bar"] ->8
-e syntax OK
This was rarely a problem until commit da1dff948 added lvalue check-
ing for method calls (a fifth bug fix in that commit not mentioned in
the commit message).
Calling the method will now result in ‘Can't modify non-lvalue subrou-
tine call’ unless the method has the :lvalue attribute.
Before that, this would only cause problems with lvalue methods:
$ perl -le '
sub clear_queue:lvalue { warn "called"; undef }
3==main->clear_queue(my ($id, $name))
'
called at -e line 2.
Can't return undef from lvalue subroutine at -e line 3.
Calling it with ($id, $name) was fine, and allowed undef to
be returned.
Perl_localize in op.c (which is called for my, our and local)
calls my() (aka Perl_my_attrs) on the list itself for my or our.
Perl_my_attrs was setting flags on the list, not just on its children.
So this commit modifies my_attrs not to set any flags on the list
op itself.
local() was not affected, as it goes through op_lvalue_flags instead
of my_attrs, and op_lvalue_flags doesn’t set flags on list ops (I
mean ops of type OP_LIST, not listops in general). I added tests for
it anyway.
|
|
|
|
|
|
| |
We had a fencepost error when ANCH_MBOL was enabled that meant we
did not "see" matches at the end of string. This fixes the problem
and adds tests.
|
|
|
|
| |
executed too early
|
|
|
|
|
| |
Follow-up to 8db8f6b697e6f, where new tests were added without
changing the (implicit) skip count of 1.
|
|
|
|
|
|
| |
Those will be equivalent to (_;@) and (_;%) ; since perlsub already
states that the semicolon is redundant before @ and % this is in
line with the existing documentation.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Various magical modules copy hints from one scope to another. But
copying ${^WARNING_BITS} doesn’t always copy the same hints. If lexi-
cal warnings are not on at all, ${^WARNING_BITS} returns a different
value depending on the current value of $^W. Setting ${^WARNING_BITS}
to its own value when $^W is true will stop $^W from being able to
control the warnings in the current compilation scope. Setting
${^WARNING_BITS} to its own value when $^W is false causes even
default warnings to be suppressed.
This commit makes undef a special value that represents the default
state, in which $^W controls warnings.
|
|
|
|
|
|
| |
This is something that my sample patch in ticked #108780 (for
fixing /foo$qr/ under ‘no overloading’) would have broken had it
been applied.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This reverts commit 5fa409a90f64110c5708f7141b376e9bdc54fbe2.
Resolved by update of Pod-Parser to version 1.51
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the constant is a string (POK), we dump it using pv_pretty, to
properly escape non-printable characters. This also improves detection
of utf-8 encoding in the constant to be printed. Also, this patch
streamlines the tests for the type and value of that constant.
Potential backwards-compatibility issues : if the constant is a string
it will now be enclosed in double quotes, like this :
Useless use of a constant ("a") in void context
instead of
Useless use of a constant (a) in void context
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Up till now, -t was popping too much off the stack when stacked with
other filetest operators.
Since the special use of _ doesn’t apply to -t, we cannot simply have
it use _ when stacked, but instead we pass the argument down from the
previous op.
To facilitate this, the whole stacked mechanism has to change.
As before, in an expression like -r -w -x, -x and -w are flagged
as ‘stacking’ ops (followed by another filetest), and -w and -r are
flagged as stacked (preceded by another filetest).
Stacking filetest ops no longer return a false value to the next op
when a test fails, and stacked ops no longer check the truth of the
value on the stack to determine whether to return early (if it’s
false).
The argument to the first filetest is now passed from one op to
another. This is similar to the mechanism that overloaded objects
were already using. Now it applies to any argument.
Since it could be false, we cannot rely on the boolean value of the
stack item. So, stacking ops, when they return false, now traverse
the ->op_next pointers and find the op after the last stacked op.
That op is returned to the runloop. This short-circuiting is proba-
bly faster than calling every subsequent op (a separate function call
for each).
Filetest ops other than -t continue to use the last stat buffer when
stacked, so the argument on the stack is ignored.
But if the op is preceded by nothing other than -t (where preceded
means on the right, since the ops are evaluated right-to-left), it
*does* use the argument on the stack, since -t has not set the last
stat buffer.
The new OPpFT_AFTER_t flag indicates that a stacked op is preceded by
nothing other than -t.
In ‘-e -t foo’, the -e gets the flag, but not in ‘-e -t -r foo’,
because -r will have saved the stat buffer, so -e can just use that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
newATTRSUB requires the sub name to be passed to it wrapped up in
a const op.
Commit 8756617677dbd allowed it to accept a GV that way, since
S_maybe_add_coresub (in gv.c) needed to pass it an existing GV not in
the symbol table yet (to simplify code elsewhere).
This had the inadvertent side-effect of making the GV read-only, since
that’s what the check function for const ops does.
Even if we were to call this a feature, it wouldn’t make sense as
implemented, as GVs for non-ampable (&-able) subs like *CORE::chdir
were not being made read-only.
This commit adds a new flag to newATTRSUB, to allow a GV to be passed
as the o parameter, instead of an op. While this may look as though
it’s undoing the simplification in commit 8756617677dbd by adding
more code, the new code is still conceptually simpler and more
straightforward.
Since newATTRSUB is in the API, I had to add a new _flags variant.
(How did newATTRSUB get into the API to begin with?)
In adding a test, I also discovered that ‘used once’ warnings
were applying to these subs, which is obviously wrong. Commit
8756617677dbd caused that, too, as it was relying on the side-effect
of newATTRSUB doing a GV lookup.
This fixes that, too, by turning on the multi flag in
S_maybe_add_coresub.
|
| |
|
|
|
|
|
| |
Since the test triggered another bug in freeing read-only
regexps, this commit fixes that too.
|
|
|
|
|
| |
Otherwise we get assertion failures and possibly corrupt
string tables.
|
|
|
|
|
| |
Now BEGIN blocks, etc., are called in void context, so the result of
evaluating the last statement is not wastefully copied.
|
|
|
|
|
|
| |
I completely forgot about do-file when, in commit f45b078d2, I stopped
eval from localising hints at run time. The result was that warning
hints were propagating into do-file.
|
| |
|
|
|
|
|
| |
This adds the parameter handling, tests, and documentation for this new
feature which allows locale and Unicode to play well with each other.
|
| |
|
|
|
|
|
|
| |
If the target of a symlink has a version number in the symlink,
that makes the symlink implementation unable to locate it, so
trim off the version.
|
|
|
|
|
|
|
|
|
| |
Statting an existing file used to prevent a subsequent stat(*unopened)
from warning if the GV happened to have no IO. If the GV *did* have
an IO, but an unopened one, it *would* warn.
This inconsistency was introduced in 5.10.0 with commit 5228a96c60
(which was also backported to 5.8.9).
|
|
|
|
|
|
|
|
| |
stat _ was producing an erroneous warning about an unopened filehandle
with _. But _ isn’t a real filehandle and is special-cased, so it
shouldn’t warn.
See also commit 8080e3c8.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These were removed when things were very broken, but now they work,
except for things like
"\N{LATIN SMALL LIGATURE FFI}" =~ /[a-z]{3}/i
where the multi-char fold crosses single bracketed character class
boundaries. These will probably never be fixed in Perl in the general
case (using \F and fc() instead), but I expect that
"\N{LATIN SMALL LIGATURE FFI}" =~ /[f][f][i]/i
will eventually be changed so the brackets are optimized away, and will
work. Then these TODOs will start passing.
|