diff options
Diffstat (limited to 'lib/DBInfoscreen.pm')
-rw-r--r-- | lib/DBInfoscreen.pm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/DBInfoscreen.pm b/lib/DBInfoscreen.pm index e7bdf80..700a4c9 100644 --- a/lib/DBInfoscreen.pm +++ b/lib/DBInfoscreen.pm @@ -5,6 +5,7 @@ use Mojo::Base 'Mojolicious'; # License: 2-Clause BSD use Cache::File; +use DBInfoscreen::Helper::HAFAS; use File::Slurp qw(read_file); use JSON; use Travel::Status::DE::HAFAS; @@ -95,6 +96,19 @@ sub startup { ); $self->helper( + hafas => sub { + my ($self) = @_; + state $hafas = DBInfoscreen::Helper::HAFAS->new( + log => $self->app->log, + main_cache => $self->app->cache_iris_main, + realtime_cache => $self->app->cache_iris_rt, + user_agent => $self->ua, + version => $VERSION, + ); + } + ); + + $self->helper( 'handle_no_results' => sub { my ( $self, $backend, $station, $errstr ) = @_; |