summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2024-08-25 09:51:39 +0200
committerBirte Kristina Friesel <birte.friesel@uos.de>2024-08-25 09:51:39 +0200
commit7dbd5108f5aa528e7807af3daafdd7dfb07ac4fb (patch)
tree75c1643a5be8001e325bf6229232f34b08294923 /lib
parente496f34310d890522b3d5086be06f4b12feaf07f (diff)
-m: allow specifying mot bits directly
Diffstat (limited to 'lib')
-rw-r--r--lib/Travel/Status/DE/HAFAS.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/HAFAS.pm b/lib/Travel/Status/DE/HAFAS.pm
index 57ec624..316d583 100644
--- a/lib/Travel/Status/DE/HAFAS.pm
+++ b/lib/Travel/Status/DE/HAFAS.pm
@@ -376,6 +376,9 @@ sub mot_mask {
if ( exists $mot_pos{$mot} ) {
$mot_mask |= 1 << $mot_pos{$mot};
}
+ elsif ( $mot =~ m{ ^ \d+ $ }x ) {
+ $mot_mask |= 1 << $mot;
+ }
}
}
@@ -384,6 +387,9 @@ sub mot_mask {
if ( exists $mot_pos{$mot} ) {
$mot_mask &= ~( 1 << $mot_pos{$mot} );
}
+ elsif ( $mot =~ m{ ^ \d+ $ }x ) {
+ $mot_mask &= ~( 1 << $mot );
+ }
}
}