From 76933635af54fb97fdc8e592e074cc4e5a262f52 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Thu, 7 Sep 2023 16:01:08 +0200 Subject: don't use smartmatch any longer --- lib/JWebmail/Controller/Webmail.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/JWebmail/Controller/Webmail.pm') diff --git a/lib/JWebmail/Controller/Webmail.pm b/lib/JWebmail/Controller/Webmail.pm index acf7557..e06a8f7 100644 --- a/lib/JWebmail/Controller/Webmail.pm +++ b/lib/JWebmail/Controller/Webmail.pm @@ -3,7 +3,7 @@ package JWebmail::Controller::Webmail; use Mojo::Base Mojolicious::Controller; use Carp 'carp'; -use List::Util 'first'; +use List::Util qw(any first); use Mojo::Util qw(encode decode b64_encode b64_decode); use Mojolicious::Types; @@ -141,7 +141,7 @@ sub displayheaders { my $folders = _time { $self->users->folders($auth) } $self, 'user folders'; - unless ( !$self->stash('folder') || $self->stash('folder') ~~ $folders ) { + unless ( !$self->stash('folder') || any { $self->stash('folder') eq $_ } @$folders ) { $self->render(template => 'error', status => 404, error => $self->l('no_folder'), @@ -305,7 +305,7 @@ sub move { my $folder = $self->param('folder'); no warnings 'experimental::smartmatch'; - die "$folder not valid" unless $folder ~~ $folders; + die "$folder not valid" unless any { $folder eq $_ } @$folders; $self->users->move($auth, $_, '', $folder) for @$mm; -- cgit v1.2.3