From: Simon McVittie Date: Fri, 19 Nov 2010 23:59:04 +0000 (+0000) Subject: glob2re: return a precompiled, anchored case-insensitive regex X-Git-Tag: 3.20101129~38^2~1 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/788105e2a73a3be0f9a05a390702ee28318a5673 glob2re: return a precompiled, anchored case-insensitive regex In practice every use of glob2re uses it like that. --- diff --git a/IkiWiki.pm b/IkiWiki.pm index 57e23fda8..bb7d46ccf 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2388,7 +2388,7 @@ sub glob2re ($) { my $re=quotemeta(shift); $re=~s/\\\*/.*/g; $re=~s/\\\?/./g; - return $re; + return qr/^$re$/i; } package IkiWiki::FailReason;