diff options
Diffstat (limited to 'bin/efa')
-rwxr-xr-x | bin/efa | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -88,7 +88,7 @@ $efa = WWW::Efa->new( via => (@via ? [@via, $via_type] : undef), arrive => $opt->{'arrive'}, - depart => $opt->{'depart'}, + depart => $opt->{'depart'} // $opt->{'time'}, date => $opt->{'date'}, exclude => $opt->{'exclude'}, prefer => $opt->{'prefer'}, @@ -100,6 +100,14 @@ $efa = WWW::Efa->new( max_interchanges => $opt->{'max-change'}, ); +if ($efa->{'error'}) { + die $efa->{'error'}->as_string(); +} + +if (ref($efa) eq 'WWW::Efa::Error') { + die($efa->as_string); +} + if ($opt->{'test-parse'}) { local $/ = undef; $efa->{'html_reply'} = <STDIN>; |