}
sub concise_sv {
- my($sv, $hr) = @_;
+ my($sv, $hr, $preferpv) = @_;
$hr->{svclass} = class($sv);
$hr->{svclass} = "UV"
if $hr->{svclass} eq "IV" and $sv->FLAGS & SVf_IVisUV;
}
if (class($sv) eq "SPECIAL") {
$hr->{svval} .= ["Null", "sv_undef", "sv_yes", "sv_no"]->[$$sv];
+ } elsif ($preferpv && $sv->FLAGS & SVf_POK) {
+ $hr->{svval} .= cstring($sv->PV);
} elsif ($sv->FLAGS & SVf_NOK) {
$hr->{svval} .= $sv->NV;
} elsif ($sv->FLAGS & SVf_IOK) {
elsif ($h{class} eq "SVOP" or $h{class} eq "PADOP") {
unless ($h{name} eq 'aelemfast' and $op->flags & OPf_SPECIAL) {
my $idx = ($h{class} eq "SVOP") ? $op->targ : $op->padix;
+ my $preferpv = $h{name} eq "method_named";
if ($h{class} eq "PADOP" or !${$op->sv}) {
my $sv = (($curcv->PADLIST->ARRAY)[1]->ARRAY)[$idx];
- $h{arg} = "[" . concise_sv($sv, \%h) . "]";
+ $h{arg} = "[" . concise_sv($sv, \%h, $preferpv) . "]";
$h{targarglife} = $h{targarg} = "";
} else {
- $h{arg} = "(" . concise_sv($op->sv, \%h) . ")";
+ $h{arg} = "(" . concise_sv($op->sv, \%h, $preferpv) . ")";
}
}
}