]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki.pm
match_glob: streamline glob cache slightly
[ikiwiki.git] / 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;
        }