aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
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 /IkiWiki.pm
parentff0e244701a6ead7f5a0b5826ac39bd42bad55ff (diff)
downloadikiwiki-321bf7ec19641d12626c71f87792b4edf40aa306.tar
ikiwiki-321bf7ec19641d12626c71f87792b4edf40aa306.tar.gz
match_glob: streamline glob cache slightly
Diffstat (limited to 'IkiWiki.pm')
-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;
}