From dea78a04c1d6087054d7540db4ae77357484317e Mon Sep 17 00:00:00 2001 From: dakkar Date: Sat, 3 Feb 2024 16:17:04 +0000 Subject: remote redundant line name from status reason --- lib/WebService/TFL/TubeStatus/Response/LineStatus.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/WebService/TFL/TubeStatus/Response/LineStatus.pm b/lib/WebService/TFL/TubeStatus/Response/LineStatus.pm index 2e8e22b..69ddf20 100644 --- a/lib/WebService/TFL/TubeStatus/Response/LineStatus.pm +++ b/lib/WebService/TFL/TubeStatus/Response/LineStatus.pm @@ -17,6 +17,9 @@ has reason => ( sub new_from_response { my ($class,$response_data) = @_; + $response_data->{reason} =~ s{\A .+? : \s*}{}x + if $response_data->{reason}; + return $class->new($response_data); } -- cgit v1.2.3