NAME
WWW::PTV::Route - Class for operations with Public Transport Victoria (PTV) routes
SYNOPSIS
# Create a new WWW::PTV object
my $ptv = WWW::PTV->new();
# Return a WWW::PTV::Route object for route ID 1
my $route = $ptv->get_route_by_id(1);
# Print the route name and outbound description
print $route->name .":". $route->description ."\n";
# Get the route outbound timetable as a WWW::PTV::TimeTable object
my $tt = $route->get_outbound_tt;
# Get the route stop names and IDs as a hash in the inbound direction
my %stops = $route->get_stop_names_and_ids( 'in' );
METHODS
id ()
Returns the route numerical ID.
name ()
Returns the route name - this is a free-form textual description of the route.
direction_out ()
Returns the outbound route description - this is freeform text that will probably take the form 'To $LINE_NAME/$SUBURB_NAME/$LOCALITY'.
direction_in ()
Returns the inbound route description - this is freeform text that will probably take the form 'To $LINE_NAME/$SUBURB_NAME/$LOCALITY'.
direction_out ()
Returns the outbound route description.
direction_in_link ()
Returns the URI for the timetable for the route in the inbound direction.
direction_out_link ()
Returns the URI for the timetable for the route in the outbound direction.
description_in ()
Returns the inbound route description - this is freeform text that typically describes the major stops of the route and major direction changes.
description_out ()
Returns the outbound route description - this is freeform text that typically describes the major stops of the route and major direction changes.
get_inbound_tt ()
Returns the inbound timetable for the route as a WWW::PTV::TimeTable object.
get_outbound_tt ()
Returns the outbound timetable for the route as a WWW::PTV::TimeTable object.
get_stop_names_and_ids ( in|out )
Returns an array of lists with each list containing two elements; a stop ID, and a stop descriptive name. The elements of the list represent the in-order list of the stops on the route in the direction specified.
operator ()
Returns the line operator (i.e. the service provider).
operator_ph ()
Returns the phone number of the line operator.
SEE ALSO
WWW::PTV, WWW::PTV::Area, WWW::PTV::Stop, WWW::PTV::TimeTable, WWW::PTV::TimeTable::Schedule.
AUTHOR
Luke Poskitt, <ltp at cpan.org>
BUGS
Please report any bugs or feature requests to bug-www-ptv-route at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-PTV-Route. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc WWW::PTV::Route
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
LICENSE AND COPYRIGHT
Copyright 2014 Luke Poskitt.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.