projects
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
321bf7e
)
glob2re: return a precompiled, anchored case-insensitive regex
author
Simon McVittie
<smcv@debian.org>
Fri, 19 Nov 2010 23:59:04 +0000
(23:59 +0000)
committer
Simon McVittie
<smcv@debian.org>
Fri, 19 Nov 2010 23:59:04 +0000
(23:59 +0000)
In practice every use of glob2re uses it like that.
IkiWiki.pm
patch
|
blob
|
history
diff --git
a/IkiWiki.pm
b/IkiWiki.pm
index 57e23fda8c8727d4f5d6d0a9f3022e4e88a77e06..bb7d46ccfb63f8de96a4246b49de1dea67d9b8ea 100644
(file)
--- 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;