| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Whitespace corrections; update perldelta.
For: RT #121671
|
|
|
|
|
|
|
|
|
|
| |
[DELTA]
$Revision: 2.67 $ $Date: 2014/12/04 20:13:00 $
! t/taint.t
Now skips nonexistent methods like Encode::Detect->encode() should
that be installed. This resolves RT#100105.
https://rt.cpan.org/Ticket/Display.html?id=100105
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$ perl5.20.1 -mO=Deparse,-l -e 'format =' -e\@ -e'$foo' -e.
format STDOUT =
@
$foo
.
-e syntax OK
$ ./perl -Ilib -mO=Deparse,-l -e 'format =' -e\@ -e'$foo' -e.
format STDOUT =
@
#line 3 "-e"
; $foo
.
-e syntax OK
The second is not valid syntax.
I probably broke that when fixing BEGIN blocks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$ ./perl -Ilib -MDevel::Peek -Mfeature=:all -Xle 'my sub f; Dump \&f'
SV = IV(0x7fd7138312b0) at 0x7fd7138312c0
REFCNT = 1
FLAGS = (TEMP,ROK)
RV = 0x7fd713831b90
SV = PVCV(0x7fd7138303d0) at 0x7fd713831b90
REFCNT = 2
FLAGS = (CLONED,DYNFILE,NAMED,LEXICAL)
COMP_STASH = 0x7fd713807ce8 "main"
ROOT = 0x0
NAME = "f"
FILE = "-e"
DEPTH = 0
FLAGS = 0x19040
OUTSIDE_SEQ = 187
PADLIST = 0x7fd7134067e8
PADNAME = 0x7fd713411f88(0x7fd713406d48) PAD = 0x7fd713807e68(0x7fd71340d2f8)
OUTSIDE = 0x0 (null)
SV = 0
That final ‘SV = 0’ is very confusing!
|
|
|
|
|
|
|
|
|
|
| |
Instead of sometimes appending ; to statements and then removing it
later, to avoid doubling it up, *only* append ; to a statement when
actually joining them together or emitting them. That fixes bugs with
do{$;} becoming do {$} and ‘$_=$;; $;=7;’ becoming ‘$_=$; $;=7;’.
I also removed the boilerplate from pp_stub, since it was redundant
(and slow) and also partially wrong. The $name var was bogus.
|
|
|
|
| |
added in d4f1bfe749f, which got merged before the PADNAME changes.
|
|
|
|
|
| |
In 4b1385ee6 I did not realise we already had \cK, which served almost
the same purpose.
|
|
|
|
|
| |
Basically I missed a spot in 812e68ff314e, so the escaped space
in [foo^_bar], for example, was not translated correctly.
|
|
|
|
|
| |
and check that checksum in t/porting/regen.t. This makes the tests
run faster.
|
|
|
|
|
| |
and check that checksum in t/porting/regen.t. This makes the tests
run faster.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This code deparses incorrectly under taint mode:
$ ./perl -Ilib -mO=Deparse -e '$x =~ (1?/$a/:0)'
$x =~ ($_ =~ /$a/);
-e syntax OK
$ ./perl -Ilib -mO=Deparse -T -e '$x =~ (1?/$a/:0)'
$x =~ /$a/;
-e syntax OK
The branch folding makes it deparse as ‘$x =~ /$a/’, whereas the /$a/
on the rhs, since it was not the argument to =~, is bound to $_, not
to $x. That’s why B::Deparse adds the $_ =~, but it fails to do so
under taint mode.
It was broken by:
commit 7fb31b92fa6bf56dff7d4240b7051b9158f7df43
Author: David Mitchell <davem@iabyn.com>
Date: Sun Apr 1 10:21:22 2012 +0100
make OP_REGCRESET only for taint handling
The OP_REGCRESET op, which is sometimes prepended to the chain of ops
leading to OP_REGCOMP, currently serves two purposes; first to reset the
taint flag, and second to initialise PL_reginterp_cnt. The second purpose
is no longer needed, and the first has a bug, in that the op isn't
prepended when "use re 'eval'" is in scope.
Fix this by prepending the op solely when PL_tainting is in effect.
This also makes run-time regexes slightly more efficient in the
non-tainting case.
which has a typo in it.
|
|
|
|
| |
For: RT #122987 (second part)
|
|
|
|
| |
For: RT #122987 (first part)
|
|
|
|
| |
For: RT #122986
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Formerly, list slice would return an empty list if all the indices
fell outside the actual list, but would return ‘undef’ for every index
specified if but one of them fell within the list.
This was not implemented according to the original design, according
to which list slice would give an empty list (for a non-zero number of
indices) only if the list on the left-hand side were empty.
This commit rectifies that. See ticket #114498 for the discussion.
|
|\
| |
| |
| |
| |
| | |
The actual ops that make up the code blocks are now deparsed.
B::Deparse no longer uses the stringified form stored in the regexp.
This fixes a few bugs. See the individual commits for details.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before, s/$a(?{die})// would deparse like this:
s/${a}do {
die
}(?{die})//;
Now it deparses correctly.
|
| |
| |
| |
| |
| | |
Both callers were doing $op->first->sibling, so just have code_list
do that itself.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before, this:
/$a(?{ die $b; })/;
qr/$a(?{ die $b; })/;
would deparse as this:
/${a}do {
die $b
}(?{ die $b; })/;
qr/sub : lvalue {
$a, do {
die $b
}, '(?{ die $b; })'
}
->()/;
Now it deparses correctly.
|
| |
| |
| |
| |
| |
| |
| |
| | |
The blocks themselves are now deparsed, rather than the original strings
being emitted. This fixes problems with newlines turning into \n and
here-docs missing their bodies. It only applies to compile-time patterns.
Run-time patterns (with variables interpolated outside the code blocks)
are still unfixed and deparse with do{...} embedded in the pattern.
|
| |
| |
| |
| |
| |
| | |
The line break gets removed when it is extracted from the __DATA__
section, and then it gets wrapped in sub{$input}. That breaks
here-docs.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a preliminary patch that only applies when there are no varia-
bles interpolated into the pattern outside of the code blocks.
The code blocks are now actually deparsed, instead of the stringified
form just being reproduced. This means the \n bug is gone:
Before:
$ ./perl -Ilib -mO=Deparse -e '{ qr/aaaaa\\\\\\(?{;' -e '$y})' -e '/}'
{
qr/aaaaa\\\\\\(?{;\n\$y})\n/;
}
-e syntax OK
After:
$ ./perl -Ilib -mO=Deparse -e '{ qr/aaaaa\\\\\\(?{;' -e '$y})' -e '/}'
{
qr/aaaaa\\\\\\(?{ $y; })\n/;
}
-e syntax OK
You can see the \n translation now happens only outside of the block.
It also means here-docs work:
Before:
$ ./perl -Ilib -mO=Deparse -e 'qr/(??{<<END})/' -efoo -eEND
qr/(??{<<END})/;
-e syntax OK
(The output is a syntax error.)
After:
$ ./perl -Ilib -mO=Deparse -e 'qr/(??{<<END})/' -efoo -eEND
qr/(??{ "foo\n"; })/;
-e syntax OK
|
|/
|
|
|
|
|
| |
Currently we have various bugs:
• Line breaks often come out as \n, changing the meaning.
• Some blocks are doubled up with do{...} for the first instance.
• qr/sub { .... }/ madness
|
|
|
|
|
|
| |
Apparently anything =~ y///r with the /r never deparsed properly (just
the lhs deparsed) until 05a502dc, when lexicals on the lhs started
being emitted.
|
|
|
|
| |
I broke this in 05a502dc.
|
| |
|
|
|
|
| |
based on https://rt.perl.org/Ticket/Display.html?id=40565#txn-1321149
|
|
|
|
|
|
|
|
| |
Several SAVEt_* types were giving the SVs the wrong reference counts
in ss_dup, causing child process to lose SVs too soon.
See <https://rt.perl.org/Ticket/Display.html?id=40565#txn-1180404>
and <https://rt.perl.org/Ticket/Display.html?id=40565#txn-1277127>.
|
| |
|
|
|
|
|
|
| |
Code point 255 was being omitted in the translation. It's better to use
the macro (that has it correctly) and avoid a redundant copy of the
test.
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the auto-generated Makefile.PL for Pod::Checker raises a
warning with MakeMaker, since the abstract in the pod isn't parseable.
Also, the package's own Makefile.PL doesn't work with blead (I didn't
exactly understand what the issue was, but porting/dual_lift.t complained
about missing utilities).
So the most expedient hack is to special-case the ABSTRACT in make_ext.pl.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was removed a year ago, but it causes problems with
ABSTACT and ABSTACT_FROM; since there isn't an IO/Compress.pm
file. make_ext.pl special-cases Makefile.PL to get the abstract
from IO/Compress/Base.pm; but MakeMaker looks for, and fails to
find, 'IO::Compress - ...' in the pod for that file,and prints an error.
Rather than more special-casing, it's easier to just restore the
distribution's Makefile.PL, which already contains the correct
'ABSTRACT => ...' entry.
|
|
|
|
|
|
|
|
|
| |
[DELTA]
0.34 2014/12/03 00:04:56
[BUGFIXES]
* Don't select() for read-readiness when waiting for non-blocking
connect() because it upsets VMS (RT100654)
|
|
|
|
|
|
|
|
|
| |
[DELTA]
$Revision: 2.66 $ $Date: 2014/12/02 23:30:34 $
! bin/enc2xs
Resolved RT#100656: enc2xs -C fails if URL::Encode::XS is installed
https://rt.cpan.org/Ticket/Display.html?id=100656
|
|
|
|
|
|
|
|
|
|
|
|
| |
These functions have been deprecated outside of MakeMaker for
many years, but due to the complicated inheritance situation
in EUMM have been difficult to get rid of because sometimes the
File::Spec versions would get called when we thought we were
calling the MakeMaker versions. As of MakeMaker 7.04, the last
call to the File::Spec version of fixpath is gone, so we can
finally remove these from File::Spec.
And bump PathTools versions once again.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ideally you should be able to do
(Configure && make test) 2> /tmp/err
with /tmp/err being empty. This is not the case, and this commit
is a first step towards that goal.
The
fprintf (stderr, "Sizeof time_t = %ld\n", sizeof (time_t));
in Configure appears to be just a debugging aid; it's also a copy of the
code in Porting/timecheck.c, which people can always run if need-be.
hints/linux.sh appears to be looking for symbols in libdb.so; if the
library is stripped, this produces to stderr:
/bin/nm: /lib/libdb.so: no symbols
I've silenced it for now with a 2>/dev/null, but I'm not sure if the whole
test is flawed, since with no symbols, 'nm libdb.so | grep pthread' is a
no-op.
make_patchnum.pl, when running backticks, prints $? to stderr if it's
non-zero; since a similar print in the other branch is already commented
out, I assume its just left-over debugging.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some test files use File::Temp in such a way that the temporary files and
directories under /tmp aren't deleted at the end. On a smoker system, this
can gradually accumulate thousands of entries under /tmp.
The general culprits fixed by this commit are:
1) using tempfile() without the UNLINK => 1 argument;
2) Using Test::More (which uses Test::Stream), which creates a test
directory in such a way that only the original parent thread will
remove it; for some reason I still don't fully understand, detaching a
thread rather than joining it stops this clean up happening. In the
affected test files, I replaced the ->detach() with a ->join() just
before exit, and the problem went away.
Some tests under cpan/ are still leaky; these will be addressed upstream.
|
|
|
|
| |
-dont compute GvSV multiple times
|
| |
|
|
|
|
|
|
| |
//server/sharename is used for Win32 shares on cygwin
bump version, synchronizing across all of PathTools.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was done by adding new OP_METHOD_REDIR and OP_METHOD_REDIR_SUPER optypes.
Class name to redirect is saved into METHOP as a shared hash string.
Method name is changed (class name removed) an saved into op_meth_sv as
a shared string hash.
So there is no need now to scan for '::' and calculate class and method names
at runtime (in gv_fetchmethod_*) and searching cache HV without precomputed hash.
B::* modules are changed to support new op types.
method_redir is now printed by Concise like (for threaded perl)
$obj->AAA::meth
5 <.> method_redir[PACKAGE "AAA", PV "meth"] ->6
|
|
|
|
|
| |
In non-DEBUGGING builds it would be replaced with nothing, producing
a syntax error
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
See
<CACmk_tvkTETxz2eFc-bJfXEhWRjAexuvv4zw4Z036OJHpWfXVA@mail.gmail.com>
and <20141202004047.10267.qmail@lists-nntp.develooper.com>.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was no way to get from a PMOP to its regexp object under non-
threaded builds. The threaded pmoffset field was exposed, but not its
non-threaded counterpart.
I implemented pmregexp in terms of PM_GETRE (which uses op_pmoffset
with threads and op_pmregexp without), so it works under threads, too.
It’s easier than conditionally using the regex_padav to get at things
like this:
$ ./perl -Ilib -MB -e 'use O "Concise", B::regex_padav->ARRAYelt(B::svref_2object(sub {qr/(??{})/})->ROOT->first->first->sibling->pmoffset)->qr_anoncv->object_2svref'
B::Concise::compile(CODE(0x7f8e9185ba08))
2 <1> leavesub[1 ref] K/REFC,1 ->(end)
1 </> qr() P/RTIME ->2
- <@> list K ->-
- <0> pushmark s ->-
- <1> null sK*/1 ->-
- <1> ex-scope sK ->(end)
- <0> stub s ->(end)
- <$> const(PV "(\077?{})") s ->-
-e syntax OK
With pmregexp, it is ‘only’:
$ ./perl -Ilib -MB -e 'use O "Concise", B::svref_2object(sub {qr/(??{})/})->ROOT->first->first->sibling->pmregexp->qr_anoncv->object_2svref'
|