From 50df6aa76dca9440f4aaeb86ab6893366bcef296 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 20 Dec 2014 14:13:18 +0100 Subject: index: Use List::MoreUtils::any with full package name 'any' is also used by Mojolicious' routing engine, so otherwise we have namespace clashes --- index.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'index.pl') diff --git a/index.pl b/index.pl index c311f20..21f43d9 100644 --- a/index.pl +++ b/index.pl @@ -1,7 +1,7 @@ #!/usr/bin/env perl use Mojolicious::Lite; use Cache::File; -use List::MoreUtils qw(any); +use List::MoreUtils qw(); use Travel::Status::DE::DeutscheBahn; use Travel::Status::DE::IRIS; use Travel::Status::DE::IRIS::Stations; @@ -206,14 +206,14 @@ sub handle_request { if ( $result->isa('Travel::Status::DE::IRIS::Result') ) { @route = $result->route_post; } - if ( not( any { $_ =~ m{$via}io } @route ) ) { + if ( not( List::MoreUtils::any { $_ =~ m{$via}io } @route ) ) { next; } } - if ( @platforms and not( any { $_ eq $platform } @platforms ) ) { + if ( @platforms and not( List::MoreUtils::any { $_ eq $platform } @platforms ) ) { next; } - if ( @lines and not( any { $line =~ m{^$_} } @lines ) ) { + if ( @lines and not( List::MoreUtils::any { $line =~ m{^$_} } @lines ) ) { next; } if ( $backend eq 'iris' and $admode eq 'arr' and not $result->arrival ) -- cgit v1.2.3