This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
ExtUtils::MakeMaker 6.02 -> 6.03
[perl5.git] / lib / overload.pm
index 1cde642..fb1a0d1 100644 (file)
@@ -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]";
 }
@@ -404,6 +404,9 @@ glob (which may require a stringification).  The same overloading
 happens both for the I<read-filehandle> syntax C<E<lt>$varE<gt>> and
 I<globbing> syntax C<E<lt>${var}E<gt>>.
 
+B<BUGS> Even in list context, the iterator is currently called only
+once and with scalar context.
+
 =item * I<Dereferencing>
 
     '${}', '@{}', '%{}', '&{}', '*{}'.