From: Tony Cook <tony@develop-help.com>
Date: Sun, 14 Jun 2020 03:12:43 +0000 (+1000)
Subject: test we don't use vars and that we have use 5.006.
X-Git-Url: http://git.imager.perl.org/imager.git/commitdiff_plain/9a4561f563e25adfbf2e3dae4484f755d30c62d7

test we don't use vars and that we have use 5.006.
---

diff --git a/t/950-kwalitee/080-nousevars.t b/t/950-kwalitee/080-nousevars.t
new file mode 100644
index 00000000..c1fa27ad
--- /dev/null
+++ b/t/950-kwalitee/080-nousevars.t
@@ -0,0 +1,17 @@
+#!perl -w
+use strict;
+use ExtUtils::Manifest qw(maniread);
+use Test::More;
+
+my $manifest = maniread();
+my @pm = sort grep /\.pm$/ && !m(Devel/CheckLib.pm$), keys %$manifest;
+
+for my $file (@pm) {
+  open my $pm, "<", $file
+    or die "Cannot open $file; $!";
+  my $lines = join "", <$pm>;
+  ok($lines =~ /^ *our \$VERSION/m, "$file: has a \$VERSION");
+  ok($lines =~ /^use 5\.006;$/m, "$file: has use 5.006");
+  ok($lines !~ /use vars/, "$file: hasn't any use vars");
+}
+done_testing();