| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
test added.
This example hacks outside environment:
package My::Controller;
use strict;
sub jopa { return "jopa\n"; }
package main;
use Safe;
my $s = new Safe;
my $ok = $s->reval(q{
package My::Controller;
sub jopa { return "hacked\n"; }
My::Controller->jopa();
});
print My::Controller->jopa();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
HvNAME_get() can return NULL, and strNE() wants non-null args.
[
As a side note: on debugging builds this line
if (strNE(HvNAME_get(hv),"main")) {
macro-expands into an 18,000 character line (!) due to the fact that
HvNAME_get() is quite a big expansion under debugging, and strNE expands to
strlen, which under gcc expands to a huge macro (which is mainly lots of
different compile-time alternatives depending on which of its args are
constants), that references its args several times.
]
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This single op can, in some circumstances, replace the sequence of a
pushmark followed by one or more padsv/padav/padhv ops, and possibly
a trailing 'list' op, but only where the targs of the pad ops form
a continuous range.
This is generally more efficient, but is particularly so in the case
of void-context my declarations, such as:
my ($a,@b);
Formerly this would be executed as the following set of ops:
pushmark pushes a new mark
padsv[$a] pushes $a, does a SAVEt_CLEARSV
padav[@b] pushes all the flattened elements (i.e. none) of @a,
does a SAVEt_CLEARSV
list pops the mark, and pops all stack elements except the last
nextstate pops the remaining stack element
It's now:
padrange[$a..@b] does two SAVEt_CLEARSV's
nextstate nothing needing doing to the stack
Note that in the case above, this commit changes user-visible behaviour in
pathological cases; in particular, it has always been possible to modify a
lexical var *before* the my is executed, using goto or closure tricks.
So in principle someone could tie an array, then could notice that FETCH
is no longer being called, e.g.
f();
my ($s, @a); # this no longer triggers two FETCHES
sub f {
tie @a, ...;
push @a, 1,2;
}
But I think we can live with that.
Note also that having a padrange operator will allow us shortly to have
a corresponding SAVEt_CLEARPADRANGE save type, that will replace multiple
individual SAVEt_CLEARSV's.
|
|
|
|
|
|
| |
This will be used for cloning a ‘my’ sub on scope entry.
I was going to use pp_padcv for this, but it would end up having a
top-level if/else.
|
|
|
|
|
| |
This will be used for introducing ‘my’ subs on scope entry, by turning
off the stale flag.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
After much alternation, altercation and alteration, __SUB__ is
finally here.
|
|
|
|
|
|
|
|
|
|
| |
This stops PL_curstash from pointing to a freed-and-reused scalar in
cases like ‘package Foo; BEGIN {*Foo:: = *Bar::}’.
In such cases, another BEGIN block, or any subroutine definition,
would cause a crash. Now it just happily proceeds. newATTRSUB and
newXS have been modified not to call mro_method_changed_in in such
cases, as it doesn’t make sense.
|
|
|
|
| |
&CORE::foo subs will use this operator for sorting out @_.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
6a077020aea1c5f0 extended the OP_AELEMFAST optimisation to lexical arrays.
Previously OP_AELEMFAST was only used as an optimisation for OP_GV, which is a
PADOP/SVOP.
However, by reusing the same opcode, and signalling (pad) lexical vs package,
it introduced a myriad of special cases, because OP_PADAV is a BASEOP (not a
PADOP), whilst OP_AELEMFAST is a PADOP/SVOP (which is larger).
Using two OP numbers allows each variant to have the correct OP flags in
PL_opargs. Both can continue to share the same C code.
|
|
|
|
|
|
|
|
|
| |
# New Ticket Created by (Peter J. Acklam)
# Please include the string: [perl #81882]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=81882 >
Signed-off-by: Abigail <abigail@abigail.be>
|
|
|
|
|
| |
Core-only modules that have changed from v5.13.7, and dual-life modules
that have changed from v5.13.7 and didn't show up in earlier passes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Trivial changes to fix warnings of types
* unclear precedence
* assignment as conditional
* signed/unsigned mixing
* unused parameter/variable
* value computed not used
* wrong argument type for a printf format
* variable may be used uninitialised (due to unhandled switch case)
|
|
|
|
| |
This will fail if there are untagged ops.
|
|
|
|
|
| |
Convert a loop with a die into regular tests. Don't declare lexicals ahead of
use. Don't even declare a lexical @o3, which isn't used.
|
|
|
|
| |
The tests (including the still-TODO) mostly date from 1996.
|
|
|
|
| |
The ops are the recently-introduced reach, rvalues, rkeys and transr.
|
|
|
|
| |
This commit brought to you by the campaign for elimination of strlen().
|
|
|
|
|
|
|
|
|
| |
Change op_names_init() to use memset() rather than a longhand loop, and to
call put_op_bitspec() with an explicit length by using STR_WITH_LEN().
As all calls to put_op_bitspec() now pass in a length, remove the code to call
strlen() if the passed-in length is zero.
This commit brought to you by the campaign for elimination of strlen().
|
| |
|
| |
|
|
|
|
|
|
|
| |
Brought to you by the Campaign for the Elimination of strlen().
(And the elimination of accidental bugs due to typos in lenghts of constants,
and the elimination of abuse of boolean constants for parameters with more than
2 values.)
|
|
|
|
|
|
|
|
|
|
|
| |
Thread was "[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
but the implementation evolved from the approach described in the subject, to
instead add a new opcode pp_boolkeys, to exactly preserve the existing
behaviour.
Various conflicts with the passage of time resolved, 'register' removed, and a
$VERSION bump.
|
|
|
|
|
|
|
|
|
|
|
| |
Inspired by, and in parts borrows from, Schwern's branch on github, but takes a
slightly different approach in places.
Not quite perfect yet - ext/File-Glob still runs from t, at least one FIXME
needs fixing, and the changes to dual-life modules' tests need to be filtered
back upstream, and possibly modified to suit their respective authors.
But it works.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
since 5.8.8, ready for merging into maint-5.8 prior to 5.8.9.
(Many (all?) of these should really have been changed prior to
5.10.0, but better late than never.)
Also modify cmpVERSION.pl to skip uninstalled test modules whose
VERSIONs don't really matter.
p4raw-id: //depot/perl@34365
|
|
|
| |
p4raw-id: //depot/perl@34222
|
|
|
| |
p4raw-id: //depot/perl@33503
|
|
|
|
|
|
| |
Message-ID: <47B60D72.50708@profvince.com>
Date: Fri, 15 Feb 2008 23:08:50 +0100
p4raw-id: //depot/perl@33356
|
|
|
| |
p4raw-id: //depot/perl@33238
|
|
|
| |
p4raw-id: //depot/perl@33236
|
|
|
|
|
| |
version (from 5.8.8 upwards)
p4raw-id: //depot/perl@33170
|
|
|
| |
p4raw-id: //depot/perl@33124
|
|
|
| |
p4raw-id: //depot/perl@33096
|
|
|
|
|
| |
compatible with older perls)
p4raw-id: //depot/perl@33093
|
|
|
| |
p4raw-id: //depot/perl@33072
|
|
|
|
|
| |
Exterminate! Exterminate! Exterminate!
p4raw-id: //depot/perl@33052
|
|
|
|
|
|
| |
Documentation needed, FIXME for proper 64 bit support of arrays longer
than 2**32, re-order the new ops at the end if merging to 5.10.x.
p4raw-id: //depot/perl@32680
|
|
|
| |
p4raw-id: //depot/perl@32597
|
|
|
| |
p4raw-id: //depot/perl@32103
|
|
|
|
|
| |
to Safe compartments
p4raw-id: //depot/perl@32102
|