From: Simon McVittie Date: Wed, 17 Nov 2010 20:04:55 +0000 (+0000) Subject: match_glob: streamline glob cache slightly X-Git-Tag: 3.20101129~38^2~2 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/321bf7ec19641d12626c71f87792b4edf40aa306 match_glob: streamline glob cache slightly --- 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; }