From 321bf7ec19641d12626c71f87792b4edf40aa306 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 17 Nov 2010 20:04:55 +0000 Subject: [PATCH] match_glob: streamline glob cache slightly --- IkiWiki.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/IkiWiki.pm b/IkiWiki.pm index 75b7a7b3e..57e23fda8 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2493,8 +2493,7 @@ sub match_glob ($$;@) { # Instead of converting the glob to a regex every time, # cache the compiled regex to save time. - if (!exists $glob_cache{$glob} - or !defined $glob_cache{$glob}) { + if (!defined $glob_cache{$glob}) { my $re = IkiWiki::glob2re($glob); $glob_cache{$glob} = qr/^$re$/i; }