summaryrefslogtreecommitdiff
path: root/lib/Travel
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travel')
-rw-r--r--lib/Travel/Status/DE/DeutscheBahn.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Travel/Status/DE/DeutscheBahn.pm b/lib/Travel/Status/DE/DeutscheBahn.pm
index 8fb0ca2..09834ed 100644
--- a/lib/Travel/Status/DE/DeutscheBahn.pm
+++ b/lib/Travel/Status/DE/DeutscheBahn.pm
@@ -75,9 +75,14 @@ sub new {
}
sub new_from_html {
- my ( $obj, $html ) = @_;
+ my ( $obj, %opt ) = @_;
- my $ref = { html => $html, };
+ my $ref = {
+ html => $opt{html},
+ post => { boardType => $opt{mode} // 'dep' }
+ };
+
+ $ref->{post}->{boardType} = $opt{mode} // 'dep';
$ref->{tree} = XML::LibXML->load_html(
string => $ref->{html},