module-build-checkins Mailing List for Module::Build (Page 14)
Status: Beta
Brought to you by:
kwilliams
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(82) |
Dec
(58) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(49) |
Feb
(57) |
Mar
(49) |
Apr
(49) |
May
(2) |
Jun
(147) |
Jul
(60) |
Aug
(55) |
Sep
(51) |
Oct
(68) |
Nov
(61) |
Dec
(44) |
2006 |
Jan
(27) |
Feb
(38) |
Mar
(89) |
Apr
(31) |
May
(17) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Randy W. S. <si...@us...> - 2005-10-23 02:18:35
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8898 Modified Files: Changes Log Message: Removed the gen_manpages, gen_html, install_manpages, install_html properties that were a failed attempt to provide user control of generation of documentation in favor of method introduced below. Introduced two actions: html & manpages that will generate documentation for POD when the respective feature is enabled. The actions will generate the documents even if there is no set place to install to. However, if the actions are invoked as a dependency of another action (e.g. build), the documentation will only be built when there is a default place to install to. Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.392 retrieving revision 1.393 diff -u -d -r1.392 -r1.393 --- Changes 20 Oct 2005 16:45:18 -0000 1.392 +++ Changes 23 Oct 2005 02:18:15 -0000 1.393 @@ -2,6 +2,13 @@ 0.27_04 + - Introduced two actions: html & manpages that will generate + documentation for POD when the respective feature is enabled. The + actions will generate the documents even if there is no set place + to install to. However, if the actions are invoked as a dependency + of another action (e.g. build), the documentation will only be + built when there is a default or user-specified place to install to. + - Added support for environment variable, 'MODULEBUILDRC', which can be used to specify the full path to an option file to use instead of the default location of ~/.modulebuildrc. A special undocumented |
From: Randy W. S. <si...@us...> - 2005-10-20 22:13:50
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5495/t Modified Files: metadata2.t Log Message: Skip a few tests that require YAML unless it is installed. Also, avoid some warnings in other tests when YAML is not installed. Index: metadata2.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/metadata2.t,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- metadata2.t 20 Oct 2005 16:45:19 -0000 1.4 +++ metadata2.t 20 Oct 2005 22:13:41 -0000 1.5 @@ -21,45 +21,33 @@ ############################## ACTION distmeta works without a MANIFEST file -my $dist = DistGen->new( dir => $tmp, skip_manifest => 1 ); -$dist->regen; - -chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; - -ok ! -e 'MANIFEST'; - -my $mb = Module::Build->new_from_context; +SKIP: { + skip( 'YAML_support feature is not enabled', 4 ) + unless Module::Build->current->feature('YAML_support'); -my $out; -$out = eval { stderr_of(sub{$mb->dispatch('distmeta')}) }; -is $@, ''; + my $dist = DistGen->new( dir => $tmp, skip_manifest => 1 ); + $dist->regen; -like $out, qr/Nothing to enter for 'provides'/; + chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; -ok -e 'META.yml'; + ok ! -e 'MANIFEST'; -chdir( $cwd ) or die "Can''t chdir to '$cwd': $!"; -$dist->remove; + my $mb = Module::Build->new_from_context; + my $out; + $out = eval { stderr_of(sub{$mb->dispatch('distmeta')}) }; + is $@, ''; -############################## Check generation of README file + like $out, qr/Nothing to enter for 'provides'/; -$dist = DistGen->new( dir => $tmp ); + ok -e 'META.yml'; -$dist->change_file( 'Build.PL', <<"---" ); -use Module::Build; -my \$builder = Module::Build->new( - module_name => '@{[$dist->name]}', - dist_version => '3.14159265', - license => 'perl', - create_readme => 1, -); + chdir( $cwd ) or die "Can''t chdir to '$cwd': $!"; + $dist->remove; +} -\$builder->create_build_script(); ---- -$dist->regen; -chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; +############################## Check generation of README file my $provides; # Used a bunch of times below @@ -87,7 +75,25 @@ } -# .pm File with pod +my $dist = DistGen->new( dir => $tmp ); + +$dist->change_file( 'Build.PL', <<"---" ); +use Module::Build; +my \$builder = Module::Build->new( + 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]}': $!"; + + +# .pm File with pod # $dist->change_file( 'lib/Simple.pm', <<'---' . $pod_text); @@ -96,8 +102,8 @@ --- $dist->regen( clean => 1 ); ok( -e "lib/Simple.pm", "Creating Simple.pm" ); -$mb = Module::Build->new_from_context; -$mb->dispatch('distmeta'); +my $mb = Module::Build->new_from_context; +$mb->do_create_readme; like( _slurp("README"), qr/NAME/, "Generating README from .pm"); is( $mb->dist_author->[0], 'Simple Simon <si...@si...m>', @@ -118,7 +124,7 @@ ok( -e "lib/Simple.pm", "Creating Simple.pm" ); ok( -e "lib/Simple.pod", "Creating Simple.pod" ); $mb = Module::Build->new_from_context; -$mb->dispatch('distmeta'); +$mb->do_create_readme; like( _slurp("README"), qr/NAME/, "Generating README from .pod"); is( $mb->dist_author->[0], 'Simple Simon <si...@si...m>', "Extracting AUTHOR from .pod"); @@ -143,7 +149,7 @@ ok( -e "lib/Simple.pm", "Creating Simple.pm" ); ok( -e "lib/Simple.pod", "Creating Simple.pod" ); $mb = Module::Build->new_from_context; -$mb->dispatch('distmeta'); +$mb->do_create_readme; like( _slurp("README"), qr/NAME/, "Generating README from .pod over .pm"); is( $mb->dist_author->[0], 'Simple Simon <si...@si...m>', "Extracting AUTHOR from .pod over .pm"); |
From: Randy W. S. <si...@us...> - 2005-10-20 16:45:31
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20639/t Modified Files: common.pl compat.t destinations.t files.t install.t metadata.t metadata2.t notes.t parents.t runthrough.t signature.t tilde.t versions.t xs.t Log Message: Added support for environment variable, 'MODULEBUILDRC', which can be used to specify the full path to an option file to use instead of the default location of ~/.modulebuildrc. A special undocumented setting of 'NONE' tells Module::Build not to load any user settings, so tests can be run without tainting from user options. The primary motivation for this feature is to make it easy to construct tests without needing to pass in an option to disable reading the rcfile for every Module::Build object created. Index: destinations.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/destinations.t,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- destinations.t 20 Oct 2005 09:26:42 -0000 1.33 +++ destinations.t 20 Oct 2005 16:45:19 -0000 1.34 @@ -28,7 +28,7 @@ ######################### use Module::Build; -my $mb = Module::Build->new_from_context( use_rcfile => 0 ); +my $mb = Module::Build->new_from_context; isa_ok( $mb, 'Module::Build::Base' ); my $install_sets = $mb->install_sets; Index: signature.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/signature.t,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- signature.t 20 Oct 2005 09:26:42 -0000 1.14 +++ signature.t 20 Oct 2005 16:45:19 -0000 1.15 @@ -47,7 +47,7 @@ use Module::Build; -my $mb = Module::Build->new_from_context( use_rcfile => 0 ); +my $mb = Module::Build->new_from_context; { Index: compat.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/compat.t,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- compat.t 20 Oct 2005 09:26:42 -0000 1.33 +++ compat.t 20 Oct 2005 16:45:19 -0000 1.34 @@ -53,7 +53,7 @@ ######################### -my $mb = Module::Build->new_from_context( use_rcfile => 0 ); +my $mb = Module::Build->new_from_context; ok $mb; foreach my $type (@makefile_types) { @@ -94,7 +94,7 @@ # Make sure custom builder subclass is used in the created # Makefile.PL - make sure it fails in the right way here. local @Foo::Builder::ISA = qw(Module::Build); - my $foo_builder = Foo::Builder->new_from_context( use_rcfile => 0 ); + my $foo_builder = Foo::Builder->new_from_context; foreach my $style ('passthrough', 'small') { Module::Build::Compat->create_makefile_pl($style, $foo_builder); ok -e 'Makefile.PL'; @@ -109,7 +109,7 @@ } # Now make sure it can actually work. - my $bar_builder = Module::Build->subclass( class => 'Bar::Builder' )->new_from_context( use_rcfile => 0 ); + my $bar_builder = Module::Build->subclass( class => 'Bar::Builder' )->new_from_context; foreach my $style ('passthrough', 'small') { Module::Build::Compat->create_makefile_pl($style, $bar_builder); ok -e 'Makefile.PL'; @@ -124,7 +124,6 @@ my $libdir = File::Spec->catdir( $cwd, 't', 'libdir' ); my $result = $mb->run_perl_script('Makefile.PL', [], [ - 'USE_RCFILE=0', "LIB=$libdir", 'TEST_VERBOSE=1', 'INSTALLDIRS=perl', Index: install.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/install.t,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- install.t 20 Oct 2005 09:26:42 -0000 1.26 +++ install.t 20 Oct 2005 16:45:19 -0000 1.27 @@ -44,7 +44,7 @@ --- $dist->regen; -my $mb = Module::Build->new_from_context( use_rcfile => 0 ); +my $mb = Module::Build->new_from_context; ok $mb; Index: xs.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/xs.t,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- xs.t 20 Oct 2005 09:26:42 -0000 1.31 +++ xs.t 20 Oct 2005 16:45:19 -0000 1.32 @@ -42,7 +42,7 @@ $dist->regen; chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; -my $mb = Module::Build->new_from_context( use_rcfile => 0 ); +my $mb = Module::Build->new_from_context; eval {$mb->dispatch('clean')}; Index: files.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/files.t,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- files.t 20 Oct 2005 09:26:42 -0000 1.10 +++ files.t 20 Oct 2005 16:45:19 -0000 1.11 @@ -5,6 +5,9 @@ use Test::More tests => 6; +use File::Spec (); +my $common_pl = File::Spec->catfile( 't', 'common.pl' ); +require $common_pl; use Cwd (); my $cwd = Cwd::cwd; @@ -17,12 +20,11 @@ chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; -use File::Spec; use IO::File; use Module::Build; -my $mb = Module::Build->new_from_context( use_rcfile => 0 ); +my $mb = Module::Build->new_from_context; my @files; { Index: runthrough.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/runthrough.t,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- runthrough.t 20 Oct 2005 09:26:42 -0000 1.59 +++ runthrough.t 20 Oct 2005 16:45:19 -0000 1.60 @@ -72,7 +72,7 @@ ######################### -my $mb = Module::Build->new_from_context( use_rcfile => 0 ); +my $mb = Module::Build->new_from_context; ok $mb; is $mb->license, 'perl'; Index: versions.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/versions.t,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- versions.t 29 Jun 2005 07:50:41 -0000 1.7 +++ versions.t 20 Oct 2005 16:45:19 -0000 1.8 @@ -5,6 +5,10 @@ use Test::More tests => 2; +use File::Spec (); +my $common_pl = File::Spec->catfile( 't', 'common.pl' ); +require $common_pl; + use Cwd (); my $cwd = Cwd::cwd; my $tmp = File::Spec->catdir( $cwd, 't', '_tmp' ); @@ -16,7 +20,6 @@ ######################### use Module::Build; -use File::Spec; my @mod = split( /::/, $dist->name ); my $file = File::Spec->catfile( $dist->dirname, 'lib', @mod ) . '.pm'; Index: parents.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/parents.t,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- parents.t 28 Jun 2005 03:51:40 -0000 1.2 +++ parents.t 20 Oct 2005 16:45:19 -0000 1.3 @@ -5,6 +5,10 @@ use Test::More tests => 27; +use File::Spec (); +my $common_pl = File::Spec->catfile( 't', 'common.pl' ); +require $common_pl; + ######################### Index: notes.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/notes.t,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- notes.t 20 Oct 2005 09:26:42 -0000 1.15 +++ notes.t 20 Oct 2005 16:45:19 -0000 1.16 @@ -5,6 +5,9 @@ use Test::More tests => 8; +use File::Spec (); +my $common_pl = File::Spec->catfile( 't', 'common.pl' ); +require $common_pl; use Cwd (); my $cwd = Cwd::cwd; @@ -32,7 +35,7 @@ $dist->regen; -my $mb = Module::Build->new_from_context( use_rcfile => 0 ); +my $mb = Module::Build->new_from_context; is $mb->notes('foo'), 'bar'; Index: tilde.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/tilde.t,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- tilde.t 20 Oct 2005 09:26:42 -0000 1.12 +++ tilde.t 20 Oct 2005 16:45:19 -0000 1.13 @@ -35,7 +35,7 @@ my $mb; stdout_of( sub { - $mb = Module::Build->new_from_context( @args, use_rcfile => 0 ); + $mb = Module::Build->new_from_context( @args ); } ); return $mb; Index: common.pl =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/common.pl,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- common.pl 29 Jun 2005 07:12:53 -0000 1.13 +++ common.pl 20 Oct 2005 16:45:19 -0000 1.14 @@ -1,12 +1,16 @@ use strict; use Config; -# In case the test wants to use Test::More or our other bundled -# modules, make sure they can be loaded. They'll still do "use -# Test::More" in the test script. BEGIN { + + # In case the test wants to use Test::More or our other bundled + # modules, make sure they can be loaded. They'll still do "use + # Test::More" in the test script. my $t_lib = File::Spec->catdir('t', 'lib'); push @INC, $t_lib; # Let user's installed version override + + # Make sure none of our tests load the users ~/.modulebuildrc file + $ENV{MODULEBUILDRC} = 'NONE'; } Index: metadata2.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/metadata2.t,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- metadata2.t 20 Oct 2005 09:26:42 -0000 1.3 +++ metadata2.t 20 Oct 2005 16:45:19 -0000 1.4 @@ -28,7 +28,7 @@ ok ! -e 'MANIFEST'; -my $mb = Module::Build->new_from_context( use_rcfile => 0 ); +my $mb = Module::Build->new_from_context; my $out; $out = eval { stderr_of(sub{$mb->dispatch('distmeta')}) }; @@ -96,7 +96,7 @@ --- $dist->regen( clean => 1 ); ok( -e "lib/Simple.pm", "Creating Simple.pm" ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; $mb->dispatch('distmeta'); like( _slurp("README"), qr/NAME/, "Generating README from .pm"); @@ -117,7 +117,7 @@ ok( -e "lib/Simple.pm", "Creating Simple.pm" ); ok( -e "lib/Simple.pod", "Creating Simple.pod" ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; $mb->dispatch('distmeta'); like( _slurp("README"), qr/NAME/, "Generating README from .pod"); is( $mb->dist_author->[0], 'Simple Simon <si...@si...m>', @@ -142,7 +142,7 @@ $dist->regen( clean => 1 ); ok( -e "lib/Simple.pm", "Creating Simple.pm" ); ok( -e "lib/Simple.pod", "Creating Simple.pod" ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; $mb->dispatch('distmeta'); like( _slurp("README"), qr/NAME/, "Generating README from .pod over .pm"); is( $mb->dist_author->[0], 'Simple Simon <si...@si...m>', Index: metadata.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/metadata.t,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- metadata.t 20 Oct 2005 09:26:42 -0000 1.6 +++ metadata.t 20 Oct 2005 16:45:19 -0000 1.7 @@ -32,7 +32,7 @@ chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; use Module::Build; -my $mb = Module::Build->new_from_context( use_rcfile => 0 ); +my $mb = Module::Build->new_from_context; my $provides; # Used a bunch of times below ############################## Single Module @@ -45,7 +45,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; is_deeply($mb->find_dist_packages, {'Simple' => {file => 'lib/Simple.pm', version => '1.23'}}); @@ -54,7 +54,7 @@ package Simple; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; is_deeply($mb->find_dist_packages, {'Simple' => {file => 'lib/Simple.pm'}}); @@ -66,7 +66,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; is_deeply($mb->find_dist_packages, {'Foo::Bar' => { file => 'lib/Simple.pm', version => '1.23' }}); @@ -75,7 +75,7 @@ package Foo::Bar; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; is_deeply($mb->find_dist_packages, {'Foo::Bar' => { file => 'lib/Simple.pm'}}); @@ -91,7 +91,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple.pm', version => '1.23' }, @@ -110,7 +110,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; is_deeply($mb->find_dist_packages, {'Foo' => { file => 'lib/Simple.pm', version => '1.23' }, @@ -128,7 +128,7 @@ package Simple; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple.pm' }}); @@ -144,7 +144,7 @@ package Simple; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple.pm', version => '1.23' }}); @@ -161,7 +161,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple.pm', version => '1.23' }}); @@ -179,9 +179,7 @@ --- $dist->regen( clean => 1 ); my $err = ''; -$err = stderr_of( sub { - $mb = Module::Build->new_from_context( use_rcfile => 0 ) -} ); +$err = stderr_of( sub { $mb = Module::Build->new_from_context } ); $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); is_deeply($provides, {'Simple' => { file => 'lib/Simple.pm', @@ -200,9 +198,7 @@ $VERSION = '2.34'; --- $dist->regen( clean => 1 ); -$err = stderr_of( sub { - $mb = Module::Build->new_from_context( use_rcfile => 0 ); -} ); +$err = stderr_of( sub { $mb = Module::Build->new_from_context } ); $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); is_deeply($provides, {'Foo' => { file => 'lib/Simple.pm', @@ -224,7 +220,7 @@ package Simple; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple.pm' }}); $dist->remove_file( 'lib/Simple2.pm' ); @@ -242,7 +238,7 @@ package Simple; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple.pm', version => '1.23' }}); @@ -262,7 +258,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple2.pm', version => '1.23' }}); @@ -282,7 +278,7 @@ $VERSION = '2.34'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); is_deeply($provides, {'Simple' => { file => 'lib/Simple.pm', @@ -305,7 +301,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); is_deeply($provides, {'Simple' => { file => 'lib/Simple.pm', @@ -329,7 +325,7 @@ package Foo; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; $provides = $mb->find_dist_packages; ok( exists( $provides->{Foo} ) ); # it exist, can't predict which file $dist->remove_file( 'lib/Simple2.pm' ); @@ -347,7 +343,7 @@ package Foo; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; is_deeply($mb->find_dist_packages, {'Foo' => { file => 'lib/Simple.pm', version => '1.23' }}); @@ -366,7 +362,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; is_deeply($mb->find_dist_packages, {'Foo' => { file => 'lib/Simple2.pm', version => '1.23' }}); @@ -386,7 +382,7 @@ $VERSION = '2.34'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); # XXX Should 'Foo' exist ??? Can't predict values for file & version ok( exists( $provides->{Foo} ) ); @@ -408,7 +404,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); ok( exists( $provides->{Foo} ) ); is( $provides->{Foo}{version}, '1.23' ); @@ -434,7 +430,7 @@ --- $dist->regen( clean => 1 ); $err = stderr_of( sub { - $mb = Module::Build->new_from_context( use_rcfile => 0 ); + $mb = Module::Build->new_from_context; } ); $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); is_deeply($provides, @@ -460,7 +456,7 @@ --- $dist->regen( clean => 1 ); $err = stderr_of( sub { - $mb = Module::Build->new_from_context( use_rcfile => 0 ); + $mb = Module::Build->new_from_context; } ); $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); is_deeply($provides, @@ -486,7 +482,7 @@ $VERSION = '3.45'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple.pm', version => '1.23' }}); @@ -499,7 +495,7 @@ $dist->change_file( 'lib/Simple.pm', '' ); $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; is_deeply( $mb->find_dist_packages, {} ); # Simple.pm => =pod..=cut (no package declaration) @@ -517,7 +513,7 @@ =cut --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context( use_rcfile => 0 ); +$mb = Module::Build->new_from_context; is_deeply($mb->find_dist_packages, {}); |
From: Randy W. S. <si...@us...> - 2005-10-20 16:45:28
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20639/lib/Module/Build Modified Files: Base.pm Log Message: Added support for environment variable, 'MODULEBUILDRC', which can be used to specify the full path to an option file to use instead of the default location of ~/.modulebuildrc. A special undocumented setting of 'NONE' tells Module::Build not to load any user settings, so tests can be run without tainting from user options. The primary motivation for this feature is to make it easy to construct tests without needing to pass in an option to disable reading the rcfile for every Module::Build object created. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.501 retrieving revision 1.502 diff -u -d -r1.501 -r1.502 --- Base.pm 20 Oct 2005 09:26:42 -0000 1.501 +++ Base.pm 20 Oct 2005 16:45:19 -0000 1.502 @@ -1537,11 +1537,24 @@ sub read_modulebuildrc { my( $self, $action ) = @_; - my $home = $self->_home_dir; - return () unless defined $home; + return () unless $self->use_rcfile; - my $modulebuildrc = File::Spec->catfile( $home, '.modulebuildrc' ); - return () unless -e $modulebuildrc; + my $modulebuildrc; + if ( exists($ENV{MODULEBUILDRC}) && $ENV{MODULEBUILDRC} eq 'NONE' ) { + return (); + } elsif ( exists($ENV{MODULEBUILDRC}) && -e $ENV{MODULEBUILDRC} ) { + $modulebuildrc = $ENV{MODULEBUILDRC}; + } elsif ( exists($ENV{MODULEBUILDRC}) ) { + $self->log_warn("WARNING: Can't find resource file " . + "'$ENV{MODULEBUILDRC}' defined in environment.\n" . + "No options loaded\n"); + return (); + } else { + my $home = $self->_home_dir; + return () unless defined $home; + $modulebuildrc = File::Spec->catfile( $home, '.modulebuildrc' ); + return () unless -e $modulebuildrc; + } my $fh = IO::File->new( $modulebuildrc ) or die "Can't open $modulebuildrc: $!"; @@ -1614,7 +1627,7 @@ my $self = shift; my ($args, $action) = $self->read_args(@_); $self->merge_args($action, %$args); - $self->merge_modulebuildrc( $action, %$args ) if $self->use_rcfile; + $self->merge_modulebuildrc( $action, %$args ); } sub super_classes { |
From: Randy W. S. <si...@us...> - 2005-10-20 16:45:28
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20639 Modified Files: Changes Log Message: Added support for environment variable, 'MODULEBUILDRC', which can be used to specify the full path to an option file to use instead of the default location of ~/.modulebuildrc. A special undocumented setting of 'NONE' tells Module::Build not to load any user settings, so tests can be run without tainting from user options. The primary motivation for this feature is to make it easy to construct tests without needing to pass in an option to disable reading the rcfile for every Module::Build object created. Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.391 retrieving revision 1.392 diff -u -d -r1.391 -r1.392 --- Changes 20 Oct 2005 09:26:42 -0000 1.391 +++ Changes 20 Oct 2005 16:45:18 -0000 1.392 @@ -2,6 +2,12 @@ 0.27_04 + - Added support for environment variable, 'MODULEBUILDRC', which can + be used to specify the full path to an option file to use instead + of the default location of ~/.modulebuildrc. A special undocumented + setting of 'NONE' tells Module::Build not to load any user settings, + so tests can be run without tainting from user options. + - Documented and improved reliminary support for more Getopt::Long style options are supported, including boolean options (--verbose, --no-verbose), and use of hyphens in option names in addition to |
From: Randy W. S. <si...@us...> - 2005-10-20 16:45:28
|
Update of /cvsroot/module-build/Module-Build/lib/Module In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20639/lib/Module Modified Files: Build.pm Log Message: Added support for environment variable, 'MODULEBUILDRC', which can be used to specify the full path to an option file to use instead of the default location of ~/.modulebuildrc. A special undocumented setting of 'NONE' tells Module::Build not to load any user settings, so tests can be run without tainting from user options. The primary motivation for this feature is to make it easy to construct tests without needing to pass in an option to disable reading the rcfile for every Module::Build object created. Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build.pm,v retrieving revision 1.188 retrieving revision 1.189 diff -u -d -r1.188 -r1.189 --- Build.pm 20 Oct 2005 09:26:42 -0000 1.188 +++ Build.pm 20 Oct 2005 16:45:19 -0000 1.189 @@ -571,6 +571,10 @@ install install_base=/home/ken --install_path html=/home/ken/docs/html +If you wish to locate your resource file in a different location, you +can set the environment variable 'MODULEBUILDRC' to the complete +absolute path of the file containing your options. + =head2 How Installation Paths are Determined |
From: Randy W. S. <si...@us...> - 2005-10-20 09:27:05
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10734/t Modified Files: basic.t compat.t destinations.t files.t install.t metadata.t metadata2.t notes.t runthrough.t signature.t tilde.t xs.t Log Message: Changing to a more positive outlook, we change the option 'skip_rcfile' to 'use_rcfile'. Fix a bug in the option translation code that didn't properly translate dashes to underscores when the option was an invertered boolean (i.e. an option beginning with 'no' or 'no-'). Modify tests so that Module::Build objects are constructed with 'use_rcfile' set to false so that user resource files do not interfere with tests. Add brief documentation to describe Global commandline options. Index: destinations.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/destinations.t,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- destinations.t 3 Oct 2005 18:19:03 -0000 1.32 +++ destinations.t 20 Oct 2005 09:26:42 -0000 1.33 @@ -28,7 +28,7 @@ ######################### use Module::Build; -my $mb = Module::Build->new_from_context; +my $mb = Module::Build->new_from_context( use_rcfile => 0 ); isa_ok( $mb, 'Module::Build::Base' ); my $install_sets = $mb->install_sets; Index: signature.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/signature.t,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- signature.t 2 Oct 2005 05:26:07 -0000 1.13 +++ signature.t 20 Oct 2005 09:26:42 -0000 1.14 @@ -47,7 +47,7 @@ use Module::Build; -my $mb = Module::Build->new_from_context; +my $mb = Module::Build->new_from_context( use_rcfile => 0 ); { Index: basic.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/basic.t,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- basic.t 3 Oct 2005 08:45:05 -0000 1.46 +++ basic.t 20 Oct 2005 09:26:42 -0000 1.47 @@ -146,7 +146,7 @@ --- $dist->regen; - eval {Module::Build->run_perl_script('Build.PL', [], ['skip_rcfile=1', '--config', "foocakes=barcakes", '--foo', '--bar', '--bar', '-bat=hello', 'gee=whiz', '--any', 'hey', '--destdir', 'yo', '--verbose', '1'])}; + 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'])}; is $@, ''; my $mb = Module::Build->resume; Index: compat.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/compat.t,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- compat.t 2 Oct 2005 05:26:07 -0000 1.32 +++ compat.t 20 Oct 2005 09:26:42 -0000 1.33 @@ -53,7 +53,7 @@ ######################### -my $mb = Module::Build->new_from_context; +my $mb = Module::Build->new_from_context( use_rcfile => 0 ); ok $mb; foreach my $type (@makefile_types) { @@ -94,7 +94,7 @@ # Make sure custom builder subclass is used in the created # Makefile.PL - make sure it fails in the right way here. local @Foo::Builder::ISA = qw(Module::Build); - my $foo_builder = Foo::Builder->new_from_context(); + my $foo_builder = Foo::Builder->new_from_context( use_rcfile => 0 ); foreach my $style ('passthrough', 'small') { Module::Build::Compat->create_makefile_pl($style, $foo_builder); ok -e 'Makefile.PL'; @@ -109,7 +109,7 @@ } # Now make sure it can actually work. - my $bar_builder = Module::Build->subclass( class => 'Bar::Builder' )->new_from_context; + my $bar_builder = Module::Build->subclass( class => 'Bar::Builder' )->new_from_context( use_rcfile => 0 ); foreach my $style ('passthrough', 'small') { Module::Build::Compat->create_makefile_pl($style, $bar_builder); ok -e 'Makefile.PL'; @@ -124,7 +124,7 @@ my $libdir = File::Spec->catdir( $cwd, 't', 'libdir' ); my $result = $mb->run_perl_script('Makefile.PL', [], [ - 'SKIP_RCFILE=1', + 'USE_RCFILE=0', "LIB=$libdir", 'TEST_VERBOSE=1', 'INSTALLDIRS=perl', Index: install.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/install.t,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- install.t 3 Oct 2005 18:19:03 -0000 1.25 +++ install.t 20 Oct 2005 09:26:42 -0000 1.26 @@ -44,7 +44,7 @@ --- $dist->regen; -my $mb = Module::Build->new_from_context; +my $mb = Module::Build->new_from_context( use_rcfile => 0 ); ok $mb; Index: xs.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/xs.t,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- xs.t 20 Oct 2005 04:45:01 -0000 1.30 +++ xs.t 20 Oct 2005 09:26:42 -0000 1.31 @@ -42,7 +42,7 @@ $dist->regen; chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; -my $mb = Module::Build->new_from_context( skip_rcfile => 1 ); +my $mb = Module::Build->new_from_context( use_rcfile => 0 ); eval {$mb->dispatch('clean')}; Index: files.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/files.t,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- files.t 20 Sep 2005 02:11:28 -0000 1.9 +++ files.t 20 Oct 2005 09:26:42 -0000 1.10 @@ -22,7 +22,7 @@ use Module::Build; -my $mb = Module::Build->new_from_context; +my $mb = Module::Build->new_from_context( use_rcfile => 0 ); my @files; { Index: runthrough.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/runthrough.t,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- runthrough.t 2 Oct 2005 05:26:07 -0000 1.58 +++ runthrough.t 20 Oct 2005 09:26:42 -0000 1.59 @@ -72,7 +72,7 @@ ######################### -my $mb = Module::Build->new_from_context; +my $mb = Module::Build->new_from_context( use_rcfile => 0 ); ok $mb; is $mb->license, 'perl'; @@ -113,7 +113,9 @@ SKIP: { skip( 'YAML_support feature is not enabled', 7 ) unless $have_yaml; - eval {$mb->dispatch('disttest')}; + my $output = eval { + stdout_of( sub { $mb->dispatch('disttest') } ) + }; is $@, ''; # After a test, the distdir should contain a blib/ directory Index: notes.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/notes.t,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- notes.t 29 Jun 2005 08:27:06 -0000 1.14 +++ notes.t 20 Oct 2005 09:26:42 -0000 1.15 @@ -32,7 +32,7 @@ $dist->regen; -my $mb = Module::Build->new_from_context; +my $mb = Module::Build->new_from_context( use_rcfile => 0 ); is $mb->notes('foo'), 'bar'; Index: tilde.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/tilde.t,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- tilde.t 28 Jul 2005 07:29:22 -0000 1.11 +++ tilde.t 20 Oct 2005 09:26:42 -0000 1.12 @@ -35,7 +35,7 @@ my $mb; stdout_of( sub { - $mb = Module::Build->new_from_context( @args ); + $mb = Module::Build->new_from_context( @args, use_rcfile => 0 ); } ); return $mb; Index: metadata2.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/metadata2.t,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- metadata2.t 20 Oct 2005 03:40:48 -0000 1.2 +++ metadata2.t 20 Oct 2005 09:26:42 -0000 1.3 @@ -28,7 +28,7 @@ ok ! -e 'MANIFEST'; -my $mb = Module::Build->new_from_context; +my $mb = Module::Build->new_from_context( use_rcfile => 0 ); my $out; $out = eval { stderr_of(sub{$mb->dispatch('distmeta')}) }; @@ -96,7 +96,7 @@ --- $dist->regen( clean => 1 ); ok( -e "lib/Simple.pm", "Creating Simple.pm" ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); $mb->dispatch('distmeta'); like( _slurp("README"), qr/NAME/, "Generating README from .pm"); @@ -117,7 +117,7 @@ ok( -e "lib/Simple.pm", "Creating Simple.pm" ); ok( -e "lib/Simple.pod", "Creating Simple.pod" ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); $mb->dispatch('distmeta'); like( _slurp("README"), qr/NAME/, "Generating README from .pod"); is( $mb->dist_author->[0], 'Simple Simon <si...@si...m>', @@ -142,7 +142,7 @@ $dist->regen( clean => 1 ); ok( -e "lib/Simple.pm", "Creating Simple.pm" ); ok( -e "lib/Simple.pod", "Creating Simple.pod" ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); $mb->dispatch('distmeta'); like( _slurp("README"), qr/NAME/, "Generating README from .pod over .pm"); is( $mb->dist_author->[0], 'Simple Simon <si...@si...m>', Index: metadata.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/metadata.t,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- metadata.t 28 Jul 2005 07:53:32 -0000 1.5 +++ metadata.t 20 Oct 2005 09:26:42 -0000 1.6 @@ -32,7 +32,7 @@ chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; use Module::Build; -my $mb = Module::Build->new_from_context; +my $mb = Module::Build->new_from_context( use_rcfile => 0 ); my $provides; # Used a bunch of times below ############################## Single Module @@ -45,7 +45,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); is_deeply($mb->find_dist_packages, {'Simple' => {file => 'lib/Simple.pm', version => '1.23'}}); @@ -54,7 +54,7 @@ package Simple; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); is_deeply($mb->find_dist_packages, {'Simple' => {file => 'lib/Simple.pm'}}); @@ -66,7 +66,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); is_deeply($mb->find_dist_packages, {'Foo::Bar' => { file => 'lib/Simple.pm', version => '1.23' }}); @@ -75,7 +75,7 @@ package Foo::Bar; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); is_deeply($mb->find_dist_packages, {'Foo::Bar' => { file => 'lib/Simple.pm'}}); @@ -91,7 +91,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple.pm', version => '1.23' }, @@ -110,7 +110,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); is_deeply($mb->find_dist_packages, {'Foo' => { file => 'lib/Simple.pm', version => '1.23' }, @@ -128,7 +128,7 @@ package Simple; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple.pm' }}); @@ -144,7 +144,7 @@ package Simple; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple.pm', version => '1.23' }}); @@ -161,7 +161,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple.pm', version => '1.23' }}); @@ -179,7 +179,9 @@ --- $dist->regen( clean => 1 ); my $err = ''; -$err = stderr_of( sub { $mb = Module::Build->new_from_context } ); +$err = stderr_of( sub { + $mb = Module::Build->new_from_context( use_rcfile => 0 ) +} ); $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); is_deeply($provides, {'Simple' => { file => 'lib/Simple.pm', @@ -198,7 +200,9 @@ $VERSION = '2.34'; --- $dist->regen( clean => 1 ); -$err = stderr_of( sub { $mb = Module::Build->new_from_context } ); +$err = stderr_of( sub { + $mb = Module::Build->new_from_context( use_rcfile => 0 ); +} ); $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); is_deeply($provides, {'Foo' => { file => 'lib/Simple.pm', @@ -220,7 +224,7 @@ package Simple; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple.pm' }}); $dist->remove_file( 'lib/Simple2.pm' ); @@ -238,7 +242,7 @@ package Simple; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple.pm', version => '1.23' }}); @@ -258,7 +262,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple2.pm', version => '1.23' }}); @@ -278,7 +282,7 @@ $VERSION = '2.34'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); is_deeply($provides, {'Simple' => { file => 'lib/Simple.pm', @@ -301,7 +305,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); is_deeply($provides, {'Simple' => { file => 'lib/Simple.pm', @@ -325,7 +329,7 @@ package Foo; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); $provides = $mb->find_dist_packages; ok( exists( $provides->{Foo} ) ); # it exist, can't predict which file $dist->remove_file( 'lib/Simple2.pm' ); @@ -343,7 +347,7 @@ package Foo; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); is_deeply($mb->find_dist_packages, {'Foo' => { file => 'lib/Simple.pm', version => '1.23' }}); @@ -362,7 +366,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); is_deeply($mb->find_dist_packages, {'Foo' => { file => 'lib/Simple2.pm', version => '1.23' }}); @@ -382,7 +386,7 @@ $VERSION = '2.34'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); # XXX Should 'Foo' exist ??? Can't predict values for file & version ok( exists( $provides->{Foo} ) ); @@ -404,7 +408,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); ok( exists( $provides->{Foo} ) ); is( $provides->{Foo}{version}, '1.23' ); @@ -429,7 +433,9 @@ $VERSION = '2.34'; --- $dist->regen( clean => 1 ); -$err = stderr_of( sub { $mb = Module::Build->new_from_context } ); +$err = stderr_of( sub { + $mb = Module::Build->new_from_context( use_rcfile => 0 ); +} ); $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); is_deeply($provides, {'Simple' => { file => 'lib/Simple.pm', @@ -453,7 +459,9 @@ $VERSION = '2.34'; --- $dist->regen( clean => 1 ); -$err = stderr_of( sub { $mb = Module::Build->new_from_context } ); +$err = stderr_of( sub { + $mb = Module::Build->new_from_context( use_rcfile => 0 ); +} ); $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); is_deeply($provides, {'Simple' => { file => 'lib/Simple.pm', @@ -478,7 +486,7 @@ $VERSION = '3.45'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple.pm', version => '1.23' }}); @@ -491,7 +499,7 @@ $dist->change_file( 'lib/Simple.pm', '' ); $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); is_deeply( $mb->find_dist_packages, {} ); # Simple.pm => =pod..=cut (no package declaration) @@ -509,7 +517,7 @@ =cut --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = Module::Build->new_from_context( use_rcfile => 0 ); is_deeply($mb->find_dist_packages, {}); |
From: Randy W. S. <si...@us...> - 2005-10-20 09:26:50
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10734/lib/Module/Build Modified Files: Base.pm Log Message: Changing to a more positive outlook, we change the option 'skip_rcfile' to 'use_rcfile'. Fix a bug in the option translation code that didn't properly translate dashes to underscores when the option was an invertered boolean (i.e. an option beginning with 'no' or 'no-'). Modify tests so that Module::Build objects are constructed with 'use_rcfile' set to false so that user resource files do not interfere with tests. Add brief documentation to describe Global commandline options. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.500 retrieving revision 1.501 diff -u -d -r1.500 -r1.501 --- Base.pm 20 Oct 2005 03:40:48 -0000 1.500 +++ Base.pm 20 Oct 2005 09:26:42 -0000 1.501 @@ -579,6 +579,8 @@ __PACKAGE__->add_property(meta_add => {}); __PACKAGE__->add_property(meta_merge => {}); __PACKAGE__->add_property(metafile => 'META.yml'); +__PACKAGE__->add_property(use_rcfile => 1); + __PACKAGE__->add_property($_ => 0) for qw( gen_manpages gen_html @@ -625,7 +627,6 @@ ignore_prereq_conflicts ignore_prereq_requires ignore_prereqs - skip_rcfile prefix ); @@ -1342,7 +1343,7 @@ (my $tr_opt = $opt) =~ tr/-/_/; - return $tr_opt if grep $_ eq $tr_opt, qw( + return $tr_opt if grep $tr_opt =~ /^(?:no_?)?$_$/, qw( install_path html_css meta_add @@ -1360,7 +1361,7 @@ ignore_prereq_conflicts ignore_prereq_requires ignore_prereqs - skip_rcfile + use_rcfile ); # normalize only selected option names return $opt; @@ -1398,13 +1399,13 @@ ignore_prereq_conflicts ignore_prereq_requires ignore_prereqs - skip_rcfile + use_rcfile uninst ); # inverted boolean options; eg --noverbose or --no-verbose # converted to proper name & returned with false value (verbose, 0) - if ( grep $opt =~ /^no-?$_$/, @bool_opts ) { + if ( grep $opt =~ /^no[-_]?$_$/, @bool_opts ) { $opt =~ s/^no-?//; return ($opt, 0); } @@ -1613,7 +1614,7 @@ my $self = shift; my ($args, $action) = $self->read_args(@_); $self->merge_args($action, %$args); - $self->merge_modulebuildrc( $action, %$args ) unless $self->skip_rcfile; + $self->merge_modulebuildrc( $action, %$args ) if $self->use_rcfile; } sub super_classes { @@ -2547,10 +2548,13 @@ my $dist_dir = $self->dist_dir; chdir $dist_dir or die "Cannot chdir to $dist_dir: $!"; # XXX could be different names for scripts - - $self->run_perl_script('Build.PL') or die "Error executing 'Build.PL' in dist directory: $!"; - $self->run_perl_script('Build') or die "Error executing 'Build' in dist directory: $!"; - $self->run_perl_script('Build', [], ['test']) or die "Error executing 'Build test' in dist directory"; + + $self->run_perl_script('Build.PL') # XXX Should this be run w/ --nouse-rcfile + or die "Error executing 'Build.PL' in dist directory: $!"; + $self->run_perl_script('Build') + or die "Error executing 'Build' in dist directory: $!"; + $self->run_perl_script('Build', [], ['test']) + or die "Error executing 'Build test' in dist directory"; chdir $start_dir; } |
From: Randy W. S. <si...@us...> - 2005-10-20 09:26:50
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10734 Modified Files: Changes Log Message: Changing to a more positive outlook, we change the option 'skip_rcfile' to 'use_rcfile'. Fix a bug in the option translation code that didn't properly translate dashes to underscores when the option was an invertered boolean (i.e. an option beginning with 'no' or 'no-'). Modify tests so that Module::Build objects are constructed with 'use_rcfile' set to false so that user resource files do not interfere with tests. Add brief documentation to describe Global commandline options. Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.390 retrieving revision 1.391 diff -u -d -r1.390 -r1.391 --- Changes 20 Oct 2005 03:46:29 -0000 1.390 +++ Changes 20 Oct 2005 09:26:42 -0000 1.391 @@ -2,6 +2,14 @@ 0.27_04 + - Documented and improved reliminary support for more Getopt::Long + style options are supported, including boolean options (--verbose, + --no-verbose), and use of hyphens in option names in addition to + underscores. + + - The option to disable/enable reading of the ~/.modulebuildrc file + is changed from 'skip_rcfile' to 'use_rcfile' + - Allow the 'distmeta' action to continue when 'MANIFEST' is missing, omitting the generation of the 'provieds' field. [Steven Schubiger] |
From: Randy W. S. <si...@us...> - 2005-10-20 09:26:50
|
Update of /cvsroot/module-build/Module-Build/lib/Module In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10734/lib/Module Modified Files: Build.pm Log Message: Changing to a more positive outlook, we change the option 'skip_rcfile' to 'use_rcfile'. Fix a bug in the option translation code that didn't properly translate dashes to underscores when the option was an invertered boolean (i.e. an option beginning with 'no' or 'no-'). Modify tests so that Module::Build objects are constructed with 'use_rcfile' set to false so that user resource files do not interfere with tests. Add brief documentation to describe Global commandline options. Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build.pm,v retrieving revision 1.187 retrieving revision 1.188 diff -u -d -r1.187 -r1.188 --- Build.pm 10 Oct 2005 15:20:36 -0000 1.187 +++ Build.pm 20 Oct 2005 09:26:42 -0000 1.188 @@ -499,6 +499,51 @@ =back +=head2 General Commandline Options + +The following options can be used during any invokation of Build.PL or +the Build script, during any action. + +NOTE: There is some preliminary support for options to use the more +familiar long option style. Most options can be preceeded with the +C<--> long option prefix, and the underscores changed to dashes +(e.g. --ignore-prereqs). Additionally, the argument to boolean options +is optional (e.g. --verbose), and boolean options can be negated by +prefixing them with 'no' or 'no-' (e.g. --noverbose or --no-verbose). + +=over 4 + +=item ignore_prereq_conflicts + +When set to true, the Build will not abort when any conflicting +prerequisite is found. + +=item ignore_prereq_requires + +When set to true, the Build will not abort when any required +prerequisite is missing. + +=item ignore_prereqs + +When set to true, the Build will not abort for any type of +prerequisite is not satisfied. + +=item quiet + +Suppress informative messages on output. + +=item use_rcfile + +Load the F<~/.modulebuildrc> option file. This option can be set to +false to prevent the custom resource file from being loaded. + +=item verbose + +Display extra information about the Build on output. + +=back + + =head2 Default Commandline Options (F<.modulebuildrc>) When Module::Build starts up, it will look for a file, |
From: Randy W. S. <si...@us...> - 2005-10-20 04:45:09
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23001/t Modified Files: xs.t Log Message: Fix tests that fail because some OS (MSWin32) maintains a lock on dynamic libraries until the process terminates, keeping us from removing or rebuild the library file. Index: xs.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/xs.t,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- xs.t 9 Oct 2005 01:26:17 -0000 1.29 +++ xs.t 20 Oct 2005 04:45:01 -0000 1.30 @@ -26,7 +26,7 @@ } elsif ( !$have_c_compiler ) { plan skip_all => 'C_support enabled, but no compiler found'; } else { - plan tests => 18; + plan tests => 15; } } @@ -52,28 +52,25 @@ is $@, ''; { - use DynaLoader; - my $librefs_highwater = @DynaLoader::dl_librefs; + # Make sure it actually works: that we can call methods in the XS module - # Make sure it actually works - eval 'use blib; require ' . $dist->name; - is $@, ''; - - my $sub = $dist->name->can('ok'); - ok $sub, "ok() function should be defined"; - is $sub->(), 'ok', "The ok() function should return the string 'ok'"; - - $sub = $dist->name->can('version'); - ok $sub, "version() function should be defined"; - is $sub->(), "0.01", "version() should return the string '0.01'"; - - $sub = $dist->name->can('xs_version'); - ok $sub, "xs_version() function should be defined"; - is $sub->(), "0.01", "xs_version() should return the string '0.01'"; + # Unfortunately, We must do this is a subprocess because some OS will not + # release the handle on a dynamic lib until the attaching process terminates + + ok $mb->run_perl_command(['-Mblib', '-M'.$dist->name, '-e1']); + + like stdout_of( sub {$mb->run_perl_command([ + '-Mblib', '-M'.$dist->name, + '-we', "print @{[$dist->name]}::ok()"])}), qr/ok$/; + + like stdout_of( sub {$mb->run_perl_command([ + '-Mblib', '-M'.$dist->name, + '-we', "print @{[$dist->name]}::version()"])}), qr/0.01$/; + + like stdout_of( sub {$mb->run_perl_command([ + '-Mblib', '-M'.$dist->name, + '-we', "print @{[$dist->name]}::xs_version()"])}), qr/0.01$/; - # unload the dll so it can be unlinked - DynaLoader::dl_unload_file($DynaLoader::dl_librefs[$librefs_highwater]) - if DynaLoader->can('dl_unload_file'); } { |
From: Randy W. S. <si...@us...> - 2005-10-20 03:46:37
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14408 Modified Files: Changes Log Message: Fix omitted attribution in previous patch to 'distmeta' action Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.389 retrieving revision 1.390 diff -u -d -r1.389 -r1.390 --- Changes 20 Oct 2005 03:40:47 -0000 1.389 +++ Changes 20 Oct 2005 03:46:29 -0000 1.390 @@ -3,7 +3,7 @@ 0.27_04 - Allow the 'distmeta' action to continue when 'MANIFEST' is missing, - omitting the generation of the 'provieds' field. + omitting the generation of the 'provieds' field. [Steven Schubiger] - Fixed some failing regex from generated MANIFEST.SKIP file. |
From: Randy W. S. <si...@us...> - 2005-10-20 03:40:56
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13729/t Modified Files: metadata2.t Log Message: Allow the 'distmeta' action to continue when 'MANIFEST' is missing, omitting the generation of the 'provieds' field. Fixed some failing regex from generated MANIFEST.SKIP file. Index: metadata2.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/metadata2.t,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- metadata2.t 30 Sep 2005 01:09:53 -0000 1.1 +++ metadata2.t 20 Oct 2005 03:40:48 -0000 1.2 @@ -3,7 +3,7 @@ use lib 't/lib'; use strict; -use Test::More 'no_plan'; # tests => 35; +use Test::More tests => 18; use File::Spec (); @@ -15,8 +15,37 @@ my $cwd = Cwd::cwd; my $tmp = File::Spec->catdir( $cwd, 't', '_tmp' ); +use Module::Build; use DistGen; -my $dist = DistGen->new( dir => $tmp ); + + +############################## ACTION distmeta works without a MANIFEST file + +my $dist = DistGen->new( dir => $tmp, skip_manifest => 1 ); +$dist->regen; + +chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; + +ok ! -e 'MANIFEST'; + +my $mb = Module::Build->new_from_context; + +my $out; +$out = eval { stderr_of(sub{$mb->dispatch('distmeta')}) }; +is $@, ''; + +like $out, qr/Nothing to enter for 'provides'/; + +ok -e 'META.yml'; + +chdir( $cwd ) or die "Can''t chdir to '$cwd': $!"; +$dist->remove; + + +############################## Check generation of README file + +$dist = DistGen->new( dir => $tmp ); + $dist->change_file( 'Build.PL', <<"---" ); use Module::Build; my \$builder = Module::Build->new( @@ -32,8 +61,6 @@ chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; -use Module::Build; -my $mb = Module::Build->new_from_context; my $provides; # Used a bunch of times below my $pod_text = <<'---'; @@ -59,7 +86,7 @@ return scalar <$fh>; } -############################## Single Module + # .pm File with pod # |
From: Randy W. S. <si...@us...> - 2005-10-20 03:40:56
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13729 Modified Files: Changes Log Message: Allow the 'distmeta' action to continue when 'MANIFEST' is missing, omitting the generation of the 'provieds' field. Fixed some failing regex from generated MANIFEST.SKIP file. Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.388 retrieving revision 1.389 diff -u -d -r1.388 -r1.389 --- Changes 15 Oct 2005 17:44:04 -0000 1.388 +++ Changes 20 Oct 2005 03:40:47 -0000 1.389 @@ -2,6 +2,11 @@ 0.27_04 + - Allow the 'distmeta' action to continue when 'MANIFEST' is missing, + omitting the generation of the 'provieds' field. + + - Fixed some failing regex from generated MANIFEST.SKIP file. + - Fixed an edge case in $VERSION parsing where we thought a package() declaration was happening but it wasn't. [David Golden] |
From: Randy W. S. <si...@us...> - 2005-10-20 03:40:56
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13729/lib/Module/Build Modified Files: Base.pm Log Message: Allow the 'distmeta' action to continue when 'MANIFEST' is missing, omitting the generation of the 'provieds' field. Fixed some failing regex from generated MANIFEST.SKIP file. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.499 retrieving revision 1.500 diff -u -d -r1.499 -r1.500 --- Base.pm 16 Oct 2005 00:21:19 -0000 1.499 +++ Base.pm 20 Oct 2005 03:40:48 -0000 1.500 @@ -2409,6 +2409,8 @@ $lines = [$lines] unless ref $lines; my $existing_files = $self->_read_manifest($manifest); + return unless defined( $existing_files ); + @$lines = grep {!exists $existing_files->{$_}} @$lines or return; @@ -2416,7 +2418,8 @@ chmod($mode | 0222, $manifest) or die "Can't make $manifest writable: $!"; my $fh = IO::File->new("< $manifest") or die "Can't read $manifest: $!"; - my $has_newline = (<$fh>)[-1] =~ /\n$/; + my $last_line = (<$fh>)[-1] || "\n"; + my $has_newline = $last_line =~ /\n$/; $fh->close; $fh = IO::File->new(">> $manifest") or die "Can't write to $manifest: $!"; @@ -2566,7 +2569,7 @@ \bCVS\b ,v$ \B\.svn\b -\b\.cvsignore$ +\B\.cvsignore$ # Avoid Makemaker generated and utility files. \bMakefile$ @@ -2589,18 +2592,18 @@ \.old$ \.bak$ \#$ -\b\.# +\.# \.rej$ # Avoid OS-specific files/dirs # Mac OSX metadata -\b\.DS_Store +\B\.DS_Store # Mac OSX SMB mount metadata files -\b\._ +\B\._ # Avoid archives of this distribution EOF - # Skip, for example, "Module-Build-0.27.tar.gz' + # Skip, for example, 'Module-Build-0.27.tar.gz' print $fh '\b'.$self->dist_name.'-[\d\.\_]+'."\n"; $fh->close(); @@ -2822,7 +2825,14 @@ } $node->{dynamic_config} = $p->{dynamic_config} if exists $p->{dynamic_config}; - $node->{provides} = $self->find_dist_packages; + my $pkgs = eval { $self->find_dist_packages }; + if ($@) { + $self->log_warn("WARNING: Possible missing or corrupt 'MANIFEST' file.\n" . + "Nothing to enter for 'provides' field in META.yml\n"); + } else { + $node->{provides} = $pkgs if %$pkgs; + } +; $node->{no_index} = $p->{no_index} if exists $p->{no_index}; $node->{generated_by} = "Module::Build version $Module::Build::VERSION"; |
From: Ken W. <kwi...@us...> - 2005-10-18 23:13:52
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4187/lib/Module/Build Modified Files: Authoring.pod Log Message: Add docs for some more methods Index: Authoring.pod =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Authoring.pod,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Authoring.pod 15 Oct 2005 17:44:06 -0000 1.14 +++ Authoring.pod 18 Oct 2005 23:13:42 -0000 1.15 @@ -755,6 +755,12 @@ the second argument is assigned to the args hash under the key passed as the first argument. +=item autosplit_file($from, $to) + +Invokes the C<AutoSplit> module on the C<$from> file, sending the +output to the C<lib/auto> directory inside C<$to>. C<$to> is +typically the C<blib/> directory. + =item base_dir() Returns a string containing the root-level directory of this build, @@ -827,6 +833,17 @@ need detailed information, or this method if you just need a yes/no answer. +=item compare_versions($v1, $op, $v2) + +Compares two module versions C<$v1> and C<$v2> using the operator +C<$op>, which should be one of Perl's numeric operators like C<!=> or +C<< >= >> or the like. We do at least a halfway-decent job of +handling versions that aren't strictly numeric, like C<0.27_02>, but +exotic stuff will likely cause problems. + +In the future, the guts of this method might be replaced with a call +out to C<version.pm>. + =item config() Returns a hash reference containing the C<Config.pm> hash, including @@ -915,6 +932,12 @@ in L<Module::Build/"ACTIONS"> ) are contained in the C<< $self->{args} >> hash reference. +=item dist_dir() + +Returns the name of the directory that will be created during the +C<dist> action. The name is derived from the C<dist_name> and +C<dist_version> properties. + =item dist_name() Returns the name of the current distribution, as passed to the |
From: Ken W. <kwi...@us...> - 2005-10-16 00:21:27
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19706/lib/Module/Build Modified Files: Base.pm Log Message: Little clarity fix Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.498 retrieving revision 1.499 diff -u -d -r1.498 -r1.499 --- Base.pm 11 Oct 2005 01:49:06 -0000 1.498 +++ Base.pm 16 Oct 2005 00:21:19 -0000 1.499 @@ -1492,7 +1492,7 @@ sub _detildefy { my $arg = shift; - ($arg) = $arg =~ /^~/ ? glob($arg) : $arg; + ($arg) = glob($arg) if $arg =~ /^~/; return $arg; } |
From: Ken W. <kwi...@us...> - 2005-10-16 00:15:01
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18481 Modified Files: doc_check.pl Log Message: Separate the actions from the methods Index: doc_check.pl =================================================================== RCS file: /cvsroot/module-build/Module-Build/doc_check.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- doc_check.pl 16 Oct 2005 00:05:07 -0000 1.1 +++ doc_check.pl 16 Oct 2005 00:14:53 -0000 1.2 @@ -8,11 +8,16 @@ if (@ARGV==2) { - $subs{$1}++ if m/^\s*sub\s+([^_\W]\w+)/; + m/^\s*sub\s+ACTION_(\w+)/ ? $actions{$1}++ : + m/^\s*sub\s+([^_\W]\w+)/ ? $subs{$1}++ : + undef; } else { - $docs{$1}++ if m/^=item (\w+)\(/; + $docs{$1}++ if m/^=item (\w+)/; } END{ + print "Methods:"; print ($docs{$_} ? "$_*" : $_) for sort keys %subs; + print "\nActions:"; + print ($docs{$_} ? "$_*" : $_) for sort keys %actions; } |
From: Ken W. <kwi...@us...> - 2005-10-16 00:05:20
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16201 Added Files: doc_check.pl Log Message: Check for non-documented methods --- NEW FILE: doc_check.pl --- #!/usr/bin/perl -ln BEGIN{ @ARGV = qw( lib/Module/Build/Base.pm lib/Module/Build.pm lib/Module/Build/Authoring.pod ); } if (@ARGV==2) { $subs{$1}++ if m/^\s*sub\s+([^_\W]\w+)/; } else { $docs{$1}++ if m/^=item (\w+)\(/; } END{ print ($docs{$_} ? "$_*" : $_) for sort keys %subs; } |
From: Ken W. <kwi...@us...> - 2005-10-15 17:44:14
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10105/lib/Module/Build Modified Files: Authoring.pod Log Message: Add install_destination() and install_types() docs Index: Authoring.pod =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Authoring.pod,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Authoring.pod 20 Sep 2005 02:11:28 -0000 1.13 +++ Authoring.pod 15 Oct 2005 17:44:06 -0000 1.14 @@ -969,6 +969,23 @@ We currently determine this by attempting to compile a simple C source file and reporting whether the attempt was successful. +=item install_destination($type) + +Returns the directory in which items of type C<$type> (e.g. C<lib>, +C<arch>, C<bin>, or anything else returned by the C<install_types()> +method) will be installed during the C<install> action. Any settings +for C<install_path>, C<install_base>, and C<prefix> are taken into +account when determining the return value. + +=item install_types() + +Returns a list of installable types that this build knows about. +These types each correspond to the name of a directory in F<blib/>, +and the list usually includes items such as C<lib>, C<arch>, C<bin>, +C<script>, C<libdoc>, C<bindoc>, and if HTML documentation is to be +built, C<libhtml> and C<binhtml>. Other user-defined types may also +exist. + =item notes() =item notes($key) |
From: Ken W. <kwi...@us...> - 2005-10-15 17:44:14
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10105 Modified Files: Changes Log Message: Add install_destination() and install_types() docs Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.387 retrieving revision 1.388 diff -u -d -r1.387 -r1.388 --- Changes 14 Oct 2005 00:45:52 -0000 1.387 +++ Changes 15 Oct 2005 17:44:04 -0000 1.388 @@ -5,6 +5,8 @@ - Fixed an edge case in $VERSION parsing where we thought a package() declaration was happening but it wasn't. [David Golden] + - Added docs for the install_destination() and install_types() methods. + 0.27_03 (Beta for 0.28) Mon Oct 10 11:19:23 EDT 2005 - We now use ExtUtils::CBuilder to do all compiling of C code (for |
From: Ken W. <kwi...@us...> - 2005-10-14 00:46:02
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18434/t Modified Files: moduleinfo.t Log Message: Fix a $VERSION parsing edge case Index: moduleinfo.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/moduleinfo.t,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- moduleinfo.t 4 Oct 2005 11:19:39 -0000 1.12 +++ moduleinfo.t 14 Oct 2005 00:45:52 -0000 1.13 @@ -3,7 +3,7 @@ use lib 't/lib'; use strict; -use Test::More tests => 62; +use Test::More tests => 64; use File::Spec (); @@ -155,6 +155,14 @@ package Simple; ($VERSION) = '1.23'; --- + <<'---', # $VERSION follows a spurious 'package' in a quoted construct +package Simple; +__PACKAGE__->mk_accessors(qw( + program socket proc + package filename line codeline subroutine finished)); + +our $VERSION = "1.23"; +--- ); my( $i, $n ) = ( 1, scalar( @modules ) ); |
From: Ken W. <kwi...@us...> - 2005-10-14 00:46:02
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18434 Modified Files: Changes Log Message: Fix a $VERSION parsing edge case Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.386 retrieving revision 1.387 diff -u -d -r1.386 -r1.387 --- Changes 10 Oct 2005 15:20:36 -0000 1.386 +++ Changes 14 Oct 2005 00:45:52 -0000 1.387 @@ -1,5 +1,10 @@ Revision history for Perl extension Module::Build. +0.27_04 + + - Fixed an edge case in $VERSION parsing where we thought a package() + declaration was happening but it wasn't. [David Golden] + 0.27_03 (Beta for 0.28) Mon Oct 10 11:19:23 EDT 2005 - We now use ExtUtils::CBuilder to do all compiling of C code (for |
From: Ken W. <kwi...@us...> - 2005-10-14 00:46:02
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18434/lib/Module/Build Modified Files: ModuleInfo.pm Log Message: Fix a $VERSION parsing edge case Index: ModuleInfo.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/ModuleInfo.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- ModuleInfo.pm 4 Oct 2005 11:19:38 -0000 1.13 +++ ModuleInfo.pm 14 Oct 2005 00:45:52 -0000 1.14 @@ -10,7 +10,14 @@ use IO::File; -my $PKG_REGEXP = qr/^[\s\{;]*package\s+([\w:]+)/; +my $PKG_REGEXP = qr/ # match a package declaration + ^[\s\{;]* # intro chars on a line + package # the word 'package' + \s+ # whitespace + ([\w:]+) # a package name + \s* # optional whitespace + ; # semicolon line terminator +/x; my $VARNAME_REGEXP = qr/ # match fully-qualified VERSION name ([\$*]) # sigil - $ or * |
From: Ken W. <kwi...@us...> - 2005-10-11 01:49:03
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv488/lib/Module/Build Modified Files: Base.pm Log Message: Use accessor methods in a few places Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.497 retrieving revision 1.498 diff -u -d -r1.497 -r1.498 --- Base.pm 4 Oct 2005 02:44:09 -0000 1.497 +++ Base.pm 11 Oct 2005 01:49:06 -0000 1.498 @@ -3104,18 +3104,16 @@ sub install_destination { my ($self, $type) = @_; - my $p = $self->{properties}; - return $p->{install_path}{$type} if exists $p->{install_path}{$type}; - return File::Spec->catdir($p->{install_base}, $self->install_base_relpaths($type)) if $p->{install_base}; - return File::Spec->catdir($p->{prefix}, $self->prefix_relative($type)) if $p->{prefix}; - return $p->{install_sets}{ $p->{installdirs} }{$type}; + return $self->install_path->{$type} if exists $self->install_path->{$type}; + return File::Spec->catdir($self->install_base, $self->install_base_relpaths($type)) if $self->install_base; + return File::Spec->catdir($self->prefix, $self->prefix_relative($type)) if $self->prefix; + return $self->install_sets->{ $self->installdirs }{$type}; } sub install_types { my $self = shift; - my $p = $self->{properties}; - my %types = (%{$p->{install_path}}, %{ $p->{install_sets}{$p->{installdirs}} }); + my %types = (%{$self->install_path}, %{ $self->install_sets->{$self->installdirs} }); unless ( $self->gen_html && $self->install_html ) { delete( $types{binhtml} ); |