Skip to content
Snippets Groups Projects
Commit 611f947b authored by Síle Ekaterin Liszka's avatar Síle Ekaterin Liszka
Browse files

Chessa::URI: stupify filters method

parent 6833b66a
No related branches found
No related tags found
No related merge requests found
......@@ -135,8 +135,14 @@ sub filters {
foreach my $uri (@uris) {
foreach my $filter (@filters) {
my $regex = qr/$filter/;
if ($uri =~ /$filter/i) {
$uri = URI->new($uri);
my @uri_frags = split /\./, $uri;
my @filter_frags = split /\./, $filter;
while (@uri_frags > @filter_frags) {
shift @uri_frags;
}
$uri = join '.', @uri_frags;
if ((@uri_frags == @filter_frags) && (lc($filter) eq lc($uri))) {
return 1;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment