module-build-checkins Mailing List for Module::Build (Page 16)
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: Ken W. <kwi...@us...> - 2005-09-30 01:10:12
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7051/lib/Module/Build Modified Files: Base.pm Log Message: New code and tests for finding AUTHOR and ABSTRACT stuff Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.488 retrieving revision 1.489 diff -u -d -r1.488 -r1.489 --- Base.pm 30 Sep 2005 01:01:42 -0000 1.488 +++ Base.pm 30 Sep 2005 01:09:53 -0000 1.489 @@ -733,15 +733,21 @@ return $p->{dist_name}; } -sub dist_version { +sub _find_dist_version_from { my ($self) = @_; my $p = $self->{properties}; - - return $p->{dist_version} if defined $p->{dist_version}; - if ($self->module_name) { $p->{dist_version_from} ||= join( '/', 'lib', split '::', $self->module_name ) . '.pm'; } +} + +sub dist_version { + my ($self) = @_; + my $p = $self->{properties}; + + return $p->{dist_version} if defined $p->{dist_version}; + + $self->_find_dist_version_from; if ( $p->{dist_version_from} ) { my $version_from = File::Spec->catfile( split( qr{/}, $p->{dist_version_from} ) ); @@ -2456,6 +2462,7 @@ sub _main_docfile { my $self = shift; + $self->_find_dist_version_from; my $pm_file = $self->dist_version_from; (my $pod_file = $pm_file) =~ s/.pm$/.pod/; return (-e $pod_file ? $pod_file : $pm_file); |
|
From: Ken W. <kwi...@us...> - 2005-09-30 01:10:07
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7051/t Added Files: metadata2.t Log Message: New code and tests for finding AUTHOR and ABSTRACT stuff --- NEW FILE: metadata2.t --- #!/usr/bin/perl -w use lib 't/lib'; use strict; use Test::More 'no_plan'; # tests => 35; 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' ); use DistGen; 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]}': $!"; use Module::Build; my $mb = Module::Build->new_from_context; my $provides; # Used a bunch of times below my $pod_text = <<'---'; =pod =head1 NAME Simple - A simple module =head1 AUTHOR Simple Simon <si...@si...> =cut --- sub _slurp { my $filename = shift; die "$filename doesn't exist. Aborting" if not -e $filename; open my $fh, "<", $filename or die "Couldn't open $filename: $!. Aborting."; local $/; return scalar <$fh>; } ############################## Single Module # .pm File with pod # $dist->change_file( 'lib/Simple.pm', <<'---' . $pod_text); package Simple; $VERSION = '1.23'; --- $dist->regen( clean => 1 ); ok( -e "lib/Simple.pm", "Creating Simple.pm" ); $mb = Module::Build->new_from_context; $mb->dispatch('distmeta'); like( _slurp("README"), qr/NAME/, "Generating README from .pm"); is( $mb->dist_author->[0], 'Simple Simon <si...@si...>', "Extracting AUTHOR from .pm"); is( $mb->dist_abstract, "A simple module", "Extracting abstract from .pm"); # .pm File with pod in separate file # $dist->change_file( 'lib/Simple.pm', <<'---'); package Simple; $VERSION = '1.23'; --- $dist->change_file( 'lib/Simple.pod', $pod_text ); $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->dispatch('distmeta'); like( _slurp("README"), qr/NAME/, "Generating README from .pod"); is( $mb->dist_author->[0], 'Simple Simon <si...@si...>', "Extracting AUTHOR from .pod"); is( $mb->dist_abstract, "A simple module", "Extracting abstract from .pod"); # .pm File with pod and separate pod file # $dist->change_file( 'lib/Simple.pm', <<'---' ); package Simple; $VERSION = '1.23'; =pod =head1 DONT USE THIS FILE FOR POD =cut --- $dist->change_file( 'lib/Simple.pod', $pod_text ); $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->dispatch('distmeta'); like( _slurp("README"), qr/NAME/, "Generating README from .pod over .pm"); is( $mb->dist_author->[0], 'Simple Simon <si...@si...>', "Extracting AUTHOR from .pod over .pm"); is( $mb->dist_abstract, "A simple module", "Extracting abstract from .pod over .pm"); ############################################################ # cleanup chdir( $cwd ) or die "Can't chdir to '$cwd': $!"; $dist->remove; use File::Path; rmtree( $tmp ); |
|
From: Ken W. <kwi...@us...> - 2005-09-30 01:01:50
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4832/lib/Module/Build Modified Files: Base.pm Log Message: Respect 'quiet' mode better Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.487 retrieving revision 1.488 diff -u -d -r1.487 -r1.488 --- Base.pm 27 Sep 2005 03:10:58 -0000 1.487 +++ Base.pm 30 Sep 2005 01:01:42 -0000 1.488 @@ -2286,14 +2286,14 @@ my ($self) = @_; require ExtUtils::Install; $self->depends_on('build'); - ExtUtils::Install::install($self->install_map, 1, 0, $self->{args}{uninst}||0); + ExtUtils::Install::install($self->install_map, !$self->quiet, 0, $self->{args}{uninst}||0); } sub ACTION_fakeinstall { my ($self) = @_; require ExtUtils::Install; $self->depends_on('build'); - ExtUtils::Install::install($self->install_map, 1, 1, $self->{args}{uninst}||0); + ExtUtils::Install::install($self->install_map, !$self->quiet, 1, $self->{args}{uninst}||0); } sub ACTION_versioninstall { @@ -3356,9 +3356,11 @@ sub copy_if_modified { my $self = shift; my %args = (@_ > 3 - ? ( verbose => 1, @_ ) + ? ( @_ ) : ( from => shift, to_dir => shift, flatten => shift ) ); + $args{verbose} = !$self->quiet + unless exists $args{verbose}; my $file = $args{from}; unless (defined $file and length $file) { |
|
From: Ken W. <kwi...@us...> - 2005-09-30 01:01:50
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4832 Modified Files: Changes Log Message: Respect 'quiet' mode better Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.383 retrieving revision 1.384 diff -u -d -r1.383 -r1.384 --- Changes 27 Sep 2005 03:10:57 -0000 1.383 +++ Changes 30 Sep 2005 01:01:42 -0000 1.384 @@ -2,6 +2,9 @@ 0.27_03 + - A few more status messages can now be suppressed by using 'quiet' + mode. [Dave Rolsky] + - Added some more entries to the default MANIFEST.SKIP file. [Chris Dolan] |
|
From: Ken W. <kwi...@us...> - 2005-09-28 04:37:30
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22551 Modified Files: destinations.t Log Message: Split out a little functionette Index: destinations.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/destinations.t,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- destinations.t 28 Sep 2005 04:23:20 -0000 1.28 +++ destinations.t 28 Sep 2005 04:37:15 -0000 1.29 @@ -191,14 +191,18 @@ ok $mb->dir_contains($prefix, $dest), "$type prefixed"; if( $test_config && $test_config->{$type} ) { - my @dest_dirs = splitdir( $dest ); - my @test_dirs = splitdir( $test_config->{$type} ); - - is( $dest_dirs[-1], $test_dirs[-1], " suffix correctish ($test_config->{$type} + $prefix = $dest)" ); + have_same_ending($dest, $test_config->{$type}, + " suffix correctish ($test_config->{$type} + $prefix = $dest)" ); } } } +sub have_same_ending { + my ($dir1, $dir2, $message) = @_; + my @dir1 = splitdir $dir1; + my @dir2 = splitdir $dir2; + is $dir1[-1], $dir2[-1], $message; +} sub test_install_destinations { my($build, $expect) = @_; |
|
From: Ken W. <kwi...@us...> - 2005-09-28 04:23:28
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20267 Modified Files: destinations.t Log Message: Take advantage of the new dir_contains() method Index: destinations.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/destinations.t,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- destinations.t 27 Sep 2005 19:38:25 -0000 1.27 +++ destinations.t 28 Sep 2005 04:23:20 -0000 1.28 @@ -188,13 +188,13 @@ foreach my $type (qw(lib arch bin script bindoc libdoc binhtml libhtml)) { my $dest = $mb->install_destination( $type ); - like( $dest, "/^\Q$prefix\E/", "$type prefixed"); + ok $mb->dir_contains($prefix, $dest), "$type prefixed"; if( $test_config && $test_config->{$type} ) { my @dest_dirs = splitdir( $dest ); my @test_dirs = splitdir( $test_config->{$type} ); - is( $dest_dirs[-1], $test_dirs[-1], " suffix correctish ($dest vs $test_config->{$type})" ); + is( $dest_dirs[-1], $test_dirs[-1], " suffix correctish ($test_config->{$type} + $prefix = $dest)" ); } } } |
|
From: Ken W. <kwi...@us...> - 2005-09-27 19:38:34
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv940 Modified Files: destinations.t Log Message: Be slightly less evil about poking around with paths Index: destinations.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/destinations.t,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- destinations.t 27 Sep 2005 19:03:36 -0000 1.26 +++ destinations.t 27 Sep 2005 19:38:25 -0000 1.27 @@ -153,12 +153,9 @@ } # Poke at the innards of MB to change the default install locations. - while( my($key, $path) = each %test_config ) { - $mb->{properties}{install_sets}{site}{$key} = $path; - } - - $mb->{config}{siteprefixexp} = catdir(File::Spec->rootdir, - 'wierd', 'prefix'); + local $mb->install_sets->{site} = \%test_config; + $mb->config(siteprefixexp => catdir(File::Spec->rootdir, + 'wierd', 'prefix')); my $prefix = catdir('another', 'prefix'); $mb->prefix($prefix); |
|
From: Ken W. <kwi...@us...> - 2005-09-27 19:03:44
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23024 Modified Files: destinations.t Log Message: I don't think we need this PREFIX test, it should be handled in compat.t. Also some slight readability fixes. Index: destinations.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/destinations.t,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- destinations.t 4 Aug 2005 03:13:06 -0000 1.25 +++ destinations.t 27 Sep 2005 19:03:36 -0000 1.26 @@ -27,11 +27,6 @@ ######################### -TODO: { - local $TODO = 'Test PREFIX pass-thru to compat Makefile.PL'; - ok 0, 'PREFIX'; -} - use Module::Build; my $mb = Module::Build->new_from_context; isa_ok( $mb, 'Module::Build::Base' ); @@ -199,10 +194,10 @@ like( $dest, "/^\Q$prefix\E/", "$type prefixed"); if( $test_config && $test_config->{$type} ) { - my @test_dirs = splitdir( $test_config->{$type} ); my @dest_dirs = splitdir( $dest ); + my @test_dirs = splitdir( $test_config->{$type} ); - is( $dest_dirs[-1], $test_dirs[-1], ' suffix correctish' ); + is( $dest_dirs[-1], $test_dirs[-1], " suffix correctish ($dest vs $test_config->{$type})" ); } } } |
|
From: Ken W. <kwi...@us...> - 2005-09-27 03:11:06
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8125 Modified Files: Changes Log Message: Add some more MANIFEST.SKIP entries Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.382 retrieving revision 1.383 diff -u -d -r1.382 -r1.383 --- Changes 23 Sep 2005 21:42:05 -0000 1.382 +++ Changes 27 Sep 2005 03:10:57 -0000 1.383 @@ -2,6 +2,9 @@ 0.27_03 + - Added some more entries to the default MANIFEST.SKIP file. [Chris + Dolan] + - Our POD parser will now accept "AUTHORS" as well as "AUTHOR" when looking for the author list in a module. [David Wheeler] |
|
From: Ken W. <kwi...@us...> - 2005-09-27 03:11:06
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8125/lib/Module/Build Modified Files: Base.pm Log Message: Add some more MANIFEST.SKIP entries Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.486 retrieving revision 1.487 diff -u -d -r1.486 -r1.487 --- Base.pm 23 Sep 2005 21:42:06 -0000 1.486 +++ Base.pm 27 Sep 2005 03:10:58 -0000 1.487 @@ -2511,14 +2511,16 @@ my $fh = IO::File->new("> $file") or die "Can't open $file: $!"; - # This is pretty much straight out of - # MakeMakers default MANIFEST.SKIP file + # This is derived from MakeMaker's default MANIFEST.SKIP file with + # some new entries + print $fh <<'EOF'; # Avoid version control files. \bRCS\b \bCVS\b ,v$ \B\.svn\b +\b\.cvsignore$ # Avoid Makemaker generated and utility files. \bMakefile$ @@ -2532,6 +2534,9 @@ \bBuild$ \b_build +# Avoid Devel::Cover generated files +\bcover_db + # Avoid temp and backup files. ~$ \.tmp$ @@ -2539,8 +2544,19 @@ \.bak$ \#$ \b\.# +\.rej$ + +# Avoid OS-specific files/dirs +# Mac OSX metadata +\b\.DS_Store +# Mac OSX SMB mount metadata files +\b\._ +# Avoid archives of this distribution EOF + # Skip, for example, "Module-Build-0.27.tar.gz' + print $fh '\b'.$self->dist_name.'-[\d\.\_]+'."\n"; + $fh->close(); } |
|
From: Ken W. <kwi...@us...> - 2005-09-25 23:44:49
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17701/lib/CPANPLUS/Dist Modified Files: Build.pm Log Message: This issue isn't an issue anymore Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Build.pm 24 Sep 2005 14:26:05 -0000 1.9 +++ Build.pm 25 Sep 2005 23:44:40 -0000 1.10 @@ -736,16 +736,6 @@ =over 4 -=item * Module::Build's version comparison is not supported. - -Module::Build has its own way of defining what versions are considered -satisfactory for a prerequisite, and which ones aren't. This syntax is -something specific to Module::Build and we currently have no way to see -if a module on disk, on cpan or something similar is satisfactory -according to Module::Build's version comparison scheme. -As a work around, we now simply assume that the most recent version on -CPAN satisfies a dependency. - =item * Module::Build can not be upgraded using its own API (#13169) This is due to the fact that the Build file insists on adding a path |
|
From: Ken W. <kwi...@us...> - 2005-09-25 23:37:41
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16652 Modified Files: .cvsignore Log Message: Index: .cvsignore =================================================================== RCS file: /cvsroot/module-build/Module-Build/.cvsignore,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- .cvsignore 10 Sep 2003 16:48:25 -0000 1.8 +++ .cvsignore 25 Sep 2005 23:37:33 -0000 1.9 @@ -8,3 +8,4 @@ kwiki Module-Build* README +cover_db |
|
From: Ken W. <kwi...@us...> - 2005-09-24 14:26:14
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23278/lib/CPANPLUS/Dist Modified Files: Build.pm Log Message: Move the actual prereq checking to a new prereq_satisfied method Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Build.pm 23 Sep 2005 22:16:25 -0000 1.8 +++ Build.pm 24 Sep 2005 14:26:05 -0000 1.9 @@ -276,37 +276,8 @@ $dist->status->_mb_object( $mb ); - ### resolve prereqs ### - # XXX according to Jos, this should actually be in _resolve_prereqs(), not here. - my $prereqs = $dist->_find_prereqs( verbose => $verbose ); - my %prereqs_out; - - for my $mod (keys %$prereqs) { - # Check whether the installed version (if any) satisfies this - # prereq. If not, check whether the latest CPAN version - # satisfies it. If not, fail. - - warn "Checking prereq $mod ($prereqs->{$mod})"; + $self->status->prereqs( $dist->_find_prereqs( verbose => $verbose ) ); - my $status = Module::Build->check_installed_status($mod, $prereqs->{$mod}); - next if $status->{ok}; - - # Get the latest version from the CPAN index and check it - no strict 'refs'; - local ${$mod . '::VERSION'} = $cb->module_tree($mod)->version; - $status = Module::Build->check_installed_status($mod, $prereqs->{$mod}); - if ($status->{ok}) { - $prereqs_out{$mod} = $status->{have}; - next; - } - - error(loc("This distribution depends on $mod, but the latest version of $mod on CPAN ". - "doesn't satisfy the specific version dependency ($prereqs->{$mod}). ". - "Please try to resolve this dependency manually.")); - $fail++; - } - - $self->status->prereqs( \%prereqs_out ); } ### send out test report? ### @@ -361,6 +332,34 @@ return { %$href }; } +sub prereq_satisfied { + # Return true if this prereq is satisfied. Return false if it's + # not. Also issue an error if the latest CPAN version doesn't + # satisfy it. + + my ($dist, %args) = @_; + my $mb = $dist->status->_mb_object; + my $cb = $dist->parent->parent; + my $mod = $args{modobj}->module; + + my $status = $mb->check_installed_status($mod, $args{version}); + return 1 if $status->{ok}; + + # Check the latest version from the CPAN index + { + no strict 'refs'; + local ${$mod . '::VERSION'} = $args{modobj}->version; + $status = $mb->check_installed_status($mod, $args{version}); + } + unless( $status->{ok} ) { + error(loc("This distribution depends on $mod, but the latest version of $mod on CPAN ". + "doesn't satisfy the specific version dependency ($args{version}). ". + "Please try to resolve this dependency manually.")); + } + + return 0; +} + =pod =head2 $dist->create([perl => '/path/to/perl', buildflags => 'EXTRA=FLAGS', prereq_target => TARGET, force => BOOL, verbose => BOOL, skiptest => BOOL]) |
|
From: Ken W. <kwi...@us...> - 2005-09-23 22:16:36
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11168/lib/CPANPLUS/Dist Modified Files: Build.pm Log Message: Add the real function where I was using a stub Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Build.pm 12 Sep 2005 19:58:07 -0000 1.7 +++ Build.pm 23 Sep 2005 22:16:25 -0000 1.8 @@ -277,6 +277,7 @@ $dist->status->_mb_object( $mb ); ### resolve prereqs ### + # XXX according to Jos, this should actually be in _resolve_prereqs(), not here. my $prereqs = $dist->_find_prereqs( verbose => $verbose ); my %prereqs_out; @@ -290,9 +291,9 @@ my $status = Module::Build->check_installed_status($mod, $prereqs->{$mod}); next if $status->{ok}; - # XXX get the latest version from the CPAN index and check it + # Get the latest version from the CPAN index and check it no strict 'refs'; - local ${$mod . '::VERSION'} = get_indexed_version($mod); # XXX this function doesn't exist + local ${$mod . '::VERSION'} = $cb->module_tree($mod)->version; $status = Module::Build->check_installed_status($mod, $prereqs->{$mod}); if ($status->{ok}) { $prereqs_out{$mod} = $status->{have}; |
|
From: Ken W. <kwi...@us...> - 2005-09-23 21:42:14
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv807/lib/Module/Build Modified Files: Base.pm Log Message: Ditto for AUTHOR and ABSTRACT Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.485 retrieving revision 1.486 diff -u -d -r1.485 -r1.486 --- Base.pm 23 Sep 2005 21:37:39 -0000 1.485 +++ Base.pm 23 Sep 2005 21:42:06 -0000 1.486 @@ -766,8 +766,10 @@ my $member = "dist_$part"; return $p->{$member} if defined $p->{$member}; - return unless $p->{dist_version_from}; - my $fh = IO::File->new($p->{dist_version_from}) or return; + my $docfile = $self->_main_docfile + or return; + my $fh = IO::File->new($docfile) + or return; require Module::Build::PodParser; my $parser = Module::Build::PodParser->new(fh => $fh); @@ -2448,11 +2450,15 @@ eval {require Pod::Text; 1} ? Pod::Text->new : die "Can't load Pod::Readme or Pod::Text to create README"; $self->log_info("Creating README using " . ref($parser) . "\n"); + $parser->parse_from_file($self->_main_docfile, 'README', @_); + $self->_add_to_manifest('MANIFEST', 'README'); +} + +sub _main_docfile { + my $self = shift; my $pm_file = $self->dist_version_from; (my $pod_file = $pm_file) =~ s/.pm$/.pod/; - $parser->parse_from_file - ((-e $pod_file ? $pod_file : $pm_file), 'README', @_); - $self->_add_to_manifest('MANIFEST', 'README'); + return (-e $pod_file ? $pod_file : $pm_file); } sub ACTION_distdir { |
|
From: Ken W. <kwi...@us...> - 2005-09-23 21:42:13
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv807 Modified Files: Changes Log Message: Ditto for AUTHOR and ABSTRACT Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.381 retrieving revision 1.382 diff -u -d -r1.381 -r1.382 --- Changes 23 Sep 2005 21:37:38 -0000 1.381 +++ Changes 23 Sep 2005 21:42:05 -0000 1.382 @@ -5,9 +5,10 @@ - Our POD parser will now accept "AUTHORS" as well as "AUTHOR" when looking for the author list in a module. [David Wheeler] - - When looking for the POD to auto-generate a README file, we now - also look for a *.pod with the same name as the *.pm file specified - by 'version_from'. [David Golden] + - When looking for the POD to auto-generate a README file, or for the + AUTHOR or ABSTRACT for the distribution, we now also look for a + *.pod with the same name as the *.pm file specified by + 'version_from'. [David Golden] - The recommended dependency on ExtUtils::ParseXS has been moved into the "C_support" auto_feature. |
|
From: Ken W. <kwi...@us...> - 2005-09-23 21:37:46
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32393/lib/Module/Build Modified Files: Base.pm Log Message: Look for a .pod too when generating README Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.484 retrieving revision 1.485 diff -u -d -r1.484 -r1.485 --- Base.pm 23 Sep 2005 03:35:31 -0000 1.484 +++ Base.pm 23 Sep 2005 21:37:39 -0000 1.485 @@ -2448,7 +2448,10 @@ eval {require Pod::Text; 1} ? Pod::Text->new : die "Can't load Pod::Readme or Pod::Text to create README"; $self->log_info("Creating README using " . ref($parser) . "\n"); - $parser->parse_from_file($self->dist_version_from, 'README', @_); + my $pm_file = $self->dist_version_from; + (my $pod_file = $pm_file) =~ s/.pm$/.pod/; + $parser->parse_from_file + ((-e $pod_file ? $pod_file : $pm_file), 'README', @_); $self->_add_to_manifest('MANIFEST', 'README'); } |
|
From: Ken W. <kwi...@us...> - 2005-09-23 21:37:46
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32393 Modified Files: Changes Log Message: Look for a .pod too when generating README Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.380 retrieving revision 1.381 diff -u -d -r1.380 -r1.381 --- Changes 23 Sep 2005 02:16:08 -0000 1.380 +++ Changes 23 Sep 2005 21:37:38 -0000 1.381 @@ -5,6 +5,10 @@ - Our POD parser will now accept "AUTHORS" as well as "AUTHOR" when looking for the author list in a module. [David Wheeler] + - When looking for the POD to auto-generate a README file, we now + also look for a *.pod with the same name as the *.pm file specified + by 'version_from'. [David Golden] + - The recommended dependency on ExtUtils::ParseXS has been moved into the "C_support" auto_feature. |
|
From: Ken W. <kwi...@us...> - 2005-09-23 03:35:41
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20606/lib/Module/Build Modified Files: Base.pm Log Message: Make sure the cover_db stuff is up to date Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.483 retrieving revision 1.484 diff -u -d -r1.483 -r1.484 --- Base.pm 23 Sep 2005 02:33:56 -0000 1.483 +++ Base.pm 23 Sep 2005 03:35:31 -0000 1.484 @@ -1761,6 +1761,17 @@ } $self->add_to_cleanup('coverage', 'cover_db'); + $self->depends_on('code'); + + # See whether any of the *.pm files have changed since last time + # testcover was run. If so, start over. + if (-e 'cover_db') { + my $pm_files = $self->rscan_dir(File::Spec->catdir($self->blib, 'lib'), qr{\.pm$} ); + my $cover_files = $self->rscan_dir('cover_db', sub {-f $_ and not /\.html$/}); + + $self->do_system(qw(cover -delete)) + unless $self->up_to_date($pm_files, $cover_files); + } local $Test::Harness::switches = local $Test::Harness::Switches = |
|
From: Ken W. <kwi...@us...> - 2005-09-23 02:34:29
|
Update of /cvsroot/module-build/Module-Build/t/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9567/t/lib Modified Files: DistGen.pm Log Message: Make sure the VERSION and XS_VERSION defines are working Index: DistGen.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/lib/DistGen.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- DistGen.pm 9 Jul 2005 12:20:06 -0000 1.11 +++ DistGen.pm 23 Sep 2005 02:34:19 -0000 1.12 @@ -140,6 +140,20 @@ RETVAL = newSVpv( "ok", 0 ); OUTPUT: RETVAL + +char * +xs_version() + CODE: + RETVAL = XS_VERSION; + OUTPUT: + RETVAL + +char * +version() + CODE: + RETVAL = VERSION; + OUTPUT: + RETVAL --- $self->add_file( 't/basic.t', <<"---" ) unless $self->{filedata}{'t/basic.t'}; |
|
From: Ken W. <kwi...@us...> - 2005-09-23 02:34:29
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9567/t Modified Files: xs.t Log Message: Make sure the VERSION and XS_VERSION defines are working Index: xs.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/xs.t,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- xs.t 23 Sep 2005 02:26:55 -0000 1.26 +++ xs.t 23 Sep 2005 02:34:19 -0000 1.27 @@ -26,7 +26,7 @@ } elsif ( !$have_c_compiler ) { plan skip_all => 'C_support enabled, but no compiler found'; } else { - plan tests => 14; + plan tests => 18; } } @@ -58,9 +58,15 @@ my $sub = $dist->name->can('ok'); ok $sub, "ok() function should be defined"; - - my $val = $sub->(); - is $val, 'ok', "The ok() function should return the string 'ok'"; + 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'"; } { |
|
From: Ken W. <kwi...@us...> - 2005-09-23 02:34:04
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9420/lib/Module/Build Modified Files: Base.pm Log Message: I think these should be strings, not numbers Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.482 retrieving revision 1.483 diff -u -d -r1.482 -r1.483 --- Base.pm 22 Sep 2005 18:35:50 -0000 1.482 +++ Base.pm 23 Sep 2005 02:33:56 -0000 1.483 @@ -3286,7 +3286,7 @@ # .c -> .o my $v = $self->dist_version; - $self->compile_c($c_file, defines => {VERSION => $v, XSVERSION => $v}); + $self->compile_c($c_file, defines => {VERSION => qq{"$v"}, XS_VERSION => qq{"$v"}}); # The .bs and .a files don't go in blib/lib/, they go in blib/arch/auto/. # Unfortunately we have to pre-compute the whole path. |
|
From: Ken W. <kwi...@us...> - 2005-09-23 02:27:02
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7894/t Modified Files: xs.t Log Message: Make sure the new module actually works Index: xs.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/xs.t,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- xs.t 29 Jun 2005 08:27:07 -0000 1.25 +++ xs.t 23 Sep 2005 02:26:55 -0000 1.26 @@ -26,7 +26,7 @@ } elsif ( !$have_c_compiler ) { plan skip_all => 'C_support enabled, but no compiler found'; } else { - plan tests => 11; + plan tests => 14; } } @@ -52,6 +52,18 @@ ok ! $@; { + # 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"; + + my $val = $sub->(); + is $val, 'ok', "The ok() function should return the string 'ok'"; +} + +{ # Try again in a subprocess eval {$mb->dispatch('clean')}; ok ! $@; |
|
From: Ken W. <kwi...@us...> - 2005-09-23 02:16:17
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6197 Modified Files: Changes Log Message: Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.379 retrieving revision 1.380 diff -u -d -r1.379 -r1.380 --- Changes 22 Sep 2005 18:35:50 -0000 1.379 +++ Changes 23 Sep 2005 02:16:08 -0000 1.380 @@ -12,7 +12,7 @@ flags to the compiler. [Suggested by Jerry Hedden] - If a distribution has XS files and Module::Build has not been - configured with the "C_support" feature, we now issued a + configured with the "C_support" feature, we now issue a warning. [Suggested by Jerry Hedden] - The synonyms 'scripts' and 'prereq' for 'script_files' and |
|
From: Ken W. <kwi...@us...> - 2005-09-22 18:36:06
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9467 Modified Files: Changes Log Message: add -DVERSION and -DXS_VERSION compilation flags Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.378 retrieving revision 1.379 diff -u -d -r1.378 -r1.379 --- Changes 22 Sep 2005 02:39:34 -0000 1.378 +++ Changes 22 Sep 2005 18:35:50 -0000 1.379 @@ -8,6 +8,9 @@ - The recommended dependency on ExtUtils::ParseXS has been moved into the "C_support" auto_feature. + - When building XS files, we now pass the -DVERSION and -DXS_VERSION + flags to the compiler. [Suggested by Jerry Hedden] + - If a distribution has XS files and Module::Build has not been configured with the "C_support" feature, we now issued a warning. [Suggested by Jerry Hedden] |