File: 080-nousevars.t

package info (click to toggle)
libimager-perl 1.027%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,820 kB
  • sloc: perl: 32,971; ansic: 28,092; makefile: 52; cpp: 4
file content (17 lines) | stat: -rw-r--r-- 485 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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();