diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-10-17 18:28:56 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-10-17 18:28:56 +0000 |
commit | 38179ca84eeed2ad75093f0292f9321d5d93a899 (patch) | |
tree | 8f5a6881ccfba73cd4d1f085eb909f6b1a69f1bd | |
parent | b0b541d280ec32199af631eb97d71599643f285a (diff) | |
download | perl-MDK-Common-38179ca84eeed2ad75093f0292f9321d5d93a899.tar perl-MDK-Common-38179ca84eeed2ad75093f0292f9321d5d93a899.tar.gz perl-MDK-Common-38179ca84eeed2ad75093f0292f9321d5d93a899.tar.bz2 perl-MDK-Common-38179ca84eeed2ad75093f0292f9321d5d93a899.tar.xz perl-MDK-Common-38179ca84eeed2ad75093f0292f9321d5d93a899.zip |
ensure a missing "=cut" doesn't make perl_checker go crazy (eg: when titi adds some doc)
-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 = /#-#/; |