Subject: | Limitation/Bug in www::mechanize involving URI/aim.pm |
Date: | Sun, 28 Oct 2007 20:21:04 -0400 |
To: | bug-WWW-Mechanize [...] rt.cpan.org |
From: | Kevin Swope <kswope [...] liaison-intl.com> |
when this code comes across a page with this tag
<form name="IM" id="imform" method="get" action="aim:goim"
my $mech = WWW::Mechanize->new();
$mech->timeout(10);
$mech->get($url);
if ( $mech->success ) {
my %results = ();
if ( $mech->is_html ) {
$results{title} = $mech->title;
$results{source} = $mech->content();
}
return \%results;
} else {
log_info("failed: $url");
return undef;
}
Can't locate URI/aim.pm in @INC (@INC contains: /sw/lib/perl5
/sw/lib/perl5/darwin /usr/local/lib/perl5/5.8.8/darwin-2level
/usr/local/lib/perl5/5.8.8
/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level
/usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .)
at (eval 31) line 3.
I'm not even sure if that tag is valid, but I found it on a pretty big
web site. I doubt mechanize could do anything meaningful with it, but I
guess we could use a aim.pm stub in there to prevent this error.
-ks