summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/IRIS
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-01-29 19:20:50 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2024-01-29 19:20:50 +0100
commit911db44a6cc31431d34dd9fc1dbfe1e1777b2b64 (patch)
treeb7c1a0cac29ec995492a1b8825a4631f1a719736 /lib/Travel/Status/DE/IRIS
parent12a5effb576b0d21a1ae47912d65b67f612c8fbd (diff)
IRIS, Result: Do not use smartmatch
Diffstat (limited to 'lib/Travel/Status/DE/IRIS')
-rw-r--r--lib/Travel/Status/DE/IRIS/Result.pm17
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/Travel/Status/DE/IRIS/Result.pm b/lib/Travel/Status/DE/IRIS/Result.pm
index c6a1ba2..8b15c93 100644
--- a/lib/Travel/Status/DE/IRIS/Result.pm
+++ b/lib/Travel/Status/DE/IRIS/Result.pm
@@ -5,14 +5,13 @@ use warnings;
use 5.014;
use utf8;
-no if $] >= 5.018, warnings => 'experimental::smartmatch';
-
use parent 'Class::Accessor';
use Carp qw(cluck);
use DateTime;
use DateTime::Format::Strptime;
use List::Compare;
-use List::MoreUtils qw(none uniq lastval);
+use List::Util qw(any);
+use List::MoreUtils qw(uniq lastval);
use Scalar::Util qw(weaken);
our $VERSION = '1.93';
@@ -642,8 +641,8 @@ sub delay_messages {
my @ret;
for my $id (@msgids) {
- if ( my @superseded = $self->superseded_messages($id) ) {
- @ret = grep { not( $_->[2] ~~ \@superseded ) } @ret;
+ for my $superseded ( $self->superseded_messages($id) ) {
+ @ret = grep { not( $_->[2] == $superseded ) } @ret;
}
my $msg = lastval { $_->[2] == $id } @msgs;
push( @ret, $msg );
@@ -697,12 +696,12 @@ sub qos_messages {
my @keys = sort keys %{ $self->{messages} };
my @msgs
- = grep { $_->[1] ~~ [qw[f q]] } map { $self->{messages}{$_} } @keys;
+ = grep { $_->[1] =~ m{^[fq]$} } map { $self->{messages}{$_} } @keys;
my @ret;
for my $msg (@msgs) {
- if ( my @superseded = $self->superseded_messages( $msg->[2] ) ) {
- @ret = grep { not( $_->[2] ~~ \@superseded ) } @ret;
+ for my $superseded ( $self->superseded_messages( $msg->[2] ) ) {
+ @ret = grep { not( $_->[2] == $superseded ) } @ret;
}
@ret = grep { $_->[2] != $msg->[2] } @ret;
@@ -834,7 +833,7 @@ sub route_interesting {
while ( @via_show < $max_parts and @via_main ) {
my $stop = shift(@via_main);
- if ( $stop ~~ \@via_show or $stop eq $last_stop ) {
+ if ( any { $stop eq $_ } @via_show or $stop eq $last_stop ) {
next;
}
push( @via_show, $stop );