MooseX::WithCache
MooseX::Workers
MooseX::YAML
- Fey-ORM
+ Fey::ORM
+ KiokuDB
]
);
exit;
+sub test_all_modules {
+ foreach my $project (grep {$_ eq 'Fey::ORM'}@_) {
+ my $dist = get_distro_from_cpan($project);
+
+ unless ($dist) {
+ print $log "UNKNOWN : $project (not on CPAN?)\n";
+ next;
+ }
+
+ my $passed = test_module( $dist->dir() );
+
+ my $msg = $passed ? 'SUCCESS' : 'FAIL';
+
+ print $log sprintf( '%7s : %s - %s', $msg, $project, $dist->base_id() );
+ print $log "\n";
+ }
+}
+
sub get_distro_from_cpan {
my $project = shift;
local $CWD = $dir;
local $ENV{PERL_AUTOINSTALL} = '--defaultdeps';
- if ( -f "Makefile.PL" ) {
- return ! system $^X . ' Makefile.PL && make && make test';
+ if ( -f "Build.PL" ) {
+ _run_commands(
+ [ $^X, 'Build.PL' ],
+ ['./Build'],
+ [qw( ./Build test )],
+ );
}
else {
- return ! system $^X . ' Build.PL && ./Build && ./Build test';
+ _run_commands(
+ [ $^X, 'Makefile.PL' ],
+ ['make'],
+ [qw( make test )],
+ );
}
}
-sub test_all_modules {
- foreach my $project (@_) {
- my $dist = get_distro_from_cpan($project);
-
- unless ($dist) {
- print $log "UNKNOWN : $project (not on CPAN?)\n";
- next;
+sub _run_commands {
+ for my $cmd (@_) {
+ if ( system( @{$cmd} ) ) {
+ warn "Failed to run @{$cmd}\n";
+ return;
}
-
- my $passed = test_module( $dist->dir() );
-
- my $msg = $passed ? 'SUCCESS' : 'FAIL';
-
- print $log sprintf( '%7s : %s - %s', $msg, $project, $dist->base_id() );
- print $log "\n";
}
}