Subject: | Use of uninitialized variable |
I am seeing a lot of messages like this.
[Sat Jan 21 00:28:38 2012] search.cgi: Use of uninitialized value in
subroutine entry at
/usr/local/share/perl/5.14.2/HTTP/Cache/Transparent.pm line 386.
[Sat Jan 21 00:28:38 2012] search.cgi: Use of uninitialized value in
print at /usr/local/share/perl/5.14.2/HTTP/Cache/Transparent.pm line 399.
The errant lines are:
386: $meta->{MD5} = md5_hex( $res->content );
399: print $fh $res->content;
I don't know what causes this and I don't a have a trivial program to
reproduce it, but I've logged it in case you can see what's wrong.
One thing of note (though it may be a red herring) is that I do a number
of HEAD requests, where $res->content may be undef. I don't know. Or
it's probably something else.
Anyway, the code seems to assume that $res->content does exist.