summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-05-23 21:44:08 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-05-23 21:44:08 +0200
commit50bf9bec10d0d7c3f3299bef58dde5919e3696f4 (patch)
treec19ac4382da7e9700c4c47be19bb73b68724a1a0
parent26deb42e6fca8206c437eb3223429ac0fec84fc2 (diff)
Eliminate $efa->parse(), include it in $efa->submit()
-rwxr-xr-xbin/efa4
-rw-r--r--lib/Net/Travel/DE/VRR.pm8
2 files changed, 2 insertions, 10 deletions
diff --git a/bin/efa b/bin/efa
index dcfca12..a519b5d 100755
--- a/bin/efa
+++ b/bin/efa
@@ -41,8 +41,6 @@ GetOptions(
prefer|P=s
proximity|p
include|i=s
- test-dump
- test-parse
time|t=s
timeout=i
to=s@{2}
@@ -98,8 +96,6 @@ $efa = Net::Travel::DE::VRR->new(
$efa->submit( timeout => $opt->{'timeout'} );
-$efa->parse();
-
my @routes = $efa->routes();
for my $i ( 0 .. $#routes ) {
diff --git a/lib/Net/Travel/DE/VRR.pm b/lib/Net/Travel/DE/VRR.pm
index 8f1b506..6f7af12 100644
--- a/lib/Net/Travel/DE/VRR.pm
+++ b/lib/Net/Travel/DE/VRR.pm
@@ -406,6 +406,8 @@ sub submit {
$self->{html_reply} = $response->decoded_content( charset => 'latin-1' );
+ $self->parse();
+
return;
}
@@ -495,7 +497,6 @@ Net::Travel::DE::VRR - inofficial interface to the efa.vrr.de German itinerary s
);
$efa->submit();
- $efa->parse();
for my $route ($efa->routes()) {
for my $part (@{$route}) {
@@ -598,11 +599,6 @@ If true: Prefer connections allowing to take a bike along
Submit the query to B<http://efa.vrr.de>.
I<%opts> is passed on to LWP::UserAgent->new(%opts).
-=item $efa->parse()
-
-Parse the B<efa.vrr.de> reply.
-returns a true value on success.
-
=item $efa->routes()
Returns a list of Net::Travel::DE::VRR::Route(3pm) elements. Each one contains