Commit | Line | Data |
ec318f40 |
1 | use strict; |
2 | use warnings; |
3 | |
4 | use File::Find::Rule; |
5 | use Module::Info; |
6 | |
7 | use Test::More qw( no_plan ); |
8 | |
9 | |
10 | my %versions; |
11 | for my $pm_file ( File::Find::Rule->file->name( qr/\.pm$/ )->in('lib' ) ) { |
12 | my $mod = Module::Info->new_from_file($pm_file); |
13 | |
14 | ( my $stripped_file = $pm_file ) =~ s{^lib/}{}; |
15 | |
16 | $versions{$stripped_file} = $mod->version; |
17 | } |
18 | |
19 | my $moose_ver = $versions{'Moose.pm'}; |
20 | |
21 | for my $module ( grep { $_ ne 'Moose.pm' } sort keys %versions ) { |
22 | is( $versions{$module}, $moose_ver, |
23 | "version for $module is the same as in Moose.pm" ); |
24 | } |