From 911db44a6cc31431d34dd9fc1dbfe1e1777b2b64 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Mon, 29 Jan 2024 19:20:50 +0100 Subject: IRIS, Result: Do not use smartmatch --- lib/Travel/Status/DE/IRIS.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib/Travel/Status/DE/IRIS.pm') diff --git a/lib/Travel/Status/DE/IRIS.pm b/lib/Travel/Status/DE/IRIS.pm index 677c671..faae7f1 100644 --- a/lib/Travel/Status/DE/IRIS.pm +++ b/lib/Travel/Status/DE/IRIS.pm @@ -4,14 +4,12 @@ use strict; use warnings; use 5.014; -no if $] >= 5.018, warnings => 'experimental::smartmatch'; - our $VERSION = '1.93'; use Carp qw(confess cluck); use DateTime; use DateTime::Format::Strptime; -use List::Util qw(first); +use List::Util qw(none first); use List::MoreUtils qw(uniq); use List::UtilsBy qw(uniq_by); use LWP::UserAgent; @@ -554,8 +552,12 @@ sub get_station { if ( $opt{recursive} and defined $station_node->getAttribute('meta') ) { my @refs = uniq( split( m{ \| }x, $station_node->getAttribute('meta') ) ); - @refs = grep { not( $_ ~~ \@seen or $_ ~~ \@queue ) } @refs; - push( @queue, @refs ); + for my $ref (@refs) { + if ( none { $_ == $ref } @seen and none { $_ == $ref } @queue ) + { + push( @queue, @refs ); + } + } $opt{root} = 0; } } -- cgit v1.2.3