module-build-checkins Mailing List for Module::Build (Page 17)
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-22 18:36:01
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9467/lib/Module/Build Modified Files: Base.pm Log Message: add -DVERSION and -DXS_VERSION compilation flags Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.481 retrieving revision 1.482 diff -u -d -r1.481 -r1.482 --- Base.pm 22 Sep 2005 02:39:34 -0000 1.481 +++ Base.pm 22 Sep 2005 18:35:50 -0000 1.482 @@ -3152,17 +3152,23 @@ } sub compile_c { - my ($self, $file) = @_; + my ($self, $file, %args) = @_; my $b = $self->_cbuilder; my $obj_file = $b->object_file($file); $self->add_to_cleanup($obj_file); return $obj_file if $self->up_to_date($file, $obj_file); + # XXX the -D syntax might not be very portable + my $flags = $self->extra_compiler_flags; + if ($args{defines}) { + $flags = [@$flags, map "-D$_=$args{defines}{$_}", keys %{$args{defines}}]; + } + $b->compile(source => $file, object_file => $obj_file, include_dirs => $self->include_dirs, - extra_compiler_flags => $self->extra_compiler_flags, + extra_compiler_flags => $flags, ); return $obj_file; @@ -3279,7 +3285,8 @@ } # .c -> .o - $self->compile_c($c_file); + my $v = $self->dist_version; + $self->compile_c($c_file, defines => {VERSION => $v, XSVERSION => $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-22 02:39:43
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23540 Modified Files: Changes Log Message: Warn when there are XS files we won't be able to build Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.377 retrieving revision 1.378 diff -u -d -r1.377 -r1.378 --- Changes 22 Sep 2005 02:00:35 -0000 1.377 +++ Changes 22 Sep 2005 02:39:34 -0000 1.378 @@ -8,6 +8,10 @@ - The recommended dependency on ExtUtils::ParseXS has been moved into the "C_support" auto_feature. + - 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] + - The synonyms 'scripts' and 'prereq' for 'script_files' and 'requires' were broken in a previous version (0.27_01, probably), but now they're fixed. [David Golden] |
|
From: Ken W. <kwi...@us...> - 2005-09-22 02:39:43
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23540/lib/Module/Build Modified Files: Base.pm Log Message: Warn when there are XS files we won't be able to build Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.480 retrieving revision 1.481 diff -u -d -r1.480 -r1.481 --- Base.pm 22 Sep 2005 02:18:34 -0000 1.480 +++ Base.pm 22 Sep 2005 02:39:34 -0000 1.481 @@ -903,6 +903,13 @@ sub check_prereq { my $self = shift; + # If we have XS files, make sure we can process them. + my $xs_files = $self->find_xs_files; + if (keys %$xs_files && !$self->_mb_feature('C_support')) { + $self->log_warn("Warning: this distribution contains XS files, ". + "but Module::Build is not configured with C_support"); + } + my $failures = $self->prereq_failures; return 1 unless $failures; |
|
From: Ken W. <kwi...@us...> - 2005-09-22 02:18:43
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19485/lib/Module/Build Modified Files: Base.pm Log Message: Create an _mb_feature() method to test M::B features Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.479 retrieving revision 1.480 diff -u -d -r1.479 -r1.480 --- Base.pm 22 Sep 2005 01:26:29 -0000 1.479 +++ Base.pm 22 Sep 2005 02:18:34 -0000 1.480 @@ -426,6 +426,18 @@ } BEGIN { *feature = \&features } +sub _mb_feature { + my $self = shift; + + if (($self->module_name || '') eq 'Module::Build') { + # We're building Module::Build itself, so ...::ConfigData isn't + # valid, but $self->features() should be. + return $self->feature(@_); + } else { + require Module::Build::ConfigData; + return Module::Build::ConfigData->feature(@_); + } +} sub add_build_element { @@ -2007,15 +2019,7 @@ $self->depends_on('code'); - if (($self->module_name || '') eq 'Module::Build') { - # Need to load from blib/ - local @INC = (File::Spec->catdir($self->blib, 'lib'), @INC); - require Module::Build::ConfigData; - } else { - require Module::Build::ConfigData; - } - - if ( Module::Build::ConfigData->feature('manpage_support') && + if ( $self->_mb_feature('manpage_support') && $self->gen_manpages ) { $self->manify_bin_pods; @@ -2689,8 +2693,7 @@ my $self = shift; my $metafile = $self->metafile; - require Module::Build::ConfigData; # Only works after the 'build' - if (Module::Build::ConfigData->feature('YAML_support')) { + if ($self->_mb_feature('YAML_support')) { require YAML; # We use YAML::Node to get the order nice in the YAML file. @@ -3122,15 +3125,8 @@ my $p = $self->{properties}; return $p->{_cbuilder} if $p->{_cbuilder}; - my $cdata = $self; - if ($self->module_name ne 'Module::Build') { - # If we're not building M::B itself - require Module::Build::ConfigData; - $cdata = 'Module::Build::ConfigData'; - } - die "Module::Build is not configured with C_support" - unless $cdata->feature('C_support'); + unless $self->_mb_feature('C_support'); require ExtUtils::CBuilder; return $p->{_cbuilder} = ExtUtils::CBuilder->new(config => $self->{config}); |
|
From: Ken W. <kwi...@us...> - 2005-09-22 02:00:44
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16641 Modified Files: Changes Build.PL Log Message: Reorganize dependencies a little Index: Build.PL =================================================================== RCS file: /cvsroot/module-build/Module-Build/Build.PL,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- Build.PL 28 Jul 2005 02:56:51 -0000 1.58 +++ Build.PL 22 Sep 2005 02:00:35 -0000 1.59 @@ -40,7 +40,6 @@ recommends => { 'Archive::Tar' => '1.08', 'ExtUtils::Install' => 0.30, - 'ExtUtils::ParseXS' => 2.02, 'Pod::Readme' => 0.04, 'Module::Signature' => 0.21, }, @@ -59,7 +58,8 @@ C_support => { description => "Can compile/link C & XS code", - requires => { 'ExtUtils::CBuilder' => 0.02 }, + requires => { 'ExtUtils::CBuilder' => 0.02, + 'ExtUtils::ParseXS' => 2.02, }, }, manpage_support => { Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.376 retrieving revision 1.377 diff -u -d -r1.376 -r1.377 --- Changes 22 Sep 2005 01:26:28 -0000 1.376 +++ Changes 22 Sep 2005 02:00:35 -0000 1.377 @@ -5,6 +5,9 @@ - Our POD parser will now accept "AUTHORS" as well as "AUTHOR" when looking for the author list in a module. [David Wheeler] + - The recommended dependency on ExtUtils::ParseXS has been moved into + the "C_support" auto_feature. + - The synonyms 'scripts' and 'prereq' for 'script_files' and 'requires' were broken in a previous version (0.27_01, probably), but now they're fixed. [David Golden] |
|
From: Ken W. <kwi...@us...> - 2005-09-22 01:26:37
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11335 Modified Files: Changes Log Message: Fix the 'scripts' and 'prereq' synonyms Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.375 retrieving revision 1.376 diff -u -d -r1.375 -r1.376 --- Changes 20 Sep 2005 02:11:27 -0000 1.375 +++ Changes 22 Sep 2005 01:26:28 -0000 1.376 @@ -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] + - The synonyms 'scripts' and 'prereq' for 'script_files' and + 'requires' were broken in a previous version (0.27_01, probably), + but now they're fixed. [David Golden] + - Previously, we assumed that any custom subclass of Module::Build was located in _build/lib/. This is only true if the author used the subclass() method, though. We now use %INC to find where the |
|
From: Ken W. <kwi...@us...> - 2005-09-22 01:26:37
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11335/lib/Module/Build Modified Files: Base.pm Log Message: Fix the 'scripts' and 'prereq' synonyms Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.478 retrieving revision 1.479 diff -u -d -r1.478 -r1.479 --- Base.pm 20 Sep 2005 02:12:51 -0000 1.478 +++ Base.pm 22 Sep 2005 01:26:29 -0000 1.479 @@ -146,8 +146,8 @@ $p->{dist_author} = [ $p->{dist_author} ] if defined $p->{dist_author} and not ref $p->{dist_author}; # Synonyms - $p->{requires} = delete $p->{prereq} if exists $p->{prereq}; - $p->{script_files} = delete $p->{scripts} if exists $p->{scripts}; + $p->{requires} = delete $p->{prereq} if defined $p->{prereq}; + $p->{script_files} = delete $p->{scripts} if defined $p->{scripts}; # Convert to arrays for ('extra_compiler_flags', 'extra_linker_flags') { |
|
From: Ken W. <kwi...@us...> - 2005-09-20 02:16:48
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27115/lib/Module/Build Modified Files: Compat.pm Log Message: Fix typo Index: Compat.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Compat.pm,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- Compat.pm 20 Sep 2005 00:54:33 -0000 1.67 +++ Compat.pm 20 Sep 2005 02:16:39 -0000 1.68 @@ -41,24 +41,32 @@ } print {$fh} "# Note: this file was auto-generated by ", __PACKAGE__, " version $VERSION\n"; - my $subclass_dir = $package->subclass_dir($build); - if (File::Spec->file_name_is_absolute($subclass_dir)) { - $build->log_warn("Warning: builder subclass " . ref($build) . - " was loaded with an absolute path, but should use a" . - " relative path for wide distribution"); + + # If a custom subclass is being used, make sure we add its directory to @INC + my $subclass_load = ''; + if (ref($build) ne "Module::Build") { + my $subclass_dir = $package->subclass_dir($build); + + if (File::Spec->file_name_is_absolute($subclass_dir)) { + my $base_dir = $build->base_dir; + $build->log_warn("Warning: builder subclass " . ref($build) . + " doesn't seem to have been loaded from within $base_dir") + unless $build->dir_contains($base_dir, $subclass_dir); + } + $subclass_load = "use lib '$subclass_dir';"; } if ($type eq 'small') { - printf {$fh} <<'EOF', $subclass_dir, ref($build), ref($build); + printf {$fh} <<'EOF', $subclass_load, ref($build), ref($build); use Module::Build::Compat 0.02; - use lib '%s'; + %s Module::Build::Compat->run_build_pl(args => \@ARGV); require %s; Module::Build::Compat->write_makefile(build_class => '%s'); EOF } elsif ($type eq 'passthrough') { - printf {$fh} <<'EOF', $subclass_dir, ref($build), ref($build); + printf {$fh} <<'EOF', $subclass_load, ref($build), ref($build); unless (eval "use Module::Build::Compat 0.02; 1" ) { print "This module requires Module::Build to install itself.\n"; @@ -85,7 +93,7 @@ chdir $cwd or die "Cannot chdir() back to $cwd: $!"; } eval "use Module::Build::Compat 0.02; 1" or die $@; - use lib '%s'; + %s Module::Build::Compat->run_build_pl(args => \@ARGV); require %s; Module::Build::Compat->write_makefile(build_class => '%s'); |
|
From: Ken W. <kwi...@us...> - 2005-09-20 02:12:59
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26392/lib/Module/Build Modified Files: Base.pm Log Message: Add a dir_contains() method Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.477 retrieving revision 1.478 diff -u -d -r1.477 -r1.478 --- Base.pm 29 Aug 2005 22:19:24 -0000 1.477 +++ Base.pm 20 Sep 2005 02:12:51 -0000 1.478 @@ -3362,6 +3362,28 @@ return 1; } +sub dir_contains { + my ($self, $first, $second) = @_; + # File::Spec doesn't have an easy way to check whether one directory + # is inside another, unfortunately. + + ($first, $second) = map File::Spec->canonpath($_), ($first, $second); + my @first_dirs = File::Spec->splitdir($first); + my @second_dirs = File::Spec->splitdir($second); + + return 0 if @second_dirs < @first_dirs; + + my $is_same = ( File::Spec->case_tolerant + ? sub {lc(shift()) eq lc(shift())} + : sub {shift() eq shift()} ); + + while (@first_dirs) { + return 0 unless $is_same->(shift @first_dirs, shift @second_dirs); + } + + return 1; +} + 1; __END__ |
|
From: Ken W. <kwi...@us...> - 2005-09-20 02:11:36
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26158/t Modified Files: files.t Log Message: Add a dir_contains() method Index: files.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/files.t,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- files.t 29 Jun 2005 08:27:06 -0000 1.8 +++ files.t 20 Sep 2005 02:11:28 -0000 1.9 @@ -3,7 +3,7 @@ use lib 't/lib'; use strict; -use Test::More tests => 5; +use Test::More tests => 6; use Cwd (); @@ -54,6 +54,14 @@ ok -e $file2; } +{ + # Try some dir_contains() combinations + my $first = File::Spec->catdir('', 'one', 'two'); + my $second = File::Spec->catdir('', 'one', 'two', 'three'); + + ok( Module::Build->dir_contains($first, $second) ); +} + # cleanup chdir( $cwd ) or die "Can''t chdir to '$cwd': $!"; $dist->remove; |
|
From: Ken W. <kwi...@us...> - 2005-09-20 02:11:35
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26158/lib/Module/Build Modified Files: Authoring.pod Log Message: Add a dir_contains() method Index: Authoring.pod =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Authoring.pod,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Authoring.pod 19 Jul 2005 00:29:01 -0000 1.12 +++ Authoring.pod 20 Sep 2005 02:11:28 -0000 1.13 @@ -898,6 +898,13 @@ Returns the name of the currently-running action, such as "build" or "test". +=item dir_contains($first_dir, $second_dir) + +Returns true if the first directory logically contains the second +directory. This is just a convenience function because C<File::Spec> +doesn't really provide an easy way to figure this out (but +C<Path::Class> does...). + =item dispatch($action, %args) This method is also called from the auto-generated C<Build> script. |
|
From: Ken W. <kwi...@us...> - 2005-09-20 02:11:35
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26158 Modified Files: Changes Log Message: Add a dir_contains() method Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.374 retrieving revision 1.375 diff -u -d -r1.374 -r1.375 --- Changes 20 Sep 2005 00:54:32 -0000 1.374 +++ Changes 20 Sep 2005 02:11:27 -0000 1.375 @@ -12,6 +12,8 @@ issue a warning if it seems to be outside the build directory. [Spotted by Peter Tandler] + - Added a dir_contains() method. + - If the user passes a no_index parameter to our constructor, we now pass that through when building the META.yml file. [Richard Soderberg, RT #9603] |
|
From: Ken W. <kwi...@us...> - 2005-09-20 00:54:52
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10900/lib/Module/Build Modified Files: Compat.pm Log Message: Warn when the subclass looks like it's outside the build directory Index: Compat.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Compat.pm,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- Compat.pm 10 Sep 2005 03:53:29 -0000 1.66 +++ Compat.pm 20 Sep 2005 00:54:33 -0000 1.67 @@ -42,6 +42,11 @@ print {$fh} "# Note: this file was auto-generated by ", __PACKAGE__, " version $VERSION\n"; my $subclass_dir = $package->subclass_dir($build); + if (File::Spec->file_name_is_absolute($subclass_dir)) { + $build->log_warn("Warning: builder subclass " . ref($build) . + " was loaded with an absolute path, but should use a" . + " relative path for wide distribution"); + } if ($type eq 'small') { printf {$fh} <<'EOF', $subclass_dir, ref($build), ref($build); |
|
From: Ken W. <kwi...@us...> - 2005-09-20 00:54:52
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10900 Modified Files: Changes Log Message: Warn when the subclass looks like it's outside the build directory Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.373 retrieving revision 1.374 diff -u -d -r1.373 -r1.374 --- Changes 9 Sep 2005 18:35:27 -0000 1.373 +++ Changes 20 Sep 2005 00:54:32 -0000 1.374 @@ -8,8 +8,9 @@ - Previously, we assumed that any custom subclass of Module::Build was located in _build/lib/. This is only true if the author used the subclass() method, though. We now use %INC to find where the - custom subclass really is, so that we can "use lib" it. [Spotted by - Peter Tandler] + custom subclass really is, so that we can "use lib" it. We also + issue a warning if it seems to be outside the build directory. + [Spotted by Peter Tandler] - If the user passes a no_index parameter to our constructor, we now pass that through when building the META.yml file. [Richard |
|
From: Ken W. <ke...@ma...> - 2005-09-19 17:14:17
|
[For some reason I hit control-c while the cvs change mailer was
running, so here's a facsimile of the report it would have generated.]
Add a new test case we currently fail on
Index: t/moduleinfo.t
===================================================================
RCS file: /cvsroot/module-build/Module-Build/t/moduleinfo.t,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- t/moduleinfo.t 22 Aug 2005 12:24:36 -0000 1.9
+++ t/moduleinfo.t 19 Sep 2005 15:13:29 -0000 1.10
@@ -3,7 +3,7 @@
use lib 't/lib';
use strict;
-use Test::More tests => 48;
+use Test::More tests => 50;
use File::Spec ();
@@ -126,6 +126,13 @@
# whatever
}
---
+ <<'---', # $VERSION declared as package variable from within 'main'
package
+$Simple::VERSION = '1.23';
+{
+ package Simple;
+ $x = $y, $cats = $dogs;
+}
+---
);
my( $i, $n ) = ( 1, scalar( @modules ) );
|
|
From: Ken W. <kwi...@us...> - 2005-09-12 19:58:16
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29198/lib/CPANPLUS/Dist Modified Files: Build.pm Log Message: A patch from Jos to allow the caller to filter the prereq list Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Build.pm 12 Sep 2005 19:57:14 -0000 1.6 +++ Build.pm 12 Sep 2005 19:58:07 -0000 1.7 @@ -335,15 +335,29 @@ my $dist = shift; my $mb = $dist->status->_mb_object; my $self = $dist->parent; + my $cb = $self->parent; my $prereqs = {}; foreach my $type ('requires', 'build_requires') { my $p = $mb->$type() || {}; $prereqs->{$_} = $p->{$_} foreach keys %$p; } - $self->status->prereqs( $prereqs ); - return $prereqs; + ### allows for a user defined callback to filter the prerequisite + ### list as they see fit, to remove (or add) any prereqs they see + ### fit. The default installed callback will return the hashref in + ### an unmodified form + ### this callback got added after cpanplus 0.0562, so use a 'can' + ### to find out if it's supported. For older versions, we'll just + ### return the hashref as is ourselves. + my $href = $cb->_callbacks->can('filter_prereqs') + ? $cb->_callbacks->filter_prereqs->( $cb, $prereqs ) + : $prereqs; + + $self->status->prereqs( $href ); + + ### make sure it's not the same ref + return { %$href }; } =pod |
|
From: Ken W. <kwi...@us...> - 2005-09-12 19:57:22
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29048/lib/CPANPLUS/Dist Modified Files: Build.pm Log Message: Correct a couple inaccuracies in the POD Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Build.pm 11 Aug 2005 02:36:45 -0000 1.5 +++ Build.pm 12 Sep 2005 19:57:14 -0000 1.6 @@ -722,13 +722,6 @@ =over 4 -=item * Uninstall modules installed by Module::Build (#13308) - -Module::Build doesn't write a so called C<packlist> file, which holds -a list of all files installed by a distribution. Without this file we -don't know what to remove. Until Module::Build generates this -C<packlist>, we are unable to remove any installations done by it. - =item * Module::Build's version comparison is not supported. Module::Build has its own way of defining what versions are considered @@ -739,7 +732,7 @@ 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 it's own API (#13169) +=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 to C<@INC> which force the loading of the C<not yet installed> |
|
From: Ken W. <kwi...@us...> - 2005-09-10 03:53:36
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15477/lib/Module/Build Modified Files: Compat.pm Log Message: Skip empty strings as args Index: Compat.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Compat.pm,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- Compat.pm 10 Sep 2005 03:53:10 -0000 1.65 +++ Compat.pm 10 Sep 2005 03:53:29 -0000 1.66 @@ -140,6 +140,8 @@ shift; my @out; foreach my $arg (@_) { + next if $arg eq ''; + my ($key, $val) = ($arg =~ /^(\w+)=(.+)/ ? ($1, $2) : die "Malformed argument '$arg'"); |
|
From: Ken W. <kwi...@us...> - 2005-09-10 03:53:18
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15450/lib/Module/Build Modified Files: Compat.pm ModuleInfo.pm Log Message: Do a better job of finding the M::B subclass Index: Compat.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Compat.pm,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- Compat.pm 6 Sep 2005 22:07:23 -0000 1.64 +++ Compat.pm 10 Sep 2005 03:53:10 -0000 1.65 @@ -8,6 +8,7 @@ use IO::File; use Config; use Module::Build; +use Module::Build::ModuleInfo; use Data::Dumper; my %makefile_to_build = @@ -131,12 +132,8 @@ sub subclass_dir { my ($self, $build) = @_; - my $build_mod = join('/', split /::/, ref($build)) . '.pm'; - return File::Spec->catdir($build->config_dir, 'lib') - unless exists $INC{$build_mod}; - - my ($build_vol, $build_dir) = File::Spec->splitpath($INC{$build_mod}); - return File::Spec->catpath($build_vol, $build_dir, ''); + return (Module::Build::ModuleInfo->find_module_dir_by_name(ref $build) + || File::Spec->catdir($build->config_dir, 'lib')); } sub makefile_to_build_args { Index: ModuleInfo.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/ModuleInfo.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ModuleInfo.pm 10 Sep 2005 03:40:18 -0000 1.9 +++ ModuleInfo.pm 10 Sep 2005 03:53:10 -0000 1.10 @@ -81,7 +81,7 @@ } # class method -sub find_module_by_name { +sub _do_find_module { my $package = shift; my $module = shift || die 'find_module_by_name() requires a package name'; my $dirs = shift || \@INC; @@ -89,14 +89,26 @@ my $file = File::Spec->catfile(split( /::/, $module)); foreach my $dir ( @$dirs ) { my $testfile = File::Spec->catfile($dir, $file); - return File::Spec->rel2abs( $testfile ) + return [ File::Spec->rel2abs( $testfile ), $dir ] if -e $testfile and !-d _; # For stuff like ExtUtils::xsubpp - return File::Spec->rel2abs( "$testfile.pm" ) + return [ File::Spec->rel2abs( "$testfile.pm" ), $dir ] if -e "$testfile.pm"; } return; } +# class method +sub find_module_by_name { + my $found = shift()->_do_find_module(@_) or return; + return $found->[0]; +} + +# class method +sub find_module_dir_by_name { + my $found = shift()->_do_find_module(@_) or return; + return $found->[1]; +} + sub _parse_file { my $self = shift; @@ -325,6 +337,14 @@ of directories can be passed in as an optional paramater, otherwise @INC is searched. -Can be called as both an object and a class method. +Can be called as either an object or a class method. + +=head2 find_module_dir_by_name( $module [ , \@dirs ] ) + +Returns the entry in C<@dirs> (or C<@INC> by default) that contains +the module C<$module>. A list of directories can be passed in as an +optional paramater, otherwise @INC is searched. + +Can be called as either an object or a class method. =cut |
|
From: Ken W. <kwi...@us...> - 2005-09-10 03:40:26
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14153 Modified Files: ModuleInfo.pm Log Message: Don't hard-code the package name Index: ModuleInfo.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/ModuleInfo.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ModuleInfo.pm 6 Sep 2005 22:00:45 -0000 1.8 +++ ModuleInfo.pm 10 Sep 2005 03:40:18 -0000 1.9 @@ -18,7 +18,7 @@ my $package = shift; my $filename = File::Spec->rel2abs( shift ); return undef unless defined( $filename ) && -f $filename; - return __PACKAGE__->_init( undef, $filename, @_ ); + return $package->_init( undef, $filename, @_ ); } sub new_from_module { @@ -26,9 +26,9 @@ my $module = shift; my %props = @_; $props{inc} ||= \@INC; - my $filename = __PACKAGE__->find_module_by_name( $module, $props{inc} ); + my $filename = $package->find_module_by_name( $module, $props{inc} ); return undef unless defined( $filename ) && -f $filename; - return __PACKAGE__->_init( $module, $filename, %props ); + return $package->_init( $module, $filename, %props ); } sub _init { |
|
From: Ken W. <kwi...@us...> - 2005-09-09 18:35:36
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28735 Modified Files: Changes Log Message: Allow AUTHORS for the author list Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.372 retrieving revision 1.373 diff -u -d -r1.372 -r1.373 --- Changes 6 Sep 2005 22:07:23 -0000 1.372 +++ Changes 9 Sep 2005 18:35:27 -0000 1.373 @@ -2,6 +2,9 @@ 0.27_03 + - Our POD parser will now accept "AUTHORS" as well as "AUTHOR" when + looking for the author list in a module. [David Wheeler] + - Previously, we assumed that any custom subclass of Module::Build was located in _build/lib/. This is only true if the author used the subclass() method, though. We now use %INC to find where the |
|
From: Ken W. <kwi...@us...> - 2005-09-09 18:35:35
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28735/lib/Module/Build Modified Files: PodParser.pm Log Message: Allow AUTHORS for the author list Index: PodParser.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/PodParser.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- PodParser.pm 8 Jul 2005 01:29:22 -0000 1.6 +++ PodParser.pm 9 Sep 2005 18:35:27 -0000 1.7 @@ -39,7 +39,7 @@ my @author; while (<$fh>) { - next unless /^=head1\s+AUTHOR/ ... /^=/; + next unless /^=head1\s+AUTHORS?/ ... /^=/; next if /^=/; push @author, $_ if /\@/; } @@ -93,7 +93,7 @@ if ($self->{_head} eq 'NAME') { my ($name, $abstract) = split( /\s+-\s+/, $text, 2 ); $self->{abstract} = $abstract; - } elsif ($self->{_head} eq 'AUTHOR') { + } elsif ($self->{_head} =~ /^AUTHORS?$/) { push @{$self->{author}}, $text if $text =~ /\@/; } } |
|
From: Ken W. <kwi...@us...> - 2005-09-06 22:07:31
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26845 Modified Files: Changes Log Message: Don't assume all subclasses are in _build/lib Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.371 retrieving revision 1.372 diff -u -d -r1.371 -r1.372 --- Changes 29 Aug 2005 22:19:24 -0000 1.371 +++ Changes 6 Sep 2005 22:07:23 -0000 1.372 @@ -2,6 +2,12 @@ 0.27_03 + - Previously, we assumed that any custom subclass of Module::Build + was located in _build/lib/. This is only true if the author used + the subclass() method, though. We now use %INC to find where the + custom subclass really is, so that we can "use lib" it. [Spotted by + Peter Tandler] + - If the user passes a no_index parameter to our constructor, we now pass that through when building the META.yml file. [Richard Soderberg, RT #9603] |
|
From: Ken W. <kwi...@us...> - 2005-09-06 22:07:31
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26845/lib/Module/Build Modified Files: Compat.pm Log Message: Don't assume all subclasses are in _build/lib Index: Compat.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Compat.pm,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- Compat.pm 17 Jun 2005 04:27:57 -0000 1.63 +++ Compat.pm 6 Sep 2005 22:07:23 -0000 1.64 @@ -40,8 +40,7 @@ } print {$fh} "# Note: this file was auto-generated by ", __PACKAGE__, " version $VERSION\n"; - my $subclass_dir = File::Spec->catdir($build->config_dir, 'lib'); - $subclass_dir =~ s/([\'\\])/\\$1/g; + my $subclass_dir = $package->subclass_dir($build); if ($type eq 'small') { printf {$fh} <<'EOF', $subclass_dir, ref($build), ref($build); @@ -129,6 +128,17 @@ } +sub subclass_dir { + my ($self, $build) = @_; + + my $build_mod = join('/', split /::/, ref($build)) . '.pm'; + return File::Spec->catdir($build->config_dir, 'lib') + unless exists $INC{$build_mod}; + + my ($build_vol, $build_dir) = File::Spec->splitpath($INC{$build_mod}); + return File::Spec->catpath($build_vol, $build_dir, ''); +} + sub makefile_to_build_args { shift; my @out; |
|
From: Ken W. <kwi...@us...> - 2005-09-06 22:00:54
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24046/lib/Module/Build Modified Files: ModuleInfo.pm Log Message: Change to a different kind of sneakiness, since the old one causes warnings Index: ModuleInfo.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/ModuleInfo.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ModuleInfo.pm 29 Aug 2005 11:38:16 -0000 1.7 +++ ModuleInfo.pm 6 Sep 2005 22:00:45 -0000 1.8 @@ -209,7 +209,7 @@ # version.pm will change the ->VERSION method, so we mitigate the # potential effects here. Unfortunately local(*UNIVERSAL::VERSION) - # will crash perl < 5.8.1. We also use *{Foo::VERSION} instead of + # will crash perl < 5.8.1. We also use * Foo::VERSION instead of # *Foo::VERSION so that old versions of CPAN.pm, etc. with a # too-permissive regex don't think we're actually declaring a # version. @@ -217,7 +217,7 @@ my $old_version = \&UNIVERSAL::VERSION; eval {require version}; my $result = eval $eval; - *{UNIVERSAL::VERSION} = $old_version; + * UNIVERSAL::VERSION = $old_version; warn "Error evaling version line '$eval' in $self->{filename}: $@\n" if $@; # Unbless it if it's a version.pm object |