From a32f9cd8ad7314dd4aff74deaa7ab38de04a8d6e Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 17 Oct 2002 18:28:56 +0000 Subject: ensure a missing "=cut" doesn't make perl_checker go crazy (eg: when titi adds some doc) --- perl_checker | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/perl_checker b/perl_checker index c40c505..2e18fb3 100755 --- a/perl_checker +++ b/perl_checker @@ -41,6 +41,7 @@ sub begin { begin(); while (@ARGV) { + $prev_ARGV = $ARGV; $ARGV = shift @ARGV; $package = 'main'; @@ -57,7 +58,10 @@ while (@ARGV) { push @re_exported, $package; } - /^=head/ .. /^=cut/ and next; + if (/^=(head|begin)/ .. /^=cut/) { + die "missing =cut in $prev_ARGV\n" if $. == 1; + next; + } /^\s*#/ and next; $explicit_no_warning = /#-#/; -- cgit v1.2.1