Permalink
Browse files

Use \Q on the substring we're trying to match

  • Loading branch information...
1 parent c0c8ec4 commit 81b323850906a6dddba5b9f63acf6bef60568592 @hinrik committed Aug 17, 2009
Showing with 4 additions and 1 deletion.
  1. +3 −0 Changes
  2. +1 −1 lib/App/Grok/Resource/Spec.pm
View
@@ -1,3 +1,6 @@
+0.20
+ - Fixed an error in a regex when matching Synopses et al
+
0.19 Wed Aug 12 17:42:49 GMT 2009
- Depend on a Pod::Text::Ansi 0.04
- Added dependency on Pod::Parser 1.36, because earlier versions
@@ -21,7 +21,7 @@ sub spec_fetch {
_build_index() if !%index;
for my $doc (keys %index) {
- if ($doc =~ /^$topic/i) {
+ if ($doc =~ /^\Q$topic/i) {
open my $handle, '<', $index{$doc} or die "Can't open $index{$doc}: $!";
my $pod = do { local $/ = undef; scalar <$handle> };
close $handle;

0 comments on commit 81b3238

Please sign in to comment.