I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2010-03-10 01:20:33.957185-08 by anthony
HASH reference error with HTTP::Message::decodable
Hi,

I'm getting an "Can't use an undefined value as a HASH reference" error trying to call HTTP::Message::decodable() using Perl 5.10 / libwww installed on Debian Lenny OS using the aptitude package manager. I'm really stuck so would appreciate some help please.

Here's the error:

Can't use an undefined value as a HASH reference at (eval 2) line 1.
at test.pl line 4
main::__ANON__('Can\'t use an undefined value as a HASH reference at (eval 2)...') called at (eval 2) line 1
HTTP::Message::__ANON__() called at test.pl line 6

Here's the code:

use strict;
use HTTP::Request::Common;
use Carp;
$SIG{ __DIE__ } = sub { Carp::confess( @_ ) };

print HTTP::Message::decodable();

Thanks in advance

Anthony
Direct Responses: 12557 | Write a response
Posted on 2010-03-17 03:57:48.344631-07 by anthony in response to 12523
Re: HASH reference error with HTTP::Message::decodable
Turns out this was due to the fact HTTP::Message::decodable wasn't available in the version of libwww-perl that is packaged with Debian Lenny. It was introduced in 5.814 but the version package with Lenny is 5.813. To fix I upgraded the version using CPAN:
$ perl -MCPAN -e shell cpan[1]> upgrade HTTP::Message
Direct Responses: Write a response