local $Params::Check::VERBOSE = 1;
-$VERSION = '0.06';
+$VERSION = '0.06_01';
=pod
### send success on force...
$test_fail++;
- unless($force) {
- $dist->status->test(0);
- $fail++; last RUN;
+ if( !$force and !$cb->_callbacks->proceed_on_test_failure->(
+ $self, $@ )
+ ) {
+ $dist->status->test(0);
+ $fail++; last RUN;
}
+
} else {
$dist->status->test(1);
}
+### make sure we can find our conf.pl file
+BEGIN {
+ use FindBin;
+ require "$FindBin::Bin/inc/conf.pl";
+}
+
+
+
BEGIN { chdir 't' if -d 't' };
### this is to make devel::cover happy ###
### since we're die'ing in the Build.PL, do a local *STDERR,
### so we dont spam the result through the test -- this is expected
### behaviour after all.
- my $rv = do { local *STDERR; $clone->prepare( force => 1 ) };
+ ### also quell the warning for print() on unopened fh...
+ my $rv = do {
+ local $^W;
+ local *STDERR;
+ $clone->prepare( force => 1 )
+ };
ok( !$rv, ' $mod->prepare failed' );
my $re = quotemeta( $build_pl );
sub find_module {
my $module = shift;
- # Don't add the .pm yet, in case it's a packlist or something like ExtUtils::xsubpp.
+ ### Don't add the .pm yet, in case it's a packlist or something
+ ### like ExtUtils::xsubpp.
my $file = File::Spec->catfile( split m/::/, $module );
my $candidate;
foreach (@INC) {
$Locale::Maketext::Lexicon::VERSION = 0;
}
+### clean up files for PERLCORE mostly -- make clean isn't invoked
+### there... otoh, we should clean up after ourselves anyway.
+END {
+ ### chdir to our own test dir, so we know all files are relative
+ ### to this point, no matter whether run from perlcore tests or
+ ### regular CPAN installs
+ chdir "$FindBin::Bin" if -d "$FindBin::Bin";
+
+ ### XXX hardcoded
+ _clean_test_dir( [qw|dummy-perl dummy-cpanplus| ] );
+}
+
+### whenever we start a new script, we want to clean out our
+### old files from the test '.cpanplus' dir..
+sub _clean_test_dir {
+ my $dirs = shift || [];
+ my $verbose = shift || 0;
+
+ for my $dir ( @$dirs ) {
+
+ ### if it's not there, don't bother
+ next unless -d $dir;
+
+ my $dh;
+ opendir $dh, $dir or die "Could not open basedir '$dir': $!";
+ while( my $file = readdir $dh ) {
+ next if $file =~ /^\./; # skip dot files
+
+ my $path = File::Spec->catfile( $dir, $file );
+
+ ### directory, rmtree it
+ if( -d $path ) {
+ print "Deleting directory '$path'\n" if $verbose;
+ eval { rmtree( $path ) };
+ warn "Could not delete '$path' while cleaning up '$dir'" if $@;
+
+ ### regular file
+ } else {
+ print "Deleting file '$path'\n" if $verbose;
+ 1 while unlink $path;
+ }
+ }
+
+ close $dh;
+ }
+
+ return 1;
+}
+
1;
__END__
uupacktool.pl -p lib/CPANPLUS/Dist/Build/t/src/noxs/Foo-Bar-0.01.tar.gz lib/CPANPLUS/Dist/Build/t/src/noxs/Foo-Bar-0.01.tar.gz.packed
-Created at Fri May 4 14:00:53 2007
+Created at Tue May 22 13:44:00 2007
#########################################################################
__UU__
M'XL("-<X34(``T9O;RU"87(M,"XP,2YT87(`[9E;;]HP%,=Y]J<X+9722@-R
uupacktool.pl -p lib/CPANPLUS/Dist/Build/t/src/xs/Foo-Bar-0.01.tar.gz lib/CPANPLUS/Dist/Build/t/src/xs/Foo-Bar-0.01.tar.gz.packed
-Created at Fri May 4 14:00:54 2007
+Created at Tue May 22 13:44:00 2007
#########################################################################
__UU__
M'XL("-\X34(``T9O;RU"87(M,"XP,2YT87(`[5K_3QI)%/=7YZ]XU39H(BN[