|
I am getting:
Can't coerce array into hash at /usr/local/share/perl/5.8.4/HTML/Encoding.pm line 433.
error when trying to decode http://blog.mathemagenic.com/stories/2003/12/23/weblogReader.html
The documentation says:
> This option always defaults to the $HTML::Encoding::DEFAULT_ENCODINGS
> array reference which means the following encodings are considered by default:
^^^^^
And yet in the line 433 of Encoding.pm we have:
> @first = keys %$encodings unless @first;
I suspect that the $encodings variable is the same as $HTML::Encoding::DEFAULT_ENCODINGS
when it gets there - so according to the documentation it is indeed a pointer to a list
and the code here treats it as a pointer to a hash.
Here is my code that causes the error:
my $request = HTTP::Request->new('GET', $link->url);
my $response = $ua->request($request);
if ($response->is_success) {
my $enco = encoding_from_http_message($response);
-- ZL
|