Loading Build.PL +1 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ Module::Build->new( configure_requires => { 'Module::Build' => 0.40, }, module_name => 'Travel::Status::DE::DeutscheBahn', module_name => 'Travel::Status::DE::HAFAS', license => 'perl', requires => { 'perl' => '5.14.0', Loading bin/hafas-m +10 −6 Original line number Diff line number Diff line Loading @@ -64,6 +64,10 @@ if ($list_services) { 'time zone' ); for my $service ( Travel::Status::DE::HAFAS::get_services() ) { if ($service->{shortname} eq 'DB') { # HTTP 503 Service Unavailable next; } printf( "%-40s %-14s %-15s %s\n", @{$service}{qw(name shortname)}, Loading Loading @@ -190,7 +194,7 @@ sub parse_mot_options { for my $type ( split( qr{,}, $types ) ) { if ( $type eq 'help' or $type eq 'list' or $type eq q{?} ) { $service //= 'DB'; $service //= 'ÖBB'; my $desc = Travel::Status::DE::HAFAS::get_service($service); if ($desc) { for my $mot ( @{ $desc->{productbits} } ) { Loading Loading @@ -842,8 +846,8 @@ Useful for debugging and development purposes. =item B<-s>, B<--service> I<service> Request arrivals/departures using the API provided by I<service>, defaults to DB (Deutsche Bahn). See B<--list> for a list of known services. Request arrivals/departures using the API provided by I<service>, defaults to ÖBB (Österreichische Bundesbahnen). See B<--list> for a list of known services. =item B<-t>, B<--time> I<hh>:I<mm> (monitor) Loading Loading @@ -885,8 +889,8 @@ None. =over =item * The non-default services (anything other than DB) are not well-tested. Unlike DB, many of those do not return routes for stationboard entries. =item * DB HAFAS is no more. At this point, there is no suitable HAFAS instance that covers local and regional / long-distance transit in Germany. =item * HAFAS does not provide real-time data for routes of stationboard entries. Hence, B<--via> estimates the arrival time from scheduled Loading @@ -896,7 +900,7 @@ departure and departure delay =head1 AUTHOR Copyright (C) 2015-2023 by Birte Kristina Friesel E<lt>derf@finalrewind.orgE<gt> Copyright (C) 2015-2025 Birte Kristina Friesel E<lt>derf@finalrewind.orgE<gt> =head1 LICENSE Loading lib/Travel/Status/DE/DeutscheBahn.pmdeleted 100644 → 0 +0 −106 Original line number Diff line number Diff line package Travel::Status::DE::DeutscheBahn; use strict; use warnings; use 5.014; use parent 'Travel::Status::DE::HAFAS'; our $VERSION = '6.15'; sub new { my ( $class, %opt ) = @_; $opt{service} = 'DB'; return $class->SUPER::new(%opt); } 1; __END__ =head1 NAME Travel::Status::DE::DeutscheBahn - Interface to the online arrival/departure monitor operated by Deutsche Bahn =head1 SYNOPSIS use Travel::Status::DE::DeutscheBahn; my $status = Travel::Status::DE::DeutscheBahn->new( station => 'Essen Hbf', ); if (my $err = $status->errstr) { die("Request error: ${err}\n"); } for my $departure ($status->results) { printf( "At %s: %s to %s from platform %s\n", $departure->datetime->strftime('%H:%M'), $departure->line, $departure->destination, $departure->platform, ); } =head1 VERSION version 6.15 =head1 DESCRIPTION Travel::Status::DE::DeutscheBahn is an interface to the Deutsche Bahn departure monitor available at L<https://reiseauskunft.bahn.de/bin/mgate.exe>. It takes a station name and (optional) date and time and reports all arrivals or departures at that station starting at the specified point in time (now if unspecified). =head1 METHODS =over =item my $status = Travel::Status::DE::DeutscheBahn->new(I<%opts>) Requests the departures/arrivals as specified by I<opts> and returns a new Travel::Status::DE::HAFAS element with the results. Dies if the wrong I<opts> were passed. Calls Travel::Status::DE::HAFAS->new with service = DB. All I<opts> are passed on. Please see Travel::Status::DE::HAFAS(3pm) for I<opts> documentation and other methdos. =back =head1 DIAGNOSTICS See Travel::Status::DE::HAFAS(3pm). =head1 DEPENDENCIES =over =item * Travel::Status::DE::HAFAS(3pm) =back =head1 BUGS AND LIMITATIONS See Travel::Status::DE::HAFAS(3pm). =head1 SEE ALSO Travel::Status::DE::HAFAS(3pm). =head1 AUTHOR Copyright (C) 2015-2022 by Birte Kristina Friesel E<lt>derf@finalrewind.orgE<gt> =head1 LICENSE This module is licensed under the same terms as Perl itself. lib/Travel/Status/DE/HAFAS.pm +1 −1 Original line number Diff line number Diff line Loading @@ -1204,7 +1204,7 @@ of this module's features. Set B<hafas=>I<service> to use a specific service. =head1 AUTHOR Copyright (C) 2015-2024 by Birte Kristina Friesel E<lt>derf@finalrewind.orgE<gt> Copyright (C) 2015-2025 Birte Kristina Friesel E<lt>derf@finalrewind.orgE<gt> =head1 LICENSE Loading Loading
Build.PL +1 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ Module::Build->new( configure_requires => { 'Module::Build' => 0.40, }, module_name => 'Travel::Status::DE::DeutscheBahn', module_name => 'Travel::Status::DE::HAFAS', license => 'perl', requires => { 'perl' => '5.14.0', Loading
bin/hafas-m +10 −6 Original line number Diff line number Diff line Loading @@ -64,6 +64,10 @@ if ($list_services) { 'time zone' ); for my $service ( Travel::Status::DE::HAFAS::get_services() ) { if ($service->{shortname} eq 'DB') { # HTTP 503 Service Unavailable next; } printf( "%-40s %-14s %-15s %s\n", @{$service}{qw(name shortname)}, Loading Loading @@ -190,7 +194,7 @@ sub parse_mot_options { for my $type ( split( qr{,}, $types ) ) { if ( $type eq 'help' or $type eq 'list' or $type eq q{?} ) { $service //= 'DB'; $service //= 'ÖBB'; my $desc = Travel::Status::DE::HAFAS::get_service($service); if ($desc) { for my $mot ( @{ $desc->{productbits} } ) { Loading Loading @@ -842,8 +846,8 @@ Useful for debugging and development purposes. =item B<-s>, B<--service> I<service> Request arrivals/departures using the API provided by I<service>, defaults to DB (Deutsche Bahn). See B<--list> for a list of known services. Request arrivals/departures using the API provided by I<service>, defaults to ÖBB (Österreichische Bundesbahnen). See B<--list> for a list of known services. =item B<-t>, B<--time> I<hh>:I<mm> (monitor) Loading Loading @@ -885,8 +889,8 @@ None. =over =item * The non-default services (anything other than DB) are not well-tested. Unlike DB, many of those do not return routes for stationboard entries. =item * DB HAFAS is no more. At this point, there is no suitable HAFAS instance that covers local and regional / long-distance transit in Germany. =item * HAFAS does not provide real-time data for routes of stationboard entries. Hence, B<--via> estimates the arrival time from scheduled Loading @@ -896,7 +900,7 @@ departure and departure delay =head1 AUTHOR Copyright (C) 2015-2023 by Birte Kristina Friesel E<lt>derf@finalrewind.orgE<gt> Copyright (C) 2015-2025 Birte Kristina Friesel E<lt>derf@finalrewind.orgE<gt> =head1 LICENSE Loading
lib/Travel/Status/DE/DeutscheBahn.pmdeleted 100644 → 0 +0 −106 Original line number Diff line number Diff line package Travel::Status::DE::DeutscheBahn; use strict; use warnings; use 5.014; use parent 'Travel::Status::DE::HAFAS'; our $VERSION = '6.15'; sub new { my ( $class, %opt ) = @_; $opt{service} = 'DB'; return $class->SUPER::new(%opt); } 1; __END__ =head1 NAME Travel::Status::DE::DeutscheBahn - Interface to the online arrival/departure monitor operated by Deutsche Bahn =head1 SYNOPSIS use Travel::Status::DE::DeutscheBahn; my $status = Travel::Status::DE::DeutscheBahn->new( station => 'Essen Hbf', ); if (my $err = $status->errstr) { die("Request error: ${err}\n"); } for my $departure ($status->results) { printf( "At %s: %s to %s from platform %s\n", $departure->datetime->strftime('%H:%M'), $departure->line, $departure->destination, $departure->platform, ); } =head1 VERSION version 6.15 =head1 DESCRIPTION Travel::Status::DE::DeutscheBahn is an interface to the Deutsche Bahn departure monitor available at L<https://reiseauskunft.bahn.de/bin/mgate.exe>. It takes a station name and (optional) date and time and reports all arrivals or departures at that station starting at the specified point in time (now if unspecified). =head1 METHODS =over =item my $status = Travel::Status::DE::DeutscheBahn->new(I<%opts>) Requests the departures/arrivals as specified by I<opts> and returns a new Travel::Status::DE::HAFAS element with the results. Dies if the wrong I<opts> were passed. Calls Travel::Status::DE::HAFAS->new with service = DB. All I<opts> are passed on. Please see Travel::Status::DE::HAFAS(3pm) for I<opts> documentation and other methdos. =back =head1 DIAGNOSTICS See Travel::Status::DE::HAFAS(3pm). =head1 DEPENDENCIES =over =item * Travel::Status::DE::HAFAS(3pm) =back =head1 BUGS AND LIMITATIONS See Travel::Status::DE::HAFAS(3pm). =head1 SEE ALSO Travel::Status::DE::HAFAS(3pm). =head1 AUTHOR Copyright (C) 2015-2022 by Birte Kristina Friesel E<lt>derf@finalrewind.orgE<gt> =head1 LICENSE This module is licensed under the same terms as Perl itself.
lib/Travel/Status/DE/HAFAS.pm +1 −1 Original line number Diff line number Diff line Loading @@ -1204,7 +1204,7 @@ of this module's features. Set B<hafas=>I<service> to use a specific service. =head1 AUTHOR Copyright (C) 2015-2024 by Birte Kristina Friesel E<lt>derf@finalrewind.orgE<gt> Copyright (C) 2015-2025 Birte Kristina Friesel E<lt>derf@finalrewind.orgE<gt> =head1 LICENSE Loading