summaryrefslogtreecommitdiff
path: root/lib/DBInfoscreen.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/DBInfoscreen.pm')
-rw-r--r--lib/DBInfoscreen.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/DBInfoscreen.pm b/lib/DBInfoscreen.pm
index 700a4c9..b31a1a7 100644
--- a/lib/DBInfoscreen.pm
+++ b/lib/DBInfoscreen.pm
@@ -6,6 +6,7 @@ use Mojo::Base 'Mojolicious';
use Cache::File;
use DBInfoscreen::Helper::HAFAS;
+use DBInfoscreen::Helper::Wagonorder;
use File::Slurp qw(read_file);
use JSON;
use Travel::Status::DE::HAFAS;
@@ -18,6 +19,8 @@ no if $] >= 5.018, warnings => 'experimental::smartmatch';
our $VERSION = qx{git describe --dirty} || '0.05';
+chomp $VERSION;
+
my %default = (
backend => 'iris',
mode => 'app',
@@ -109,6 +112,18 @@ sub startup {
);
$self->helper(
+ wagonorder => sub {
+ my ($self) = @_;
+ state $hafas = DBInfoscreen::Helper::Wagonorder->new(
+ log => $self->app->log,
+ cache => $self->app->cache_iris_main,
+ user_agent => $self->ua,
+ version => $VERSION,
+ );
+ }
+ );
+
+ $self->helper(
'handle_no_results' => sub {
my ( $self, $backend, $station, $errstr ) = @_;