Loading bin/hafas-m +11 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ use 5.010; our $VERSION = '1.05'; use Getopt::Long qw(:config no_ignore_case); use List::MoreUtils qw(uniq); use List::Util qw(first max); use Travel::Status::DE::HAFAS; Loading Loading @@ -58,6 +59,16 @@ for my $type ( split( qr{,}, $types ) ) { } } if ( $train_type{help} or $train_type{list} or $train_type{'?'} ) { my @mots = @{ Travel::Status::DE::HAFAS::get_service($service)->{productbits} }; @mots = grep { $_ ne 'x' } @mots; @mots = uniq @mots; @mots = sort @mots; say join( "\n", @mots ); exit 0; } my $status = Travel::Status::DE::HAFAS->new( date => $date, language => $language, Loading lib/Travel/Status/DE/HAFAS.pm +9 −0 Original line number Diff line number Diff line Loading @@ -237,7 +237,16 @@ sub get_services { return @services; } # static sub get_service { my ($service) = @_; $service //= 'DB'; return $hafas_instance{$service}; } sub get_active_service { my ($self) = @_; return %{ $hafas_instance{ $self->{active_service} } }; Loading Loading
bin/hafas-m +11 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ use 5.010; our $VERSION = '1.05'; use Getopt::Long qw(:config no_ignore_case); use List::MoreUtils qw(uniq); use List::Util qw(first max); use Travel::Status::DE::HAFAS; Loading Loading @@ -58,6 +59,16 @@ for my $type ( split( qr{,}, $types ) ) { } } if ( $train_type{help} or $train_type{list} or $train_type{'?'} ) { my @mots = @{ Travel::Status::DE::HAFAS::get_service($service)->{productbits} }; @mots = grep { $_ ne 'x' } @mots; @mots = uniq @mots; @mots = sort @mots; say join( "\n", @mots ); exit 0; } my $status = Travel::Status::DE::HAFAS->new( date => $date, language => $language, Loading
lib/Travel/Status/DE/HAFAS.pm +9 −0 Original line number Diff line number Diff line Loading @@ -237,7 +237,16 @@ sub get_services { return @services; } # static sub get_service { my ($service) = @_; $service //= 'DB'; return $hafas_instance{$service}; } sub get_active_service { my ($self) = @_; return %{ $hafas_instance{ $self->{active_service} } }; Loading