Changeset 2258

Show
Ignore:
Timestamp:
05/13/07 07:37:50
Author:
miyagawa
Message:

don't use decoded_content to work with new HTTP::Response::Encoding

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Web-Scraper/trunk/lib/Web/Scraper.pm

    r2254 r2258  
    5050        my $res = $ua->get($stuff); 
    5151        if ($res->is_success) { 
    52             $html = $res->encoding ? $res->decoded_content : Encode::decode("latin-1", $res->content); 
     52            my $encoding = $res->encoding || "latin-1"; 
     53            $html = Encode::decode($encoding, $res->content); 
    5354        } else { 
    5455            croak "GET $stuff failed: ", $res->status_line;