| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
When elements of @_ refer to nonexistent hash or array elements, then
the magic scalar in $_[0] delegates all set/get actions to the element
in represents, vivifying it if needed.
tie/tied/untie, however, were not delegating to the element, but were
tying the the magical ‘deferred element’ scalar itself.
|
|
|
|
| |
I thought it did.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, file used hand-coded 'print "ok"' statements and no tests had
descriptions (a.k.a. labels or names). Convert to use of Test::More functions
and provide descriptions for all individual tests.
Previously, file used global variables extensively and did not 'use strict'
(except 'use strict subs'). The globals have been converted to lexicals
where appropriate and the file now runs fully under strictures. Other
than that, no attempt was made to improve the design of the file or the
quality of the tests. (That can be done in a later RT, if desired.)
Thanks to Peter Martini for guidance, Dagfinn Ilmari Mannsåker for guidance
and code review on list and Tony Cook for additional review.
For: RT #118883
|
| |
|
|
|
|
|
|
|
|
|
| |
When elements of @_ refer to nonexistent hash or array elements, then
the magic scalar in $_[0] delegates all set/get actions to the element
in represents, vivifying it if needed.
pos($_[0]), however, was not delegating the value to the element, but
storing it on the magical ‘deferred element’ scalar.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Assigning a vstring to a tied variable would result in a plain string
in $_[1] in STORE.
Assigning a vstring to a magic deferred element would result in a
plain string in the aggregate’s actual element.
When magic is invoked, the magic flags are temporarily turned off on
the sv so that recursive calls to magic don’t happen. This makes it
easier to implement functions like Perl_magic_set to read the value of
the sv without triggering get-magic.
Since vstrings are only considered vstrings when they are SvRMAGICAL,
this meant that set-magic would turn vstrings temporarily into plain
strings. Subsequent copying (e.g., in STORE) would then fail to copy
the vstring magic.
This commit changes mg_set to leave the rmagical flag on, since it
does not affect the functionaiity of set-magic.
|
|
|
|
| |
The tests using the deprecated feature were removed in e1dccc0d34.
|
|
|
|
|
| |
updated to apply to blead, minor spelling and word wrap fixes by Tony
Cook.
|
|
|
|
|
|
| |
The generated XS file output was varying between builds because of hash
randomisation. This sorts the output to make it the same for the same
inputs. This facilitates eyeballing diffs of two workspaces.
|
|
|
|
|
|
| |
Otherwise the results are buggy for package names with two or more separators.
This bug broke a -Uusedl build, once ExtUtils::Embed was refactored to use
the existing but always-buggy functionality.
|
|
|
|
| |
Modernize the explain message
|
|
|
|
| |
see <20130708133005.GA8284@cancer.codesimply.com>
|
|
|
|
| |
see <20130708142509.GA8504@cancer.codesimply.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
To be considered absolute, we had been requiring a file spec to
have a bracketed directory spec after the colon. This meant that
very common and idiomatic expressions such as sys$login:login.com
or sys$manager:operator.log were not considered absolute. Which
is wrong.
So we now consider a file spec starting with a valid device name
(which would also be a valid logical name) followed by an unescaped
colon to be absolute.
|
| |
|
|
|
|
|
|
|
|
| |
Part of Perl #113438. Someone may write a pure perl sub, or callback from
an XSUB to PP to use caller, to check the package of the sub that called
the current sub and have different behaviour based on the caller sub's
package. Also using a perl debugger will not show XSUB frames in the
call stack. Therefore document this limitation of caller.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ‘n’ debugger command, which is supposed to step over subs, was not
stepping over lvalue subs.
This is a regression from 5.8, but 5.8 was worse.
This bug did not occur in 5.8 because there was no mechanism back then
for handling lvalue subs specially (via DB::lsub), so assignment to an
lvalue sub was completely broken under the debugger.
Perl 5.10 introduced DB::lsub. The implementation in perl5db.pl
contains these lines at the end of the sub:
# Pop the single-step value back off the stack.
$single |= $stack[ $stack_depth-- ];
# call the original lvalue sub.
&$sub;
The regular DB::sub does this:
{
no strict 'refs';
@ret = &$sub;
}
# Pop the single-step value back off the stack.
$single |= $stack[ $stack_depth-- ];
Notice how $single (i.e., $DB::single) is modified before and after
the sub call, respectively. The order is different.
There are two types of lvalue list context for lvalue subs. (foo)=3
will allow sub foo:lvalue{@a} to return the array itself. \(foo) and
bar(foo) will flatten the array.
So there is no way in pure Perl to capture the return value and have
it returned to the caller unchanged. That is why DB::lsub has to call
the sub last of all (and have the context propagated).
The solution here is to use localisation to accomplish the assigment
to $single after the lvalue sub exits.
|
|
|
|
| |
The regexp engine is now fully reëntrant.
|
| |
|
|
|
|
| |
but they are still experimental.
|