diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-09-22 16:28:46 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-09-22 17:55:31 -0700 |
commit | 0f8d4b5ec2b14a817d302f2a3e7e311fd574a6bf (patch) | |
tree | 2cf36e96ccf74fbd9cebb7091fb11933db024633 /t | |
parent | 25275596243468dc2f7e4dddb6ac6eb8aac471f2 (diff) | |
download | perl-0f8d4b5ec2b14a817d302f2a3e7e311fd574a6bf.tar.gz |
Make CORE->method work
This will probably not be used, but ought to be here for complete-
ness’ sake.
Method lookup needs to trigger the autovivification of coresubs.
Since it does not use gv_fetchpvn_flags, the coresub-autovification is
now in a separate static function, so that both standard gv lookup and
method lookup can share it.
Diffstat (limited to 't')
-rw-r--r-- | t/op/coresubs.t | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/op/coresubs.t b/t/op/coresubs.t index b3dd3ceba6..60aa1b7814 100644 --- a/t/op/coresubs.t +++ b/t/op/coresubs.t @@ -115,6 +115,12 @@ use warnings; $SIG{__WARN__} = sub { like shift, qr\^Use of uninitialized\ }; foo(undef); +$tests+=2; +is runperl(prog => 'print CORE->lc, qq-\n-'), "core\n", + 'methods calls autovivify coresubs'; +is runperl(prog => '@ISA=CORE; print main->uc, qq-\n-'), "MAIN\n", + 'inherted method calls autovivify coresubs'; + is curr_test, $tests+1, 'right number of tests'; done_testing; |