| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This was an omission on my part.
This should perhaps be an error, but I am just following what
‘use re’ already does with ‘use re "whatever"’.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If
@UNIVERSAL::ISA = "a";
and
@a::ISA = "b";
then methods are searched for in these orders:
main UNIVERSAL a b
UNIVERSAL a b UNIVERSAL a b
a b UNIVERSAL a b
b UNIVERSAL a b
For method lookup, looking at a stash twice causes no problems (except
for a SUPER bug I’ve just found--to be dealt with separately).
My fix to next::method in a5cd004 which made it do a second pass with
UNIVERSAL the way gv_fetchmeth does did not take into account that it
might return its caller (sub a::foo { return shift->next::can }),
causing an infinite loop.
This patch makes it check, on the second pass, whether each stash is
the stash at the start of the MRO list and breaks if that is the case,
so the MROs are effectively:
main UNIVERSAL a b
UNIVERSAL a b
a b UNIVERSAL
b UNIVERSAL a
(which is what they are effectively already for method lookup).
|
| |
|
|
|
|
|
| |
This commit makes next::method retry with UNIVERSAL if it reaches the
end of the MRO list.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this patch:
$ ./perl -we 'sub A () {1}; if (0) {my $foo = A or die}'
$ ./perl -we 'sub A () {1}; if (0) {my $foo = 1 or die}'
Found = in conditional, should be == at -e line 1.
Since the value of a constant may not be known at the time the program
is written, it should be perfectly acceptable to do a constant assign-
ment in a conditional.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This is a signedness problem that ffe0bb5ab did not take into account.
(STRLEN)-10 > 0 returns true for me.
|
|
|
|
|
| |
As mentioned in the RT ticket, ac56e7d did not take PERLDB_NOOPT
into account.
|
|
|
|
|
|
| |
Socket (pulled in via IO::Socket)
Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
|
|
|
|
| |
Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
|
|
|
|
| |
Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
|
|
|
|
| |
Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
|
| |
|
|
|
|
|
|
| |
Change the numeric test IDs to meaningful names. Provide the names as test
descriptions. Describe the purpose of the second test. Only output the line
numbers if the tests fail. Swap from an explicit plan to done_testing().
|
|
|
|
|
| |
(I keep forgetting this.) Change the four occurrences in the new custom
op tests to UVxf with a PTR2UV around the pointer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When perlio flushes down to the unix layer, it can introduce a
spurious record boundary when writing to a record-oriented file.
Perl may create such files when doing edit-in-place or any other
context where the file format is inherited from a previous
version of the file.
The problem can be eliminated by enabling line buffering on such
files when they are opened. This was a regression in 5.10.0 since
before that stdio's buffering performed the same function.
N.B. Lines longer than the size of the perlio buffer will still
result in multiple records -- a larger buffer may be necessary.
For more details and discussion see:
http://www.nntp.perl.org/group/perl.vmsperl/2010/11/msg15419.html
Thanks to Martin Zinser for the problem report.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the custom op registrations from two separate hashes to one hash
holding structure pointers, and add API functions to register ops and
look them up. This will make it easier to add new properties of custom
ops in the future. Copy entries across from the old hashes where
necessary, to preserve compatibility.
Add two new properties, in addition to the already-existing 'name' and
'description': 'class' and 'peep'. 'class' is one of the OA_*OP
constants, and allows B and other introspection mechanisms to work with
custom ops that aren't BASEOPs. 'peep' is a pointer to a function that
will be called for ops of this type from Perl_rpeep.
Adjust B.xs to take account of the new properties, and also to give
custom ops their registered name rather than simply 'custom'.
|
| |
|
|
|
|
| |
It wrongly had #ifdef USE_ITHREADS, which should have been #ifdef MULTIPLICITY.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert sv_eq_flags() and sv_cmp_flags() to use it.
Previously, to compare two strings of characters, where was was in UTF-8, and
one was not, you had to either:
1: Upgrade the second to UTF-8
2: Compare the resulting octet sequence
3: Free the temporary UTF-8 string
or:
1: Attempt to downgrade the first to bytes. If it can't be, they aren't equal
2: Else compare the resulting octet sequence
3: Free the temporary byte string
Which for the general case involves a malloc()/free() and at least two O(n)
scans per comparison.
Whereas this approach has no allocation, a single O(n) scan, which terminates
as early as the best case for the second approach.
|
|
|
|
|
|
|
|
|
| |
Attached patch fixes the following warning from 'make test':
ext/XS-APItest/t/overload...................................."my"
variable $got masks earlier declaration in same scope at t/overload.t
line 81.
ok
|
|
|
|
| |
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.
|
|
|
|
| |
tryAMAGICunDEREF() isn't used anywhere in the core. Add tests for it.
|
|
|
|
| |
which are no longer relevant
|
|
|
|
|
| |
Code in ext/ isn't subject to the same compiler warnings regime as the
top-level core files, hence why this was missed.
|
|
|
|
|
| |
After the previous change, all callers were passing in NULL and letting it
generate a new mortal SV for them.
|
|
|
|
|
| |
This actually reduces both source code size and object code size (the latter
by almost 1K on this platform).
|
|
|
|
|
| |
b2adfa9b5e1682df inadvertently changed the name of the accessor for
mg->mg_len to B::MAGIC::LENGTH. Fix this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All bar one of the callers to cc_opclassname() were using it in the same way -
to pass as the second argument of newSVrv(), whose first argument was a new
mortal, and return value was used with sv_setiv() and PTR2IV(). So clearly
*that* is the common code needed.
Inline the existing code (all 1 line of it) in the other location that called
cc_opclassname(). As the typemap was using cc_opclassname(), replace the 4
implicit uses of it with explicit PPCODE sections. Curiously, removing the use
of this typemap actually reduces the line count of B.xs
On this platform, this reduces the object code size by almost .5K.
|
|
|
|
| |
On this platform, this reduces the object size by about .5K.
|
| |
|
|
|
|
|
| |
On this platform, this reduces the object size by about 400 bytes for a threaded
build.
|
|
|
|
|
| |
On this platform, this reduces the object size by about .5K, for an unthreaded
build.
|
|
|
|
| |
On this platform, this reduces the object code size by about .5K.
|
| |
|
| |
|
|
|
|
| |
On this platform, this reduces the object size by .5K.
|
|
|
|
| |
newSVpvn_flags(NULL, whatever, SVs_TEMP) is equivalent to sv_newmortal().
|
| |
|
|
|
|
|
|
| |
Using newSVpvn_flags() and SVt_TEMP and an explicit push is one API call.
newSVpvn() and RETVAL results in a second API call, sv_2mortal(), in the return
typemap.
|
| |
|