summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Travel/Routing/DE/VRR/Route/Part.pm15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/Travel/Routing/DE/VRR/Route/Part.pm b/lib/Travel/Routing/DE/VRR/Route/Part.pm
index e49e122..7fdb6da 100644
--- a/lib/Travel/Routing/DE/VRR/Route/Part.pm
+++ b/lib/Travel/Routing/DE/VRR/Route/Part.pm
@@ -28,14 +28,23 @@ sub new {
sub arrival_stop_and_platform {
my ($self) = @_;
- return sprintf( '%s: %s', $self->get(qw(arrival_stop arrival_platform)) );
+ if ( length( $self->arrival_platform ) ) {
+ return
+ sprintf( '%s: %s', $self->get(qw(arrival_stop arrival_platform)) );
+ }
+ return $self->arrival_stop;
}
sub departure_stop_and_platform {
my ($self) = @_;
- return
- sprintf( '%s: %s', $self->get(qw(departure_stop departure_platform)) );
+ if ( length( $self->departure_platform ) ) {
+
+ return
+ sprintf( '%s: %s',
+ $self->get(qw(departure_stop departure_platform)) );
+ }
+ return $self->arrival_stop;
}
sub extra {