Loading bin/db-iris +1 −2 Original line number Diff line number Diff line Loading @@ -93,8 +93,7 @@ my $status = Travel::Status::DE::IRIS->new( sub get_station { my ($input_name) = @_; my @stations = Travel::Status::DE::IRIS::Stations::get_station_by_name($input_name); my @stations = Travel::Status::DE::IRIS::Stations::get_station($input_name); if ( @stations == 0 ) { say STDERR "No station matches '$input_name'"; Loading lib/Travel/Status/DE/IRIS/Stations.pm +22 −0 Original line number Diff line number Diff line Loading @@ -15100,6 +15100,18 @@ sub get_stations { return @stations; } sub get_station { my ( $name ) = @_; my $ds100_match = firstval { $name eq $_->[0] } @stations; if ($ds100_match) { return ($ds100_match); } return get_station_by_name($name); } sub get_station_by_name { my ( $name ) = @_; Loading Loading @@ -15165,6 +15177,16 @@ B<Note:> Station codes may contain whitespace. Returns a list of [station code, station name] listrefs lexically sorted by station name. =item Travel::Status::DE::IRIS::get_station(I<$in>) Returns a list of [station code, station name] listrefs matching I<$in>. If a I<$in> is a valid station code, only one element ([I<$in>, related name]) is returned. Otherwise, it is passed to get_station_by_name(I<$in>) (see below). Note that station codes matching is case sensitive and must be exact. =item Travel::Status::DE::IRIS::get_station_by_name(I<$name>) Returns a list of [station code, station name] listrefs where the station Loading scripts/acronyms.pl +18 −2 Original line number Diff line number Diff line Loading @@ -45,15 +45,21 @@ sub get_stations { return @stations; } sub get_station_by_name { sub get_station { my ( $name ) = @_; my $ds100_match = firstval { $nname eq $_->[0] } @stations; my $ds100_match = firstval { $name eq $_->[0] } @stations; if ($ds100_match) { return ($ds100_match); } return get_station_by_name($name); } sub get_station_by_name { my ( $name ) = @_; my $nname = lc($name); my $actual_match = firstval { $nname eq lc($_->[1]) } @stations; Loading Loading @@ -116,6 +122,16 @@ B<Note:> Station codes may contain whitespace. Returns a list of [station code, station name] listrefs lexically sorted by station name. =item Travel::Status::DE::IRIS::get_station(I<$in>) Returns a list of [station code, station name] listrefs matching I<$in>. If a I<$in> is a valid station code, only one element ([I<$in>, related name]) is returned. Otherwise, it is passed to get_station_by_name(I<$in>) (see below). Note that station codes matching is case sensitive and must be exact. =item Travel::Status::DE::IRIS::get_station_by_name(I<$name>) Returns a list of [station code, station name] listrefs where the station Loading Loading
bin/db-iris +1 −2 Original line number Diff line number Diff line Loading @@ -93,8 +93,7 @@ my $status = Travel::Status::DE::IRIS->new( sub get_station { my ($input_name) = @_; my @stations = Travel::Status::DE::IRIS::Stations::get_station_by_name($input_name); my @stations = Travel::Status::DE::IRIS::Stations::get_station($input_name); if ( @stations == 0 ) { say STDERR "No station matches '$input_name'"; Loading
lib/Travel/Status/DE/IRIS/Stations.pm +22 −0 Original line number Diff line number Diff line Loading @@ -15100,6 +15100,18 @@ sub get_stations { return @stations; } sub get_station { my ( $name ) = @_; my $ds100_match = firstval { $name eq $_->[0] } @stations; if ($ds100_match) { return ($ds100_match); } return get_station_by_name($name); } sub get_station_by_name { my ( $name ) = @_; Loading Loading @@ -15165,6 +15177,16 @@ B<Note:> Station codes may contain whitespace. Returns a list of [station code, station name] listrefs lexically sorted by station name. =item Travel::Status::DE::IRIS::get_station(I<$in>) Returns a list of [station code, station name] listrefs matching I<$in>. If a I<$in> is a valid station code, only one element ([I<$in>, related name]) is returned. Otherwise, it is passed to get_station_by_name(I<$in>) (see below). Note that station codes matching is case sensitive and must be exact. =item Travel::Status::DE::IRIS::get_station_by_name(I<$name>) Returns a list of [station code, station name] listrefs where the station Loading
scripts/acronyms.pl +18 −2 Original line number Diff line number Diff line Loading @@ -45,15 +45,21 @@ sub get_stations { return @stations; } sub get_station_by_name { sub get_station { my ( $name ) = @_; my $ds100_match = firstval { $nname eq $_->[0] } @stations; my $ds100_match = firstval { $name eq $_->[0] } @stations; if ($ds100_match) { return ($ds100_match); } return get_station_by_name($name); } sub get_station_by_name { my ( $name ) = @_; my $nname = lc($name); my $actual_match = firstval { $nname eq lc($_->[1]) } @stations; Loading Loading @@ -116,6 +122,16 @@ B<Note:> Station codes may contain whitespace. Returns a list of [station code, station name] listrefs lexically sorted by station name. =item Travel::Status::DE::IRIS::get_station(I<$in>) Returns a list of [station code, station name] listrefs matching I<$in>. If a I<$in> is a valid station code, only one element ([I<$in>, related name]) is returned. Otherwise, it is passed to get_station_by_name(I<$in>) (see below). Note that station codes matching is case sensitive and must be exact. =item Travel::Status::DE::IRIS::get_station_by_name(I<$name>) Returns a list of [station code, station name] listrefs where the station Loading