diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-01-29 19:20:50 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-01-29 19:20:50 +0100 |
commit | 911db44a6cc31431d34dd9fc1dbfe1e1777b2b64 (patch) | |
tree | b7c1a0cac29ec995492a1b8825a4631f1a719736 /lib/Travel/Status/DE/IRIS.pm | |
parent | 12a5effb576b0d21a1ae47912d65b67f612c8fbd (diff) |
IRIS, Result: Do not use smartmatch
Diffstat (limited to 'lib/Travel/Status/DE/IRIS.pm')
-rw-r--r-- | lib/Travel/Status/DE/IRIS.pm | 12 |
1 files changed, 7 insertions, 5 deletions
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; } } |