| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This new function returns the input property's possible values.
|
|
|
|
| |
Increment $VERSION and add entry to perldelta.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some modules, e.g., POSIX, create constants in the form of references
to immortals in the stash. B::Deparse started croaking on these in
v5.21.6-584-g03b8f76.
$ ./perl -Ilib -MO=Deparse -MPOSIX -e0
Can't locate object method "FLAGS" via package "B::SPECIAL" at lib/B/Deparse.pm line 745.
CHECK failed--call queue aborted.
At the same time I fixed the stash-probing code, I also had to fix
deparsing of \!0, which had the same bug.
|
|
|
|
|
|
|
|
| |
ck_grep calls ck_fun, which sets the lower private bits to indicate
the number of operands. ck_grep usually undoes that, by clobbering
op_private completetly. If an error has occurred, it doesn’t, so we
may fail an assertion if the lower bits are not expected to be set on
mapstart and grepstart.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Hmm. This is not particularly maintainable.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
and also implement the pp functions, though nothing compiles to
these ops yet.
|
| |
|
|
|
|
| |
Extracted from patch submitted by Lajos Veres in RT #123693.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts & amends my v5.21.7-151-gea5519d and Karl Williamson's
v5.21.7-183-g2f3cbe1, the latter was only need because of the
former.
I've also taken the opportunity to fix the long-standing trivial bug
with misaligned code in warnings.{pm,h}. That was easier to commit along
with this than to split it up from the other generated changes.
Why revert this? See the "use warnings 'absolutely-all-almost';" thread
on perl5-porters for the latest summary:
http://www.nntp.perl.org/group/perl.perl5.porters/2015/01/msg225066.html
Basically as I explained in v5.21.7-151-gea5519d the current design of
the API makes it too contentious to freely add new warnings, but there's
no consensus on how to solve that. I.e. whether we should just add them
to "all", or do this change, or several other possible things outlined
in that thread and elsewhere.
Since the deadline for contentious changes for v5.22 is already past us
I'm backing this out for now.
|
|
|
|
| |
The previous commit added a block around this code
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most Unicode files contain versioning information. Prior to this patch,
mktables did not verify that the Unihan inputs were the correct version.
This is in part because we don't usually compile the Unihan properties,
and because the beta files for Unicode 7.0 had the version information
in the same syntax as the rest of the files, so I thought we only had to
wait till 7.0 came out, and we would get the protection automatically
with the code that was already there. But the format changed between
beta and release, so this patch adds code to check for the released
format.
|
| |
|
|
|
|
|
|
| |
This adds an undocumented way to get invmap() to return internal
properties, like invlist(). This is intended only for Perl-core
use.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Move a 'no warnings' statement to earlier in the file, to before the first
possibility of it being needed occurs.
|
| |
|
|
|
|
|
|
|
|
| |
'latin1_to_native' and 'native_to_latin1' actually operate on all code
points, not just the ranges implied by their names. This commit changes
the names to reflect that, to 'uni_to_native' and 'native_to_uni'.
The old names have only been available since 5.21, so there is no
backcompat issue.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By using a different function that is just as applicable, or more so, in
these cases, we can avoid having to require a file.
The functions that translate code points between character sets are
always available and just as appropriate for the uses in the three tests
t/re/fold_grind.t, t/re/reg_fold.t, and lib/unicore/TestProp.pl. Change
to use it instead of the functions that take string inputs. This is
slightly cleaner, as the file that contains it no longer has to be
'required'. And in some of the cases the code point function is a
better choice, as there had to be translation between chr and ord
before.
|
|
|
|
| |
This is a step in the process of adding that subpragma.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Perl debugger sometimes tries to call a non-existent subroutine
db_warn. It's real name is _db_warn, though.
How to replicate:
perl -d -e1
!/
Output:
/bin/bash: /: Is a directory
Undefined subroutine &DB::db_warn called at /usr/lib/perl5/5.18.1/perl5db.pl line 6740.
at /usr/lib/perl5/5.18.1/perl5db.pl line 6740.
DB::_db_system('/bin/bash', '-c', '/') called at /usr/lib/perl5/5.18.1/perl5db.pl line 3923
DB::Obj::_handle_sh_command('DB::Obj=HASH(0x105df48)') called at /usr/lib/perl5/5.18.1/perl5db.pl line 2992
DB::DB called at -e line 1
|
|
|
|
|
|
|
| |
It always reads its argument out the outset and always returns its
target, so there is no reason its target cannot be a lexical. (The
OPpTARGET_MY optimisation makes $lexical = <some op> have the op
write directly to the lexical; the assignment gets optimised away.)
|
|
|
|
| |
By not indentins verbatim text so much, we don't run over 79 columns.
|
|
|
|
|
|
| |
Two of the three uses of this hash want the result to be of the form
"\cX". The other wants "^X". This changes the hash to be the common
substring to all three, and then the proper prefix is added to each.
|
| |
|
|
|
|
| |
This makes ASCII platform-specific code generalized to non-ASCII.
|
|
|
|
|
|
|
|
|
| |
This binary value was being output as just another string, which would
cause the bit patterns that coincidentally coincided with letters to be
output as those. This is not portable to EBCDIC, but outputting it as
\xXX is, which this commit does. I chose to output in hex instead of
octal, as I think that is the more modern thing to do, and it's easier
for me to grok the larger values when they are in hex.
|
|
|
|
|
| |
No other change besides the move is done. This is so the hash can be
used from another place than currently.
|
|
|
|
|
|
|
|
|
| |
We can only do it for <=> under ‘use integer’.
The non-integer <=> will push undef on to the stack. Enabling
the optimisation for it would cause \($lexical = $x <=> "nan") to
leave $lexical with its previous value and return a reference to
&PL_sv_undef.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When someone suggests a new warning on p5p it always often up being
argued about on the basis that it'll break existing code, and that we
shouldn't add warnings for possibly legitimate code just because it's
unusual or odd.
As I pointed out in a discussion about RT #121025 (see [1]) we only keep
having this discussion because until now we've had no facility to add
new warnings outside of the default set that'll be retroactively enabled
for everything that does 'use warnings'. This patch introduces such a
facility.
As a proof of concept I'm adding a warning for something that was added
as a warning in the past, but pulled out because it was deemed too
controversial at the time: warning about the use of grep in void
context.
That warning was added back in v5.10.0-218-g74295f0 but quickly pulled
out in v5.10.0-230-gf5df478. See [2] for the discussion about it at the
time.
Now if you do:
use warnings;
grep /42/, (1,2);
You'll get no warnings as before, but if you do:
use warnings qw(extra); # Or its sole subcategory: void_unusual
grep /42/, (1,2);
You'll get a warning about "Unusual use of grep in void context". To
turn off this warning once you've turned it on it's *not* sufficient to
do:
no warnings;
You need to do:
no warnings qw(pedantic);
Or:
no warnings qw(everything);
I'm willing to change that, but first we should ask ourselves whether
this should continue to remain a symmetric operation:
{use,no} warnings ['all'];
There's more elaboration on how this works in the changes I'm making to
the perldelta and the warnings documentation. But briefly this should be
100% backwards compatible, but allow us to have our cake and eat it too
in the future by adding new warnings without imposing them on existing
code written against older perl versions (unless that code explicitly
requested to get new warnings as they upgrade perl).
The patch to the warnings.pm documentation lays out a backwards
compatibility policy for warnings, we promise that we'll continue the
status quo with the "all" category, but for other categories (including
future additions) we'll make such promises on a per-category basis.
TODO: I wanted to come up with some more general facility for being able
to add these new warnings without altering the behavior of the -w and -W
switches. I.e. now we'll emit this, as intended:
$ ./perl -Ilib -w -e 'grep /42/, (1,2)'
$ ./perl -Ilib -W -e 'grep /42/, (1,2)'
$ ./perl -Ilib -e 'use warnings; grep /42/, (1,2)'
$ ./perl -Ilib -e 'use warnings "extra"; grep /42/, (1,2)'
Unusual use of grep in void context at -e line 1.
I.e. we don't want -w and -W to mean "use warnings 'everything'", it
should continue to mean "use warnings 'all'". But due to how they're
implemented I couldn't find an easy way to generalize this. Right now
I'm just hardcoding an exception to the new warning category I've added
outside "all" for these warnings.
That should be followed-up with a more general solution, but for now if
we only have a few of these catogeries we should be fine.
This patch incorporates work from Andreas Guðmundsson
<andreasg@nasarde.org> who picked up an earlier version of mine and
figured out the change being made to mg.c here. That change removes an
optimization in the ${^WARNING_BITS} magic which might make things a tad
slower.
1. https://rt.perl.org/Ticket/Display.html?id=121025#txn-1276663
2. http://www.nntp.perl.org/group/perl.perl5.porters/2007/12/msg131922.html
|
|
|
|
|
|
|
|
|
|
|
| |
* Make Devel-Peek/t/Peek.t less sensitive to regexp flag changes.
Devel-Peek had flag names and binary representation hardcoded. Flag
names *should* be enough. Otherwise we have to update bits of this
test every time we muck with flags that don't affect the flags being
tested.
* Let B::Deparse know about the new RXf_PMf_CHARSET shift value.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This resulted in an infinite loop:
sub optplus(;+) {}
optplus($a < $b);
The prototypes ;$ _ ;_ had the wrong predecence, causing foo($a<$b) to
be deparsed wrongly, without the parentheses.
|