diff options
author | Simon McVittie <smcv@debian.org> | 2010-11-20 00:02:49 +0000 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2010-11-20 00:02:49 +0000 |
commit | 55515050e1f3aad13dc96796a347cefa98e8e472 (patch) | |
tree | 973ddcc14ee15b71cd950ff4dd5615885aa59284 /IkiWiki.pm | |
parent | 788105e2a73a3be0f9a05a390702ee28318a5673 (diff) | |
download | ikiwiki-55515050e1f3aad13dc96796a347cefa98e8e472.tar ikiwiki-55515050e1f3aad13dc96796a347cefa98e8e472.tar.gz |
make use of precompiled regex objects
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r-- | IkiWiki.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index bb7d46ccf..e5370f4a6 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2495,7 +2495,7 @@ sub match_glob ($$;@) { # cache the compiled regex to save time. if (!defined $glob_cache{$glob}) { my $re = IkiWiki::glob2re($glob); - $glob_cache{$glob} = qr/^$re$/i; + $glob_cache{$glob} = $re; } if ($page=~ $glob_cache{$glob}) { if (! IkiWiki::isinternal($page) || $params{internal}) { @@ -2667,7 +2667,7 @@ sub match_user ($$;@) { return IkiWiki::ErrorReason->new("no user specified"); } - if (defined $params{user} && $params{user}=~/^$regexp$/i) { + if (defined $params{user} && $params{user}=~$regexp) { return IkiWiki::SuccessReason->new("user is $user"); } elsif (! defined $params{user}) { |