Travel::Routing::DE::EFA::Route::Message - contains a message related to a route or route part.
Contents
Bugs And Limitations
This module does not yet provide access to all data provided by the backend. Most notably, raw_content
is not properly parsed yet.
Dependencies
None.
Description
Travel::Routing::DE::EFA::Route::Message contains information about a specific route or route part, such
as wheelchair accessibility, unscheduled route diversions and cancelled stops. Often, this information is
not used in the backend's route calculation, so a message may invalidate a certain route or route part.
There are two types of messages provided by the backend: oneliners and detailed messages. There is no
known distinction regarding their type or content. Also, there are some other backend-provided fields
not yet covered by this module, so expect changes in future releases.
A oneline message consists of a single string which can be accesed using subject or summary and its
is_detailed accessor returns false.
A detailed message has a subject, subtitle, summary and detailed HTML content.
Diagnostics
None.
License
This program is licensed under the same terms as Perl itself.
perl v5.36.0 2023-11-27 Travel::Routing...:Route::Message(3pm)
Methods
ACCESSORS
$message->is_detailed
True if all accessors (fields) are set, false otherwise. When this field is false, only summary and
subject are set (and they will return the same string).
$message->summary
Message summary.
$message->subject
Message subject. May be the same string as the subtitle.
$message->subtitle
Message subtitle. May be the same string as the summary.
$message->raw_content
Raw HTML content. May contain information not available via any other accessor.
Name
Travel::Routing::DE::EFA::Route::Message - contains a message related to a route or route part.
See Also
Travel::Routing::DE::EFA(3pm), Travel::Routing::DE::EFA::Route::Part(3pm).
Synopsis
for my $m ($routepart->regular_notes, $routepart->current_notes) {
if ($m->is_detailed) {
printf("%s: %s\n", $m->subtitle, $m->subject);
}
else {
say $m->summary;
}
}
Version
version 2.24
