Author: kwilliams
Date: Thu Jul 19 20:17:26 2007
New Revision: 9772

Modified:
   Module-Build/trunk/   (props changed)
   Module-Build/trunk/t/basic.t
   Module-Build/trunk/t/install.t
   Module-Build/trunk/t/metadata2.t
   Module-Build/trunk/t/par.t
   Module-Build/trunk/t/ppm.t
   Module-Build/trunk/t/runthrough.t
   Module-Build/trunk/t/signature.t
   Module-Build/trunk/t/xs.t

Log:
 [EMAIL PROTECTED]:  ken | 2007-07-14 11:15:46 -0500
 Use the new change_build_pl() method


Modified: Module-Build/trunk/t/basic.t
==============================================================================
--- Module-Build/trunk/t/basic.t        (original)
+++ Module-Build/trunk/t/basic.t        Thu Jul 19 20:17:26 2007
@@ -122,23 +122,18 @@
 # Getopt::Long specs work as expected.
 {
   use Config;
-  $dist->change_file( 'Build.PL', <<"---" );
-use Module::Build;
-
-my \$build = Module::Build->new(
-  module_name => @{[$dist->name]},
-  license     => 'perl',
-  get_options => { foo => {},
-                   bar => { type    => '+'  },
-                   bat => { type    => '=s' },
-                   dee => { type    => '=s',
-                            default => 'goo'
-                          },
-                 }
-);
-
-\$build->create_build_script;
----
+  $dist->change_build_pl
+    ({
+      module_name => @{[$dist->name]},
+      license     => 'perl',
+      get_options => { foo => {},
+                      bar => { type    => '+'  },
+                      bat => { type    => '=s' },
+                      dee => { type    => '=s',
+                               default => 'goo'
+                             },
+                    }
+     });
 
   $dist->regen;
   eval {Module::Build->run_perl_script('Build.PL', [], ['--nouse-rcfile', 
'--config', "foocakes=barcakes", '--foo', '--bar', '--bar', '-bat=hello', 
'gee=whiz', '--any', 'hey', '--destdir', 'yo', '--verbose', '1'])};

Modified: Module-Build/trunk/t/install.t
==============================================================================
--- Module-Build/trunk/t/install.t      (original)
+++ Module-Build/trunk/t/install.t      Thu Jul 19 20:17:26 2007
@@ -24,17 +24,13 @@
 #!perl -w
 print "Hello, World!\n";
 ---
-$dist->change_file( 'Build.PL', <<"---" );
-use Module::Build;
-
-my \$build = new Module::Build(
-  module_name => @{[$dist->name]},
+$dist->change_build_pl
+({
+  module_name => $dist->name,
   scripts     => [ 'script' ],
   license     => 'perl',
   requires    => { 'File::Spec' => 0 },
-);
-\$build->create_build_script;
----
+});
 $dist->regen;
 
 

Modified: Module-Build/trunk/t/metadata2.t
==============================================================================
--- Module-Build/trunk/t/metadata2.t    (original)
+++ Module-Build/trunk/t/metadata2.t    Thu Jul 19 20:17:26 2007
@@ -65,17 +65,13 @@
 
 my $dist = DistGen->new( dir => $tmp );
 
-$dist->change_file( 'Build.PL', <<"---" );
-use Module::Build;
-my \$builder = Module::Build->new(
-    module_name         => '@{[$dist->name]}',
+$dist->change_build_pl
+({
+    module_name         => $dist->name,
     dist_version        => '3.14159265',
     license             => 'perl',
     create_readme       => 1,
-);
-
-\$builder->create_build_script();
----
+});
 $dist->regen;
 
 chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!";

Modified: Module-Build/trunk/t/par.t
==============================================================================
--- Module-Build/trunk/t/par.t  (original)
+++ Module-Build/trunk/t/par.t  Thu Jul 19 20:17:26 2007
@@ -46,17 +46,13 @@
 
 =cut
 ---
-$dist->change_file( 'Build.PL', <<"---" );
-
-my \$build = new Module::Build(
-  module_name => @{[$dist->name]},
+$dist->change_build_pl
+({
+  module_name => $dist->name,
   version => '0.01',
   license     => 'perl',
   scripts     => [ 'hello' ],
-);
-
-\$build->create_build_script;
----
+});
 $dist->regen;
 
 chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!";

Modified: Module-Build/trunk/t/ppm.t
==============================================================================
--- Module-Build/trunk/t/ppm.t  (original)
+++ Module-Build/trunk/t/ppm.t  Thu Jul 19 20:17:26 2007
@@ -50,16 +50,12 @@
 
 =cut
 ---
-$dist->change_file( 'Build.PL', <<"---" );
-
-my \$build = new Module::Build(
-  module_name => @{[$dist->name]},
+$dist->change_build_pl
+({
+  module_name => $dist->name,
   license     => 'perl',
   scripts     => [ 'hello' ],
-);
-
-\$build->create_build_script;
----
+});
 $dist->regen;
 
 chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!";

Modified: Module-Build/trunk/t/runthrough.t
==============================================================================
--- Module-Build/trunk/t/runthrough.t   (original)
+++ Module-Build/trunk/t/runthrough.t   Thu Jul 19 20:17:26 2007
@@ -17,17 +17,14 @@
 use DistGen;
 my $dist = DistGen->new( dir => $tmp );
 $dist->remove_file( 't/basic.t' );
-$dist->change_file( 'Build.PL', <<'---' );
-use Module::Build;
-
-my $build = new Module::Build(
+$dist->change_build_pl
+({
   module_name => 'Simple',
   scripts     => [ 'script' ],
   license     => 'perl',
   requires    => { 'File::Spec' => 0 },
-);
-$build->create_build_script;
----
+});
+
 $dist->add_file( 'script', <<'---' );
 #!perl -w
 print "Hello, World!\n";
@@ -209,15 +206,12 @@
 ---
 
   $dist = DistGen->new( dir => $tmp );
-  $dist->change_file( 'Build.PL', <<'---' );
-use Module::Build;
-my $build = new Module::Build(
-  module_name => 'Simple',
-  scripts     => [ 'bin/script.bat' ],
-  license     => 'perl',
-);
-$build->create_build_script;
----
+  $dist->change_build_pl({
+                         module_name => 'Simple',
+                         scripts     => [ 'bin/script.bat' ],
+                         license     => 'perl',
+                        });
+
   $dist->add_file( 'bin/script.bat', $script_data );
 
   $dist->regen;

Modified: Module-Build/trunk/t/signature.t
==============================================================================
--- Module-Build/trunk/t/signature.t    (original)
+++ Module-Build/trunk/t/signature.t    Thu Jul 19 20:17:26 2007
@@ -22,16 +22,12 @@
 
 use DistGen;
 my $dist = DistGen->new( dir => $tmp );
-$dist->change_file( 'Build.PL', <<"---" );
-use Module::Build;
-
-my \$build = new Module::Build(
-  module_name => @{[$dist->name]},
+$dist->change_build_pl
+({
+  module_name => $dist->name,
   license     => 'perl',
   sign        => 1,
-);
-\$build->create_build_script;
----
+});
 $dist->regen;
 
 chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!";

Modified: Module-Build/trunk/t/xs.t
==============================================================================
--- Module-Build/trunk/t/xs.t   (original)
+++ Module-Build/trunk/t/xs.t   Thu Jul 19 20:17:26 2007
@@ -141,19 +141,14 @@
 $dist->remove_file('lib/Dist-Name.pm');
 $dist->remove_file('lib/Dist-Name.xs');
 
-$dist->change_file('Build.PL', <<"---");
-use strict;
-use Module::Build;
-
-my \$builder = Module::Build->new(
+$dist->change_build_pl
+  ({
     dist_name         => 'Dist-Name',
     dist_version_from => 'Simple.pm',
     pm_files => { 'Simple.pm' => 'lib/Simple.pm' },
     xs_files => { 'Simple.xs' => 'lib/Simple.xs' },
-);
+  });
 
-\$builder->create_build_script();
----
 $dist->add_file('Simple.xs', <<"---");
 #include "EXTERN.h"
 #include "perl.h"

Reply via email to