summaryrefslogtreecommitdiff
path: root/lib/Travel/Status
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2023-01-25 18:58:21 +0100
committerDaniel Friesel <derf@finalrewind.org>2023-01-25 18:58:21 +0100
commit7aea72f583d2eb9576f2cdfe137864d5583bbc51 (patch)
tree675b71db8cdfb3034b85affe796e7564cc8fc084 /lib/Travel/Status
parent48c69450d431df7fb3773fa36a27fb3093914f9f (diff)
Journey: return full line in "line"; use line_no for line number
Diffstat (limited to 'lib/Travel/Status')
-rw-r--r--lib/Travel/Status/DE/HAFAS/Journey.pm14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/Travel/Status/DE/HAFAS/Journey.pm b/lib/Travel/Status/DE/HAFAS/Journey.pm
index 10c80fa..2faaf92 100644
--- a/lib/Travel/Status/DE/HAFAS/Journey.pm
+++ b/lib/Travel/Status/DE/HAFAS/Journey.pm
@@ -16,7 +16,7 @@ Travel::Status::DE::HAFAS::Journey->mk_ro_accessors(
qw(datetime sched_datetime rt_datetime
is_cancelled is_partially_cancelled
station station_uic platform sched_platform rt_platform operator
- id name type type_long class number line load delay
+ id name type type_long class number line line_no load delay
route_end route_start origin destination direction)
);
@@ -168,7 +168,8 @@ sub new {
id => $jid,
name => $name,
number => $train_no,
- line => $line_no,
+ line => $name,
+ line_no => $line_no,
type => $cat,
type_long => $catlong,
class => $class,
@@ -451,9 +452,18 @@ Semantics depend on backend, e.g. "1" and "2" for long-distance trains and
=item $journey->line
+Returns the journey or line name, either in a format like "Bus SB16" (Bus line
+SB16), "RE 42" (RegionalExpress train 42) or "IC 2901" (InterCity train 2901,
+no line information). May contain extraneous whitespace characters. Note that
+this accessor does not return line informatikn for IC/ICE/EC services, even if
+it is available. Use B<line_no> for those.
+
+=item $journey->line_no
+
Returns the line identifier, or undef if it is unknown.
The line identifier may be a single number such as "11" (underground train
line U 11), a single word (e.g. "AIR") or a combination (e.g. "SB16").
+May also provide line numbers of IC/ICE services.
=item $journey->number