| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes s/// so that it doesn't act destructively on its target.
Instead it returns the result of the substitution (or the original string if
there was no match).
In addition this patch:
* Adds a new warning when s///r happens in void context.
* Adds a error when you try to use s///r with !~
* Makes it so constant strings can be bound to s///r with =~
* Adds documentation.
* Adds some tests.
* Updates various debug code so it knows about the /r flag.
* Adds some new 'r' words to B::Deparse.
|
| |
|
|
|
|
|
|
|
| |
When deparsing a nextstate op that has both a change of package (relative
to the previous nextstate) and a label, the package declaration must be
emitted first, because it is syntactically impermissible for a label to
prefix a package declaration.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An optimisation for %hash in boolean context, as introduced with
867fa1e2da145229b4db2c6e8d5b51700c15f114
could falsely optimise constructs that shoudn't be.
Original bug report and fix suggestion were by Goro Fuji.
Include a test to cover the case which was mis-optimised (although
coverage still seems low to me).
Additionally correct B::Deparse (just swap a line, it was using a
variable before it was defined).
|
|
|
|
| |
(was missing from 0fa4a26596a4646f9aae1dcd199a2f30933e6f01)
|
|
|
|
|
|
|
|
|
|
|
| |
The code was added in 5.11.0 by
2990415a4519bc3988d7224ae15100c3e9e901ee
805b10112885d8868f21f8e860792d65e1e6c19d
but causes a big slowdown on most deparsing, due to the need
to walk the entire package tree looking for constant subs.
For more details, see
[perl #73052] Storable considerably slower at storing coderefs
|
|
|
|
|
|
|
|
|
| |
It's better to just silence it in Deparse rather than stopping
B::PMOP::reflags from returning undef because of a non-constant regexp.
That way, we keep the possibility to test for this situation, and it stays
in line with B::PMOP::pregcomp.
Also bump $B::Deparse::VERSION.
|
|
|
|
| |
And bump the $VERSION.
|
|
|
|
|
|
|
|
|
|
|
| |
An accident of Perl's parser meant that my $pi := 4; was parsed as an empty
attribute list. Empty attribute lists are ignored, hence the above is
equivalent to my $pi = 4; However, the fact that it is currently valid syntax
means that := cannot be used as new token, without silently changing the
meaning of existing code.
Hence it is now deprecated, so that it can subsequently be removed, allowing
the possibility of := to be used as a new token with new semantics.
|
|
|
|
|
|
|
|
|
| |
Part of "[PATCH] Make if (%hash) {} act the same as if (keys %hash) {}"
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-11/msg00432.html
which evolved from the approach described in the subject, to instead add a new
opcode pp_boolkeys, to exactly preserve the existing behaviour.
Plus a $VERSION bump.
|
|
|