5
use Test::More tests => 3;
8
my $bar = Module::Info->new_from_module( 'Bar' );
11
skip "Only works on 5.6.1 and up.", 4 unless $] >= 5.006001;
13
my %mods = $bar->modules_required;
14
is_deeply( [ sort keys %mods ], [ sort qw(Cwd strict Carp) ],
15
"Got the correct modules" );
17
is_deeply( [ sort @{$mods{Cwd}} ], [ sort qw(1 1.00102 v1.1.2) ],
18
"Got the correct versions when speficied" );
20
is_deeply( [], $mods{strict},
21
"Got no version when not specified" );