]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
match_glob: streamline glob cache slightly
authorSimon McVittie <smcv@debian.org>
Wed, 17 Nov 2010 20:04:55 +0000 (20:04 +0000)
committerSimon McVittie <smcv@debian.org>
Fri, 19 Nov 2010 23:46:46 +0000 (23:46 +0000)
IkiWiki.pm

index 75b7a7b3e116e84e7708a73845cef01a02b02aa4..57e23fda8c8727d4f5d6d0a9f3022e4e88a77e06 100644 (file)
@@ -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;
        }