summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/efa10
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/efa b/bin/efa
index 55695f9..d6f7cef 100755
--- a/bin/efa
+++ b/bin/efa
@@ -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>;