summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2010-11-17 20:04:55 +0000
committerSimon McVittie <smcv@debian.org>2010-11-19 23:46:46 +0000
commit321bf7ec19641d12626c71f87792b4edf40aa306 (patch)
tree321acdfb464cdd25e5f0fa03837efd5802bfb083
parentff0e244701a6ead7f5a0b5826ac39bd42bad55ff (diff)
match_glob: streamline glob cache slightly
-rw-r--r--IkiWiki.pm3
1 files changed, 1 insertions, 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;
}