summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-11-29 15:06:59 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-11-29 15:06:59 +0100
commit9aa1eab9c3fca4713ae67acab23d9b65e96ace9b (patch)
treea621c1d470306684085e14fe34a97e3007101eb5 /lib
parent7e8258ae6c0cb53cdde02cf48f506eb9f7a29660 (diff)
documentation
Diffstat (limited to 'lib')
-rw-r--r--lib/Travel/Routing/DE/VRR/Route.pm25
-rw-r--r--lib/Travel/Routing/DE/VRR/Route/Part.pm84
2 files changed, 77 insertions, 32 deletions
diff --git a/lib/Travel/Routing/DE/VRR/Route.pm b/lib/Travel/Routing/DE/VRR/Route.pm
index d2c85e7..04228a2 100644
--- a/lib/Travel/Routing/DE/VRR/Route.pm
+++ b/lib/Travel/Routing/DE/VRR/Route.pm
@@ -65,17 +65,34 @@ You usually want to acces it via C<< $efa->routes >>.
=head1 METHODS
+=head2 ACCESSORS
+
=over
-=item my $route = Travel::Routing::DE::VRR::Route->new(I<@parts>)
+=item $route->duration
-Creates a new Travel::Routing::DE::VRR::Route elements consisting of I<parts>,
-which are Travel::Routing::DE::VRR::Route::Part elements.
+route duration as string in HH:MM format
=item $route->parts
Returns a list of Travel::Routing::DE::VRR::Route::Part(3pm) elements describing
-the actual route.
+the actual route
+
+=item $route->ticket_type
+
+Type of the required ticket for this route, if available (empty string otherwise)
+
+=item $route->fare_adult
+
+ticket price for an adult in EUR
+
+=item $route->fare_child
+
+ticket price for a child in EUR
+
+=item $route->vehicle_time
+
+on-vehicle time (excluding waiting time) of the route in minutes
=back
diff --git a/lib/Travel/Routing/DE/VRR/Route/Part.pm b/lib/Travel/Routing/DE/VRR/Route/Part.pm
index e31e713..5122868 100644
--- a/lib/Travel/Routing/DE/VRR/Route/Part.pm
+++ b/lib/Travel/Routing/DE/VRR/Route/Part.pm
@@ -84,57 +84,85 @@ B<parts> method.
=head1 METHODS
+=head2 ACCESSORS
+
+"Actual" in the description means that the delay (if available) is already
+included in the calculation, "Scheduled" means it isn't.
+
=over
-=item $part = Travel::Routing::DE::VRR::Route::Part->new(I<%data>)
+=item $part->arrival_stop
-Creates a new Travel::Routing::DE::VRR::Route::Part object. I<data> consists of:
+arrival stop (city name plus station name)
-=over
+=item $part->arrival_platform
-=item B<arrival_time> => I<HH>:I<MM>
+arrival platform (either "Gleis x" or "Bstg. x")
-Arrival time
+=item $part->arrival_stop_and_platform
-=item B<arrival_stop> => I<name>
+"stop: platform" concatenation
-Arrival stop (city plus station / address)
+=item $part->arrival_date
-=item B<departure_time> => I<HH:MM>
+Actual arrival date in DD.MM.YYYY format
-Departure time
+=item $part->arrival_time
-=item B<departure_stop> => I<name>
+Actual arrival time in HH:MM format
-Departure stop (city plus station / address)
+=item $part->arrival_sdate
-=item B<train_destination> => I<name>
+Scheduled arrival date in DD.MM.YYYY format
-Destination of the train connecting the stops
+=item $part->arrival_stime
-=item B<train_line> => I<name>
+Scheduled arrival time in HH:MM format
-The train's line name.
+=item $part->delay
-=item B<extra> => B<[> [ I<line1>, [ I<line2> [ I<...> ] ] ] B<]>
+delay in minutes, 0 if unknown
-Additional information about this connection. Array-ref of newline-terminated
-strings.
+=item $part->departure_stop
-=back
+departure stop (city name plus station name)
+
+=item $part->departure_platform
+
+departure platform (either "Gleis x" or "Bstg. x")
+
+=item $part->departure_stop_and_platform
+
+"stop: platform" concatenation
+
+=item $part->departure_date
+
+Actual departure date in DD.MM.YYYY format
+
+=item $part->departure_time
+
+Actual departure time in HH:MM format
+
+=item $part->departure_sdate
+
+Scheduled departure date in DD.MM.YYYY format
+
+=item $part->departure_stime
+
+Scheduled departure time in HH:MM format
+
+=item $part->extra
-=item $part->get(I<name>)
+Additional information about the connection. Returns a list of
+newline-terminated strings
-Returns the value of I<name> (B<arrival_time>, B<arrival_stop> etc., see
-B<new>).
+=item $part->train_destination
-Each of these I<names> also has an accessor. So C<< $part->departure_time() >>
-is the same as C<< $part->get('departure_time') >>.
+destination of the line providing the connection
-=item $part->extra()
+=item $part->train_line
-Returns a list of additional information about this route part, if provided.
-Returns an empty list otherwise.
+name / number of the line
=back
@@ -156,7 +184,7 @@ None known.
=head1 SEE ALSO
-Travel::Routing::DE::VRR(3pm).
+Travel::Routing::DE::VRR(3pm), Class::Accessor(3pm).
=head1 AUTHOR