CPANPLUS-Dist-Build
view release on metacpan or search on metacpan
lib/CPANPLUS/Dist/Build.pm view on Meta::CPAN
>= version->new('0.9102');
}
### allows for a user defined callback to filter the prerequisite
### list as they see fit, to remove (or add) any prereqs they see
### fit. The default installed callback will return the hashref in
### an unmodified form
### this callback got added after cpanplus 0.0562, so use a 'can'
### to find out if it's supported. For older versions, we'll just
### return the hashref as is ourselves.
my $href = $cb->_callbacks->can('filter_prereqs')
? $cb->_callbacks->filter_prereqs->( $cb, $prereqs )
: $prereqs;
$self->status->prereqs( $href );
### make sure it's not the same ref
return { %$href };
}
sub create {
lib/CPANPLUS/Dist/Build.pm view on Meta::CPAN
unless ( scalar run( command => $cmd,
buffer => \$test_output,
verbose => $verbose )
) {
error( loc( "MAKE TEST failed:\n%1 ", $test_output ), ( $verbose ? 0 : 1 ) );
### mark specifically *test* failure.. so we don't
### send success on force...
$test_fail++;
if( !$force and !$cb->_callbacks->proceed_on_test_failure->(
$self, $@ )
) {
$dist->status->test(0);
if ( $conf->get_conf('cpantest') ) {
$status->{stage} = 'test';
$status->{capture} = $test_output;
}
$fail++; last RUN;
}
t/02_CPANPLUS-Dist-Build.t view on Meta::CPAN
);
### Disable certain possible settings, so we dont accidentally
### touch anything outside our sandbox
{
### set buildflags to install in our dummy perl dir
$Conf->set_conf( buildflags => "install_base=$Lib" );
### don't start sending test reports now... ###
$CB->_callbacks->send_test_report( sub { 0 } );
$Conf->set_conf( cpantest => 0 );
### we dont need sudo -- we're installing in our own sandbox now
$Conf->set_program( sudo => undef );
}
use_ok( $Class );
ok( $Class->format_available, "Format is available" );
( run in 0.775 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )