diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2010-05-29 21:15:04 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2010-05-29 21:15:04 +0200 |
commit | 6328b9cf2477049b377329f1059ef31111d054b0 (patch) | |
tree | f39ef71ebeaed68b14657dc015d7b4f95cb9c605 | |
parent | 700bba61249ef34ce31717a34b4c0df348a3d20a (diff) |
Add --timeout switch, decrease default timeout from 180 to 60 seconds
-rwxr-xr-x | bin/efa | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -32,6 +32,7 @@ my $proximity; my $walk_speed; my $with_bike; my $debug = 0; +my $timeout = 60; my $ignore_info = 'Fahrradmitnahme'; my ($test_dump, $test_parse); @@ -221,6 +222,7 @@ GetOptions( 'test-dump' => \$test_dump, 'test-parse' => \$test_parse, 't|time=s' => \$time, + 'timeout=i' => \$timeout, 'to=s{2}' => \@to, 'to-type=s' => \$to_type, 'v|version' => sub {print "efa version $version\n"; exit 0}, @@ -370,6 +372,7 @@ if ($test_parse) { $content = <STDIN>; } else { + $www->timeout($timeout); $www->get($firsturl); $www->submit_form( form_name => 'jp', @@ -537,6 +540,10 @@ Ignore additional information matching I<regex> (default: /Fahrradmitnahme/) If I<regex> is not supplied, removes the default regex (-E<gt> nothing will be ignored) +=item B<--timeout> I<seconds> + +Set timeout for HTTP requests. Default: 60 seconds. + =item B<-D>|B<--debug> Display debug information (additional post requests sent to the site, |