summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-01-30 17:48:06 +0000
committerThierry Vignaud <tv@mageia.org>2012-01-30 17:48:06 +0000
commita1a234d51ca245b130c841dcb899b0d7e2f8dfb9 (patch)
tree850178f0ec28bea6ef9188b8e6d1df17538506cb
parent171d0bcbb0e42b0cacd197ca4705c381f712fe7b (diff)
downloadperl_checker-a1a234d51ca245b130c841dcb899b0d7e2f8dfb9.tar
perl_checker-a1a234d51ca245b130c841dcb899b0d7e2f8dfb9.tar.gz
perl_checker-a1a234d51ca245b130c841dcb899b0d7e2f8dfb9.tar.bz2
perl_checker-a1a234d51ca245b130c841dcb899b0d7e2f8dfb9.tar.xz
perl_checker-a1a234d51ca245b130c841dcb899b0d7e2f8dfb9.zip
(parse_pm) prevent skiping lines when =cut is missing from end of one file (the "..." operator isn't reset between 2 function calls...)
-rwxr-xr-xfake_packages/gen.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/fake_packages/gen.pl b/fake_packages/gen.pl
index acedc93..aefb948 100755
--- a/fake_packages/gen.pl
+++ b/fake_packages/gen.pl
@@ -92,9 +92,11 @@ sub parse_pm {
my $name;
$current_package = '';
my $c;
- foreach (cat_($file)) {
+ my $magic_value = 'MAGEIA_MAGIC_STOP';
+ foreach (cat_($file), $magic_value, $magic_value) {
$c++;
- next if /^=/ ... /^=cut/;
+ next if /^=/ .. /^=cut|^$magic_value/;
+ next if /^$magic_value/;
chomp;
my $orig_line = $_;