diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2010-08-14 11:31:26 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2010-08-14 11:31:26 +0200 |
commit | 49bca5b7fafffc9dc42660fc13c7931cd243426d (patch) | |
tree | 1da91abf5633751d85bfecc063c55061921d4725 /lib | |
parent | b9c18d6739b79a645a14df5bb51f24987a6ef308 (diff) |
Remove 'time' option from WWW::Efa
Diffstat (limited to 'lib')
-rw-r--r-- | lib/WWW/Efa.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/WWW/Efa.pm b/lib/WWW/Efa.pm index 0716d5e..0aa2f46 100644 --- a/lib/WWW/Efa.pm +++ b/lib/WWW/Efa.pm @@ -53,7 +53,7 @@ sub post_time { my ($post, $conf) = @_; my $time; - if ($conf->{'depart'} || $conf->{'time'}) { + if ($conf->{'depart'}) { $post->{'itdTripDateTimeDepArr'} = 'dep'; $time = $conf->{'depart'} || $conf->{'time'}; } @@ -64,7 +64,8 @@ sub post_time { if ($time !~ / ^ [0-2]? \d : [0-5]? \d $ /x) { die WWW::Efa::Error::Setup->new( - 'time', $time, 'Must match HH:MM' + ($conf->{'depart'} ? 'depart' : 'arrive'), + $time, 'Must match HH:MM' ); } @{$post}{'itdTimeHour', 'itdTimeMinute'} = split(/:/, $time); @@ -179,7 +180,7 @@ sub create_post { if ($conf->{'via'}) { post_place($post, 'via', @{$conf->{'via'}}); } - if ($conf->{'arrive'} || $conf->{'depart'} || $conf->{'time'}) { + if ($conf->{'arrive'} || $conf->{'depart'}) { post_time($post, $conf); } if ($conf->{'date'}) { @@ -343,7 +344,7 @@ contain. See B<from> for arguments. Sets the journey end time -=item B<depart>|B<time> => I<HH:MM> +=item B<depart> => I<HH:MM> Sets the journey start time |