diff options
-rw-r--r-- | Build.PL | 2 | ||||
-rwxr-xr-x | bin/aseag-m | 4 | ||||
-rw-r--r-- | lib/Travel/Status/DE/URA.pm (renamed from lib/Travel/Status/DE/ASEAG.pm) | 29 | ||||
-rw-r--r-- | lib/Travel/Status/DE/URA/Result.pm (renamed from lib/Travel/Status/DE/ASEAG/Result.pm) | 22 |
4 files changed, 29 insertions, 28 deletions
@@ -14,7 +14,7 @@ Module::Build->new( configure_requires => { 'Module::Build' => 0.40, }, - module_name => 'Travel::Status::DE::ASEAG', + module_name => 'Travel::Status::DE::URA', license => 'perl', requires => { 'perl' => '5.10.1', diff --git a/bin/aseag-m b/bin/aseag-m index ca29fb6..bc4541a 100755 --- a/bin/aseag-m +++ b/bin/aseag-m @@ -13,7 +13,7 @@ use DateTime; use DateTime::Format::Duration; use Getopt::Long qw(:config no_ignore_case); use List::Util qw(max); -use Travel::Status::DE::ASEAG; +use Travel::Status::DE::URA; my (@grep_lines); my $full_route = 0; @@ -47,7 +47,7 @@ if ( @ARGV != 1 ) { my ($stop_name) = @ARGV; -my $status = Travel::Status::DE::ASEAG->new; +my $status = Travel::Status::DE::URA->new; sub show_help { my ($code) = @_; diff --git a/lib/Travel/Status/DE/ASEAG.pm b/lib/Travel/Status/DE/URA.pm index 4be2cd2..c016089 100644 --- a/lib/Travel/Status/DE/ASEAG.pm +++ b/lib/Travel/Status/DE/URA.pm @@ -1,4 +1,4 @@ -package Travel::Status::DE::ASEAG; +package Travel::Status::DE::URA; use strict; use warnings; @@ -13,7 +13,7 @@ use DateTime; use Encode qw(encode decode); use List::MoreUtils qw(none); use LWP::UserAgent; -use Travel::Status::DE::ASEAG::Result; +use Travel::Status::DE::URA::Result; sub new { my ( $class, %opt ) = @_; @@ -196,7 +196,7 @@ sub results { push( @results, - Travel::Status::DE::ASEAG::Result->new( + Travel::Status::DE::URA::Result->new( date => $dt_dep->strftime('%d.%m.%Y'), time => $dt_dep->strftime('%H:%M:%S'), datetime => $dt_dep, @@ -229,13 +229,14 @@ __END__ =head1 NAME -Travel::Status::DE::ASEAG - unofficial ASEAG departure monitor +Travel::Status::DE::URA - unofficial departure monitor for URA-based +realtime data providers (e.g. ASEAG) =head1 SYNOPSIS - use Travel::Status::DE::ASEAG; + use Travel::Status::DE::URA; - my $status = Travel::Status::DE::ASEAG->new( + my $status = Travel::Status::DE::URA->new( stop => 'Aachen Bushof' ); @@ -252,18 +253,18 @@ version 1.04 =head1 DESCRIPTION -Travel::Status::DE::ASEAG is an unofficial interface to an ASEAG departure -monitor. It reports all upcoming departures at a given place in real-time. -Schedule information is not included. +Travel::Status::DE::URA is an unofficial interface URA-based realtime departure +monitors (as used e.g. by the ASEAG). It reports all upcoming departures at a +given place in real-time. Schedule information is not included. =head1 METHODS =over -=item my $status = Travel::Status::DE::ASEAG->new(I<%opt>) +=item my $status = Travel::Status::DE::URA->new(I<%opt>) Requests the departures as specified by I<opts> and returns a new -Travel::Status::DE::ASEAG object. +Travel::Status::DE::USA object. Accepts the same options is C<< $status->results >>. Options specified here can be overridden later, but may limit the set of available departures. @@ -276,7 +277,7 @@ occured, returns undef. =item $status->results(I<%opt>) -Returns a list of Travel::Status::DE::ASEAG::Result(3pm) objects, each describing +Returns a list of Travel::Status::DE::URA::Result(3pm) objects, each describing one departure. Accepted parameters (all are optional): @@ -286,7 +287,7 @@ Accepted parameters (all are optional): =item B<full_routes> => B<before>|B<after>|I<bool> (default 0) When set to a true value: Compute B<route_timetable> fields in all -Travel::Status::DE::ASEAG::Result(3pm) objects, otherwise they will not be +Travel::Status::DE::URA::Result(3pm) objects, otherwise they will not be set. B<before> / B<after> limits the timetable to stops before / after the stop @@ -339,7 +340,7 @@ Many. =head1 SEE ALSO -aseag-m(1), Travel::Status::DE::ASEAG::Result(3pm). +aseag-m(1), Travel::Status::DE::URA::Result(3pm). =head1 AUTHOR diff --git a/lib/Travel/Status/DE/ASEAG/Result.pm b/lib/Travel/Status/DE/URA/Result.pm index 3d88261..dbf619f 100644 --- a/lib/Travel/Status/DE/ASEAG/Result.pm +++ b/lib/Travel/Status/DE/URA/Result.pm @@ -1,4 +1,4 @@ -package Travel::Status::DE::ASEAG::Result; +package Travel::Status::DE::URA::Result; use strict; use warnings; @@ -8,7 +8,7 @@ use parent 'Class::Accessor'; our $VERSION = '0.00'; -Travel::Status::DE::ASEAG::Result->mk_ro_accessors( +Travel::Status::DE::URA::Result->mk_ro_accessors( qw(countdown countdown_sec date datetime destination line line_id route_timetable stop stop_id time) ); @@ -33,8 +33,8 @@ __END__ =head1 NAME -Travel::Status::DE::ASEAG::Result - Information about a single -departure received by Travel::Status::DE::ASEAG +Travel::Status::DE::URA::Result - Information about a single +departure received by Travel::Status::DE::URA =head1 SYNOPSIS @@ -52,8 +52,8 @@ version 0.00 =head1 DESCRIPTION -Travel::Status::DE::ASEAG::Result describes a single departure as obtained by -Travel::Status::DE::ASEAG. It contains information about the time, +Travel::Status::DE::URA::Result describes a single departure as obtained by +Travel::Status::DE::URA. It contains information about the time, line number and destination. =head1 METHODS @@ -64,12 +64,12 @@ line number and destination. =item $departure->countdown -Time in minutes from the time Travel::Status::DE::ASEAG was instantiated until +Time in minutes from the time Travel::Status::DE::URA was instantiated until the bus will depart. =item $departure->countdown_sec -Time in seconds from the time Travel::Status::DE::ASEAG was instantiated until +Time in seconds from the time Travel::Status::DE::URA was instantiated until the bus will depart. =item $departure->date @@ -117,9 +117,9 @@ Departure time (HH:MM:SS). =over -=item $departure = Travel::Status::DE::ASEAG::Result->new(I<%data>) +=item $departure = Travel::Status::DE::URA::Result->new(I<%data>) -Returns a new Travel::Status::DE::ASEAG::Result object. You should not need to +Returns a new Travel::Status::DE::URA::Result object. You should not need to call this. =item $departure->TO_JSON @@ -146,7 +146,7 @@ Unknown. =head1 SEE ALSO -Travel::Status::DE::ASEAG(3pm). +Travel::Status::DE::URA(3pm). =head1 AUTHOR |