Revision 136

Date:
2011/09/07 16:52:59
Author:
ahitrov
Revision Log:
Параметр timeout
Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/core/lib/Contenido/Parser.pm

     
    26 26 my ($self, $input, %opts) = @_;
    27 27
    28 28 my ($fh, $content);
    29 my $timeout = delete $opts{timeout} || 10;
    29 30 my $encoding = delete $opts{encoding};
    30 31 if (not ref $input) {
    31 32 no strict "refs";
     
    35 36 } else {
    36 37 my $request = new HTTP::Request GET => $input;
    37 38 my $ua = new LWP::UserAgent;
    38 $ua->timeout(10);
    39 $ua->timeout($timeout);
    39 40 my $res = $ua->request($request);
    40 41 if ($res->is_success) {
    41 42 $self->{headers} = $res->headers;