From: Jarkko Hietaniemi Date: Wed, 19 Jun 2002 21:14:53 +0000 (+0000) Subject: Fix for 20001101.004, at least for the memleak part. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7377d752f328690fcb4417d17046f5d18d3582d6;p=p5sagit%2Fp5-mst-13.2.git Fix for 20001101.004, at least for the memleak part. p4raw-id: //depot/perl@17310 --- diff --git a/lib/overload.pm b/lib/overload.pm index 715f10a..fb1a0d1 100644 --- a/lib/overload.pm +++ b/lib/overload.pm @@ -91,7 +91,7 @@ sub AddrRef { } sub StrVal { - (OverloadedStringify($_[0]) or ref($_[0]) eq 'Regexp') ? + (ref $_[0] && OverloadedStringify($_[0]) or ref($_[0]) eq 'Regexp') ? (AddrRef(shift)) : "$_[0]"; }