Subject: | Gives warnins if imgsize() fails |
If imgsize() fails, URI::Title::Image warns of "Use of uninitialized
value in concatenation (.) or string". The below patch makes it just
return the type if imgsize() fails:
--- lib/URI/Title/Image.pm~ 2006-05-18 16:52:58.000000000 +0100
+++ lib/URI/Title/Image.pm 2008-04-18 16:39:45.000000000 +0100
@@ -22,6 +22,7 @@
my ($x, $y) = imgsize(\$data);
$type =~ s!^[^/]*/!!;
+ return $type unless $x && $y;
return "$type ($x x $y)";
}