It outputs only a few lines from the beginning.
#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $response = $ua->get('http://www.eurogamer.net/articles/df-hardware-wii-u-graphics-power-finally-revealed');
print $response->decoded_content;
I ran the following modification:
And saw this:
It doesn't seem to like the
<meta name="twitter:card" content="summary" />
tag on line 27. It says that it died.It seems to translate any
meta
tag with aname
attribute to a"X-Meta-\u$attr->{name}"
"header". It then tries to store the value of thecontent
attribute as the X-meta "header" value. Like this (starting at line 194):I pushed a modified copy of this module into a PERL5LIB directory. I wrapped the
push_header
step in aneval
block and downloaded the page completely.I had exactly the same problem...
I fixed it disabling the option 'parse_head' which enables the HTML::HeadParser.
I know it is not a very good idea to disable this functionality but I prefer availability than correct decoded docs.