Author: dagolden
Date: Wed Nov 18 08:47:26 2009
New Revision: 13559
Modified:
Module-Build/trunk/t/actions/installdeps.t
Module-Build/trunk/t/bundle_inc.t
Module-Build/trunk/t/lib/DistGen.pm
Module-Build/trunk/t/moduleinfo.t
Module-Build/trunk/t/perl_mb_opt.t
Module-Build/trunk/t/properties/module_name.t
Module-Build/trunk/t/properties/needs_compiler.t
Module-Build/trunk/t/properties/share_dir.t
Module-Build/trunk/t/use_tap_harness.t
Log:
merge whitespace changes from blead
Modified: Module-Build/trunk/t/actions/installdeps.t
==============================================================================
--- Module-Build/trunk/t/actions/installdeps.t (original)
+++ Module-Build/trunk/t/actions/installdeps.t Wed Nov 18 08:47:26 2009
@@ -3,7 +3,7 @@
use MBTest;
use DistGen;
-plan tests => 7;
+plan tests => 7;
# Ensure any Module::Build modules are loaded from correct directory
blib_load('Module::Build');
@@ -41,7 +41,7 @@
$out = stdout_stderr_of( sub {
$dist->run_build('installdeps', '--cpan_client', 'ADLKASJDFLASDJ')
});
-like( $out, qr/cpan_client .* is not executable/,
+like( $out, qr/cpan_client .* is not executable/,
"Build installdeps with bad cpan_client dies"
);
Modified: Module-Build/trunk/t/bundle_inc.t
==============================================================================
--- Module-Build/trunk/t/bundle_inc.t (original)
+++ Module-Build/trunk/t/bundle_inc.t Wed Nov 18 08:47:26 2009
@@ -32,7 +32,7 @@
ok( -d $arch_path, "created temporary M::B pseudo-install directory");
unshift @INC, $lib_path, $arch_path;
-local $ENV{PERL5LIB} = join( $Config{path_sep},
+local $ENV{PERL5LIB} = join( $Config{path_sep},
$lib_path, $arch_path, ($ENV{PERL5LIB} ? $ENV{PERL5LIB} : () )
);
@@ -54,7 +54,7 @@
stdout_stderr_of( sub { $mb->dispatch('distdir') } );
my $dist_inc = File::Spec->catdir($mb->dist_dir, 'inc');
-ok( -e File::Spec->catfile( $dist_inc, 'latest.pm' ),
+ok( -e File::Spec->catfile( $dist_inc, 'latest.pm' ),
"./inc/latest.pm created"
);
@@ -62,7 +62,7 @@
"dist_dir/inc/inc_Module_Build created"
);
-my $mb_file =
+my $mb_file =
File::Spec->catfile( $dist_inc, qw/inc_Module-Build Module Build.pm/ );
ok( -e $mb_file,
@@ -139,7 +139,7 @@
my $output = stdout_stderr_of( sub { $mb->dispatch('distdir') } );
-ok( -e File::Spec->catfile( $dist_inc, 'latest.pm' ),
+ok( -e File::Spec->catfile( $dist_inc, 'latest.pm' ),
"./inc/latest.pm created"
);
@@ -168,7 +168,7 @@
$output = stdout_stderr_of( sub { $mb->dispatch('distdir') } );
-ok( -e File::Spec->catfile( $dist_inc, 'latest.pm' ),
+ok( -e File::Spec->catfile( $dist_inc, 'latest.pm' ),
"./inc/latest.pm created"
);
Modified: Module-Build/trunk/t/lib/DistGen.pm
==============================================================================
--- Module-Build/trunk/t/lib/DistGen.pm (original)
+++ Module-Build/trunk/t/lib/DistGen.pm Wed Nov 18 08:47:26 2009
@@ -38,7 +38,7 @@
$vms_efs_case = VMS::Feature::current("efs_case_preserve");
} else {
my $env_unix_rpt = $ENV{'DECC$FILENAME_UNIX_REPORT'} || '';
- $unix_rpt = $env_unix_rpt =~ /^[ET1]/i;
+ $unix_rpt = $env_unix_rpt =~ /^[ET1]/i;
my $efs_case = $ENV{'DECC$EFS_CASE_PRESERVE'} || '';
$vms_efs_case = $efs_case =~ /^[ET1]/i;
}
@@ -64,7 +64,7 @@
}
sub chdir_all ($) {
- # OS/2 has "current directory per disk", undeletable;
+ # OS/2 has "current directory per disk", undeletable;
# doing chdir() to another disk won't change cur-dir of initial disk...
chdir('/') if $^O eq 'os2';
chdir shift;
@@ -128,7 +128,7 @@
else {
delete $self->{filedata}{$_} for keys %{ $self->{filedata} };
for my $pend ( qw/change remove/ ) {
- delete $self->{pending}{$pend}{$_} for keys %{ $self->{pending}{$pend}
};
+ delete $self->{pending}{$pend}{$_} for keys %{ $self->{pending}{$pend} };
}
}
$self->_gen_default_filedata;
@@ -472,10 +472,10 @@
use strict;
use Module::Build;
my \$b = Module::Build->new(
- # Some CPANPLUS::Dist::Build versions need to allow mismatches
+ # Some CPANPLUS::Dist::Build versions need to allow mismatches
# On logic: thanks to Module::Install, CPAN.pm must set both keys, but
# CPANPLUS sets only the one
- allow_mb_mismatch => (
+ allow_mb_mismatch => (
\$ENV{PERL5_CPANPLUS_IS_RUNNING} && ! \$ENV{PERL5_CPAN_IS_RUNNING} ? 1 : 0
),
$args
@@ -621,7 +621,7 @@
Create a new object and an empty directory to hold the distribution's files.
If no C<dir> option is provided, it defaults to MBTest->tmpdir, which sets
-a different temp directory for Perl core testing and CPAN testing.
+a different temp directory for Perl core testing and CPAN testing.
The C<new> method does not write any files -- see L</regen()> below.
@@ -762,11 +762,11 @@
=head3 remove()
Changes back to the original directory and removes the distribution
-directory (but not the temporary directory set during C<new()>).
+directory (but not the temporary directory set during C<new()>).
$dist = DistGen->new->chdir->regen;
# ... do some testing ...
-
+
$dist->remove->chdir_in->regen;
# ... do more testing ...
Modified: Module-Build/trunk/t/moduleinfo.t
==============================================================================
--- Module-Build/trunk/t/moduleinfo.t (original)
+++ Module-Build/trunk/t/moduleinfo.t Wed Nov 18 08:47:26 2009
@@ -214,7 +214,7 @@
# Test::Builder will prematurely numify objects, so use this form
my $errs;
ok( $pm_info->version eq $expected,
- "correct module version (expected '$expected')" )
+ "correct module version (expected '$expected')" )
or $errs++;
is( $warnings, '', 'no warnings from parsing' ) or $errs++;
diag "Got: '@{[$pm_info->version]}'\nModule contents:\n$module" if $errs;
@@ -268,10 +268,10 @@
is( $pm_info->version, '1.23_01', 'alpha version reported');
# NOTE the following test has be done this way because Test::Builder is
-# too smart for our own good and tries to see if the version object is a
+# too smart for our own good and tries to see if the version object is a
# dual-var, which breaks with alpha versions:
# Argument "1.23_0100" isn't numeric in addition (+) at
-# /usr/lib/perl5/5.8.7/Test/Builder.pm line 505.
+# /usr/lib/perl5/5.8.7/Test/Builder.pm line 505.
ok( $pm_info->version > 1.23, 'alpha version greater than non');
Modified: Module-Build/trunk/t/perl_mb_opt.t
==============================================================================
--- Module-Build/trunk/t/perl_mb_opt.t (original)
+++ Module-Build/trunk/t/perl_mb_opt.t Wed Nov 18 08:47:26 2009
@@ -32,10 +32,10 @@
{
local $ENV{PERL_MB_OPT} = "--verbose --recursive_test_files 1";
- my $out = stdout_stderr_of( sub {
+ my $out = stdout_stderr_of( sub {
$dist->run_build('test');
});
- like( $out, qr/this is a recursive test/,
+ like( $out, qr/this is a recursive test/,
"recursive tests run via PERL_MB_OPT"
);
}
@@ -51,10 +51,10 @@
# verify settings preserved during 'Build test'
{
ok( !$ENV{PERL_MB_OPT}, "PERL_MB_OPT cleared" );
- my $out = stdout_stderr_of( sub {
+ my $out = stdout_stderr_of( sub {
$dist->run_build('test');
});
- like( $out, qr/this is a recursive test/,
+ like( $out, qr/this is a recursive test/,
"recursive tests run via Build object"
);
}
Modified: Module-Build/trunk/t/properties/module_name.t
==============================================================================
--- Module-Build/trunk/t/properties/module_name.t (original)
+++ Module-Build/trunk/t/properties/module_name.t Wed Nov 18 08:47:26 2009
@@ -22,10 +22,10 @@
dist_version => 1,
)->regen;
-my $mb = $dist->new_from_context();
+my $mb = $dist->new_from_context();
isa_ok( $mb, "Module::Build" );
-is( $mb->module_name, "Not::So::Simple",
- "module_name guessed from directory name"
+is( $mb->module_name, "Not::So::Simple",
+ "module_name guessed from directory name"
);
#--------------------------------------------------------------------------#
@@ -44,9 +44,9 @@
dist_abstract => "Don't complain about missing abstract",
)->regen( clean => 1 );
-$mb = $dist->new_from_context();
+$mb = $dist->new_from_context();
isa_ok( $mb, "Module::Build" );
-is( $mb->module_name, "Simple::Name",
+is( $mb->module_name, "Simple::Name",
"module_name guessed from dist_version_from"
);
Modified: Module-Build/trunk/t/properties/needs_compiler.t
==============================================================================
--- Module-Build/trunk/t/properties/needs_compiler.t (original)
+++ Module-Build/trunk/t/properties/needs_compiler.t Wed Nov 18 08:47:26 2009
@@ -14,13 +14,13 @@
# get a Module::Build object and test with it
my $mb;
-stderr_of(sub {
+stderr_of(sub {
ok( $mb = $dist->new_from_context, "Default Build.PL" );
});
ok( ! $mb->needs_compiler, "needs_compiler is false" );
ok( ! exists $mb->{properties}{build_requires}{'ExtUtils::CBuilder'},
- "ExtUtils::CBuilder is not in build_requires"
+ "ExtUtils::CBuilder is not in build_requires"
);
#--------------------------------------------------------------------------#
@@ -32,15 +32,15 @@
c_source => 'src',
});
$dist->regen;
-stderr_of(sub {
- ok( $mb = $dist->new_from_context,
- "Build.PL with c_source"
+stderr_of(sub {
+ ok( $mb = $dist->new_from_context,
+ "Build.PL with c_source"
);
});
is( $mb->c_source, 'src', "c_source is set" );
ok( $mb->needs_compiler, "needs_compiler is true" );
ok( exists $mb->{properties}{build_requires}{'ExtUtils::CBuilder'},
- "ExtUtils::CBuilder was added to build_requires"
+ "ExtUtils::CBuilder was added to build_requires"
);
#--------------------------------------------------------------------------#
@@ -50,14 +50,14 @@
$dist->regen;
$dist->chdir_in;
-stderr_of(sub {
- ok( $mb = $dist->new_from_context,
- "Build.PL with xs files"
+stderr_of(sub {
+ ok( $mb = $dist->new_from_context,
+ "Build.PL with xs files"
);
});
ok( $mb->needs_compiler, "needs_compiler is true" );
ok( exists $mb->{properties}{build_requires}{'ExtUtils::CBuilder'},
- "ExtUtils::CBuilder was added to build_requires"
+ "ExtUtils::CBuilder was added to build_requires"
);
#--------------------------------------------------------------------------#
@@ -71,14 +71,14 @@
});
$dist->regen;
-stderr_of(sub {
+stderr_of(sub {
ok( $mb = $dist->new_from_context ,
- "Build.PL with xs files, but needs_compiler => 0"
+ "Build.PL with xs files, but needs_compiler => 0"
);
});
is( $mb->needs_compiler, 0, "needs_compiler is false" );
-ok( ! exists $mb->{properties}{build_requires}{'ExtUtils::CBuilder'},
- "ExtUtils::CBuilder is not in build_requires"
+ok( ! exists $mb->{properties}{build_requires}{'ExtUtils::CBuilder'},
+ "ExtUtils::CBuilder is not in build_requires"
);
#--------------------------------------------------------------------------#
@@ -92,21 +92,21 @@
});
$dist->regen;
-stderr_of(sub {
+stderr_of(sub {
ok( $mb = $dist->new_from_context ,
"Build.PL with xs files, build_requires EU::CB 0.2"
);
});
ok( $mb->needs_compiler, "needs_compiler is true" );
is( $mb->build_requires->{'ExtUtils::CBuilder'}, 0.2,
- "build_requires for ExtUtils::CBuilder is correct version"
+ "build_requires for ExtUtils::CBuilder is correct version"
);
#--------------------------------------------------------------------------#
# falsify compiler and test error handling
#--------------------------------------------------------------------------#
-my $err = stderr_of( sub {
+my $err = stderr_of( sub {
$mb = $dist->new_from_context( config => { cc => "adfasdfadjdjk" } )
});
ok( $mb, "Build.PL while hiding compiler" );
Modified: Module-Build/trunk/t/properties/share_dir.t
==============================================================================
--- Module-Build/trunk/t/properties/share_dir.t (original)
+++ Module-Build/trunk/t/properties/share_dir.t Wed Nov 18 08:47:26 2009
@@ -2,7 +2,7 @@
use strict;
use lib 't/lib';
-use MBTest;
+use MBTest;
use File::Spec::Functions qw/catdir catfile/;
#--------------------------------------------------------------------------#
@@ -55,7 +55,7 @@
is_deeply( $mb->share_dir, { dist => [ 'share' ] },
"Default share_dir set as dist-type share"
);
-is( $mb->{properties}{requires}{'File::ShareDir'}, '1.00',
+is( $mb->{properties}{requires}{'File::ShareDir'}, '1.00',
"File::ShareDir 1.00 added to 'requires'"
);
@@ -120,7 +120,7 @@
{
module_name => $dist->name,
license => 'perl',
- share_dir => {
+ share_dir => {
dist => 'share',
module => { $dist->name => 'other/share' },
},
@@ -128,8 +128,8 @@
);
$dist->regen;
stdout_stderr_of( sub { $mb = $dist->new_from_context });
-is_deeply( $mb->share_dir,
- { dist => [ 'share' ],
+is_deeply( $mb->share_dir,
+ { dist => [ 'share' ],
module => { $dist->name => ['other/share'] },
},
"Hashref share_dir w/ both dist and module shares (scalar-form)"
@@ -140,7 +140,7 @@
{
module_name => $dist->name,
license => 'perl',
- share_dir => {
+ share_dir => {
dist => [ 'share' ],
module => { $dist->name => ['other/share'] },
},
@@ -148,8 +148,8 @@
);
$dist->regen;
stdout_stderr_of( sub { $mb = $dist->new_from_context });
-is_deeply( $mb->share_dir,
- { dist => [ 'share' ],
+is_deeply( $mb->share_dir,
+ { dist => [ 'share' ],
module => { $dist->name => ['other/share'] },
},
"Hashref share_dir w/ both dist and module shares (array-form)"
@@ -159,7 +159,7 @@
# test constructing to/from mapping
#--------------------------------------------------------------------------#
-is_deeply( $mb->_find_share_dir_files,
+is_deeply( $mb->_find_share_dir_files,
{
catfile(qw/share foo.txt/) => catfile(qw/dist Simple-Share foo.txt/),
catfile(qw/other share bar.txt/) => catfile(qw/module Simple-Share
bar.txt/),
@@ -178,11 +178,11 @@
my $share_list = Module::Build->rscan_dir('blib/lib/auto/share', sub {-f});
-is_deeply(
- [ sort @$share_list ], [
+is_deeply(
+ [ sort @$share_list ], [
'blib/lib/auto/share/dist/Simple-Share/foo.txt',
'blib/lib/auto/share/module/Simple-Share/bar.txt',
- ],
+ ],
"share_dir files copied to blib"
);
@@ -201,11 +201,11 @@
"$temp_install/lib/perl5/auto/share", sub {-f}
);
-is_deeply(
- [ sort @$share_list ], [
+is_deeply(
+ [ sort @$share_list ], [
"$temp_install/lib/perl5/auto/share/dist/Simple-Share/foo.txt",
"$temp_install/lib/perl5/auto/share/module/Simple-Share/bar.txt",
- ],
+ ],
"share_dir files correctly installed"
);
@@ -216,7 +216,7 @@
SKIP: {
eval { require File::ShareDir; File::ShareDir->VERSION(1.00) };
skip "needs File::ShareDir 1.00", 2 if $@;
-
+
unshift @INC, File::Spec->catdir($temp_install, qw/lib perl5/);
require Simple::Share;
Modified: Module-Build/trunk/t/use_tap_harness.t
==============================================================================
--- Module-Build/trunk/t/use_tap_harness.t (original)
+++ Module-Build/trunk/t/use_tap_harness.t Wed Nov 18 08:47:26 2009
@@ -28,7 +28,7 @@
);
$dist->regen;
-ok my $mb = $dist->new_from_context,
+ok my $mb = $dist->new_from_context,
'Construct build object with test_file_exts parameter';
$mb->add_to_cleanup('save_out');
@@ -51,7 +51,7 @@
);
$dist->regen;
-ok $mb = $dist->new_from_context,
+ok $mb = $dist->new_from_context,
'Construct build object with test_file_exts parameter';
$mb->add_to_cleanup('save_out');
@@ -82,13 +82,13 @@
---
$dist->regen;
-ok $mb = $dist->new_from_context,
- 'Construct build object after setting tests to fail';
+ok $mb = $dist->new_from_context,
+ 'Construct build object after setting tests to fail';
# Use uc() so we don't confuse the current test output
$out = stdout_stderr_of( sub { $dist->run_build('test')} );
ok( $?, "'Build test' had non-zero exit code" );
-like( $out, qr{Errors in testing\. Cannot continue\.},
- "Saw emulated Test::Harness die() message"
+like( $out, qr{Errors in testing\. Cannot continue\.},
+ "Saw emulated Test::Harness die() message"
);
# vim:ts=4:sw=4:et:sta