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?ds=inline;hp=ff0e244701a6ead7f5a0b5826ac39bd42bad55ff 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; }