summaryrefslogtreecommitdiff
path: root/lib/Travelynx.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-11-16 15:24:16 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-11-16 15:24:16 +0100
commit77e4998708a31d38e4d04f185c9fc12e26245d2c (patch)
tree0296fcf3092e2854d678ec0ae40979decb522b14 /lib/Travelynx.pm
parent45f747961e14c5f63e895cdda97a830c5837a118 (diff)
move station -> location map to generic helper
Diffstat (limited to 'lib/Travelynx.pm')
-rwxr-xr-xlib/Travelynx.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm
index d2ee821..741af2a 100755
--- a/lib/Travelynx.pm
+++ b/lib/Travelynx.pm
@@ -168,6 +168,21 @@ sub startup {
}
);
+ $self->attr(
+ coordinates_by_station => sub {
+ my %location;
+ for
+ my $station ( Travel::Status::DE::IRIS::Stations::get_stations() )
+ {
+ if ( $station->[3] ) {
+ $location{ $station->[1] }
+ = [ $station->[4], $station->[3] ];
+ }
+ }
+ return \%location;
+ }
+ );
+
$self->helper(
sendmail => sub {
state $sendmail = Travelynx::Helper::Sendmail->new(