{
dVAR; dSP; dTOPss;
+ SvGETMAGIC(sv);
if (SvROK(sv)) {
wasref:
tryAMAGICunDEREF(to_gv);
}
else {
if (!isGV_with_GP(sv)) {
- if (SvGMAGICAL(sv)) {
- mg_get(sv);
- if (SvROK(sv))
- goto wasref;
- }
if (!SvOK(sv) && sv != &PL_sv_undef) {
/* If this is a 'my' scalar and flag is set then vivify
* NI-S 1999/05/07
dVAR; dSP; dTOPss;
GV *gv = NULL;
+ SvGETMAGIC(sv);
if (SvROK(sv)) {
- wasref:
tryAMAGICunDEREF(to_sv);
sv = SvRV(sv);
gv = MUTABLE_GV(sv);
if (!isGV_with_GP(gv)) {
- if (SvGMAGICAL(sv)) {
- mg_get(sv);
- if (SvROK(sv))
- goto wasref;
- }
gv = Perl_softref2xv(aTHX_ sv, "a SCALAR", SVt_PV, &sp);
if (!gv)
RETURN;
const bool is_pp_rv2av = PL_op->op_type == OP_RV2AV;
const svtype type = is_pp_rv2av ? SVt_PVAV : SVt_PVHV;
+ SvGETMAGIC(sv);
if (SvROK(sv)) {
- wasref:
tryAMAGICunDEREF_var(is_pp_rv2av ? to_av_amg : to_hv_amg);
sv = SvRV(sv);
GV *gv;
if (!isGV_with_GP(sv)) {
- if (SvGMAGICAL(sv)) {
- mg_get(sv);
- if (SvROK(sv))
- goto wasref;
- }
gv = Perl_softref2xv(aTHX_ sv, is_pp_rv2av ? an_array : a_hash,
type, &sp);
if (!gv)
{
package overloaded;
use overload
+ '*{}' => sub { print '*{}'; \*100 },
+ '@{}' => sub { print '@{}'; \@100 },
+ '%{}' => sub { print '%{}'; \%100 },
+ '${}' => sub { print '${}'; \$100 },
map {
my $op = $_;
$_ => sub { print "$op"; 100 }
$ghew=undef; $ghew >=1; print "\n";
$ghew=undef; $ghew != 1; print "\n";
$ghew=undef; $ghew<=>1; print "\n";
+$ghew=\*shrext; *$ghew; print "\n";
+$ghew=\@spled; @$ghew; print "\n";
+$ghew=\%frit; %$ghew; print "\n";
+$ghew=\$drile; $$ghew; print "\n";
EXPECT
fetching... +
fetching... **
fetching... >=
fetching... !=
fetching... <=>
+fetching... *{}
+fetching... @{}
+fetching... %{}
+fetching... ${}