Permalink
Browse files

Skip over =encoding when detecting Pod version

  • Loading branch information...
hinrik committed Jul 14, 2009
1 parent 441af62 commit 09653e0fb1171e5377b052a3ad0d4d9b5f705ee8
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/App/Grok.pm
View
@@ -164,7 +164,8 @@ sub detect_source {
my $contents = do { local $/ = undef; scalar <$handle> };
close $handle;
my ($first_pod) = $contents =~ /(^=(?!encoding)\S+)/m;
$contents =~ s/.*^=encoding\b.*$//m; # skip over =encoding
my ($first_pod) = $contents =~ /^(=\S+)/m;
return if !defined $first_pod; # no Pod found
if ($first_pod =~ /^=(?:pod|head\d+|over)$/

0 comments on commit 09653e0

Please sign in to comment.