From: perlbug-followup[at]perl.org (Yves Orton)
Message-ID: <rt-3.0.11-37233-121233.2.
25543632691242[at]perl.org>
p4raw-id: //depot/perl@25679
# Transform an argument to a function into a string.
sub format_arg {
my $arg = shift;
- if (not defined($arg)) {
- $arg = 'undef';
- }
- elsif (ref($arg)) {
+ if (ref($arg)) {
$arg = defined($overload::VERSION) ? overload::StrVal($arg) : "$arg";
+ }elsif (not defined($arg)) {
+ $arg = 'undef';
}
$arg =~ s/'/\\'/g;
$arg = str_len_trim($arg, $MaxArgLen);