class_of Util::apply_all_roles 2/2
[gitmo/Moose.git] / xt / version_numbers.t
CommitLineData
ec318f40 1use strict;
2use warnings;
3
4use File::Find::Rule;
5use Module::Info;
6
7use Test::More qw( no_plan );
8
9
10my %versions;
11for 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
19my $moose_ver = $versions{'Moose.pm'};
20
21for 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}