{
GV *gv = (GV*)((SVOP*)gvop)->op_sv;
OP *sibling = o2->op_sibling;
+ SV *n = newSVpvn("",0);
op_free(o2);
- o2 = newSVOP(OP_CONST, 0,
- newSVpvn(GvNAME(gv),
- GvNAMELEN(gv)));
+ gv_fullname3(n, gv, "");
+ if (SvCUR(n)>6 && strnEQ(SvPVX(n),"main::",6))
+ sv_chop(n, SvPVX(n)+6);
+ o2 = newSVOP(OP_CONST, 0, n);
prev->op_sibling = o2;
o2->op_sibling = sibling;
}
sub star (*&) { &{$_[1]} }
sub star2 (**&) { &{$_[2]} }
sub BAR { "quux" }
+sub Bar::BAZ { "quuz" }
my $star = 'FOO';
star FOO, sub { print "ok $i\n" if $_[0] eq 'FOO' }; $i++;
star(FOO, sub { print "ok $i\n" if $_[0] eq 'FOO' }); $i++;
star(\*FOO, sub { print "ok $i\n" if $_[0] eq \*FOO }); $i++;
star2 FOO, BAR, sub { print "ok $i\n"
if $_[0] eq 'FOO' and $_[1] eq 'BAR' }; $i++;
-star2(BAR, FOO, sub { print "ok $i\n"
- if $_[0] eq 'BAR' and $_[1] eq 'FOO' }); $i++;
+star2(Bar::BAZ, FOO, sub { print "ok $i\n"
+ if $_[0] eq 'Bar::BAZ' and $_[1] eq 'FOO' }); $i++;
star2 BAR(), FOO, sub { print "ok $i\n"
if $_[0] eq 'quux' and $_[1] eq 'FOO' }; $i++;
star2(FOO, BAR(), sub { print "ok $i\n"