diff options
-rw-r--r-- | perl-MDK-Common.spec | 1 | ||||
-rwxr-xr-x | perl_checker | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/perl-MDK-Common.spec b/perl-MDK-Common.spec index 2f781f8..f76f378 100644 --- a/perl-MDK-Common.spec +++ b/perl-MDK-Common.spec @@ -52,6 +52,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Thu Oct 17 2002 Pixel <pixel@mandrakesoft.com> 1.0.3-17mdk - add a check for function call PKG::f instead of PKG::f() +- ensure a missing "=cut" doesn't make perl_checker go crazy (eg: when titi adds some doc) * Fri Sep 6 2002 Pixel <pixel@mandrakesoft.com> 1.0.3-16mdk - MDK::Common::System::update_gnomekderc: fix adding lines to the last section when it doesn't end with a cr 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 = /#-#/; |