module-build-general Mailing List for Module::Build (Page 172)
Status: Beta
Brought to you by:
kwilliams
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(24) |
Sep
(2) |
Oct
(18) |
Nov
(36) |
Dec
(17) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(3) |
Feb
(96) |
Mar
(82) |
Apr
(63) |
May
(90) |
Jun
(52) |
Jul
(94) |
Aug
(89) |
Sep
(75) |
Oct
(118) |
Nov
(101) |
Dec
(111) |
| 2004 |
Jan
(159) |
Feb
(155) |
Mar
(65) |
Apr
(121) |
May
(62) |
Jun
(68) |
Jul
(54) |
Aug
(45) |
Sep
(78) |
Oct
(80) |
Nov
(271) |
Dec
(205) |
| 2005 |
Jan
(128) |
Feb
(96) |
Mar
(83) |
Apr
(113) |
May
(46) |
Jun
(120) |
Jul
(146) |
Aug
(47) |
Sep
(93) |
Oct
(118) |
Nov
(116) |
Dec
(60) |
| 2006 |
Jan
(130) |
Feb
(330) |
Mar
(228) |
Apr
(203) |
May
(97) |
Jun
(15) |
Jul
(6) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Dave R. <au...@ur...> - 2003-04-26 17:47:00
|
On Thu, 24 Apr 2003, Richard Clamp wrote: > I'm having a fun interaction between META.yml and SIGNATURE. > > If I don't blow away SIGNATURE and META.yml before ./Build dist the > SIGNATURE generated has stale values. > > If I do blow them away then SIGNATURE doesn't know about META.yml, so > when you come to verify the dist later, it fails. > > Which is the right way around to make a signed dist? I think the patch below my sig addresses this correctly. It makes sure META.yml is generated before creating the SIGNATURE file, but it won't be written twice if signing is does as part of "Build dist". It does add a new action, distmeta, which may or may not be desirable, but this is easy enough to take out of the patch. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/ Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.97 diff -u -u -r1.97 Base.pm --- Base.pm 24 Apr 2003 16:23:52 -0000 1.97 +++ Base.pm 26 Apr 2003 17:44:22 -0000 @@ -1011,6 +1011,8 @@ warn "Couldn't load Module::Signature for 'distsign' action:\n $@\n"; return; } + + $self->depends_on('distmeta'); Module::Signature::sign(); } @@ -1032,11 +1034,17 @@ $self->depends_on('distcheck'); } +sub ACTION_distmeta { + my ($self) = @_; + + $self->{metafile} = 'META.yml'; + $self->write_metadata($self->{metafile}); +} + sub ACTION_distdir { my ($self) = @_; - my $metafile = 'META.yml'; - $self->write_metadata($metafile); + $self->depends_on('distmeta'); my $dist_dir = $self->dist_dir; @@ -1046,7 +1054,7 @@ my $dist_files = ExtUtils::Manifest::maniread('MANIFEST'); $self->delete_filetree($dist_dir); ExtUtils::Manifest::manicopy($dist_files, $dist_dir, 'best'); - warn "*** Did you forget to add $metafile to the MANIFEST?\n" unless exists $dist_files->{$metafile}; + warn "*** Did you forget to add $self->{metafile} to the MANIFEST?\n" unless exists $dist_files->{$self->{metafile}}; } sub ACTION_disttest { @@ -1092,6 +1100,9 @@ sub write_metadata { my ($self, $file) = @_; + + return if $self->{wrote_metadata}; + my $p = $self->{properties}; unless ($p->{license}) { @@ -1127,8 +1138,8 @@ $node->{generated_by} = "Module::Build version " . Module::Build->VERSION; - return YAML::StoreFile($file, $node ) if $YAML::VERSION le '0.30'; - return YAML::DumpFile( $file, $node ); + return $self->{wrote_metadata} = YAML::StoreFile($file, $node ) if $YAML::VERSION le '0.30'; + return $self->{wrote_metadata} = YAML::DumpFile( $file, $node ); } sub find_dist_packages { |
|
From: Dave R. <au...@ur...> - 2003-04-26 16:36:03
|
The current code only adds these to the cleanup if they are not up to date, but if for some reason they already exist and are up to date, they should still be removed on cleanup. Patch below sig. I'm not sure exactly how to test this though. /*======================= House Absolute Consulting www.houseabsolute.com =======================*/ --- Base.pm.~1.97.~ 2003-04-24 15:40:47.000000000 -0500 +++ Base.pm 2003-04-26 11:34:36.000000000 -0500 @@ -1355,8 +1355,8 @@ (my $file_base = $file) =~ s/\.[^.]+$//; # .xs -> .c + $self->add_to_cleanup("$file_base.c"); unless ($self->up_to_date($file, "$file_base.c")) { - $self->add_to_cleanup("$file_base.c"); $self->compile_xs($file); } @@ -1372,8 +1372,8 @@ } # .xs -> .bs + $self->add_to_cleanup("$file_base.bs"); unless ($self->up_to_date($file, "$file_base.bs")) { - $self->add_to_cleanup("$file_base.bs"); require ExtUtils::Mkbootstrap; print "ExtUtils::Mkbootstrap::Mkbootstrap('$file_base')\n"; ExtUtils::Mkbootstrap::Mkbootstrap($file_base); # Original had $BSLOADLIBS - what's that? |
|
From: Ken W. <ke...@ma...> - 2003-04-24 21:43:19
|
Ooh, cool. I'll most likely apply this sometime this weekend. -Ken On Thursday, April 24, 2003, at 03:30 PM, Dave Rolsky wrote: > This patch adds support a "Build ppd" action, along with tests for it. > The PPD generating code is mostly from EU::MM_Unix in the 6.10_03 > distro, > except that I don't add the OS or ARCHITECTURE tags unless the module > includes XS, though I really don't know if that's right. > > I also updated a few attribute names based on the spec at > http://www.xav.com/perl/site/lib/XML/PPD.html > > The patch also refactors several bits of code so that the ACTION_ppd > method didn't have too much cut'n'pasted code in it. > > It adds two new properties, 'author' and 'abstract', though the latter > can > be determined by looking at a module's docs if it isn't given. > > There's no docs in the patch, but I'd be happy to do that if the patch > is > accepted. > > Patch after sig. > > > -dave |
|
From: Dave R. <au...@ur...> - 2003-04-24 20:32:03
|
This patch adds support a "Build ppd" action, along with tests for it. The PPD generating code is mostly from EU::MM_Unix in the 6.10_03 distro, except that I don't add the OS or ARCHITECTURE tags unless the module includes XS, though I really don't know if that's right. I also updated a few attribute names based on the spec at http://www.xav.com/perl/site/lib/XML/PPD.html The patch also refactors several bits of code so that the ACTION_ppd method didn't have too much cut'n'pasted code in it. It adds two new properties, 'author' and 'abstract', though the latter can be determined by looking at a module's docs if it isn't given. There's no docs in the patch, but I'd be happy to do that if the patch is accepted. Patch after sig. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/ ? t/XSTest/lib/XSTest.bs ? t/XSTest/lib/XSTest.c Index: lib/Module/Build/Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.97 diff -u -r1.97 Base.pm --- lib/Module/Build/Base.pm 24 Apr 2003 16:23:52 -0000 1.97 +++ lib/Module/Build/Base.pm 24 Apr 2003 20:27:00 -0000 @@ -198,6 +198,9 @@ verbose c_source autosplit + + author + abstract ); sub valid_property { exists $valid_properties{$_[1]} } @@ -436,10 +439,7 @@ my %status = (need => $spec); if ($modname eq 'perl') { - # Check the current perl interpreter - # It's much more convenient to use $] here than $^V, but 'man - # perlvar' says I'm not supposed to. Bloody tyrant. - $status{have} = $^V ? $self->perl_version_to_float(sprintf "%vd", $^V) : $]; + $status{have} = $self->_find_perl_version; } else { my $file = $self->find_module_by_name($modname, \@INC); @@ -455,12 +455,7 @@ } } - my @conditions; - if ($spec =~ /^\s*([\w.]+)\s*$/) { # A plain number, maybe with dots, letters, and underscores - @conditions = (">= $spec"); - } else { - @conditions = split /\s*,\s*/, $spec; - } + my @conditions = $self->_parse_conditions($spec); foreach (@conditions) { unless ( /^\s* (<=?|>=?|==|!=) \s* ([\w.]+) \s*$/x ) { @@ -481,6 +476,24 @@ return \%status; } +sub _find_perl_version { + my ($self) = @_; + # Check the current perl interpreter + # It's much more convenient to use $] here than $^V, but 'man + # perlvar' says I'm not supposed to. Bloody tyrant. + return $^V ? $self->perl_version_to_float(sprintf "%vd", $^V) : $]; +} + +sub _parse_conditions { + my($self, $spec) = @_; + + if ($spec =~ /^\s*([\w.]+)\s*$/) { # A plain number, maybe with dots, letters, and underscores + return (">= $spec"); + } else { + return split /\s*,\s*/, $spec; + } +} + # I wish I could set $! to a string, but I can't, so I use $@ sub check_installed_version { my ($self, $modname, $spec) = @_; @@ -611,7 +624,12 @@ my ($action, %args); foreach (@_) { if ( /^(\w+)=(.*)/ ) { - $args{$1} = $2; + if ( exists $args{$1} ) { + $args{$1} = [ $args{$1} ] unless ref $args{$1}; + push @{$args{$1}}, $2; + } else { + $args{$1} = $2; + } } elsif ( /^(\w+)$/ ) { die "Error: multiple build actions given: '$action' and '$1'" if $action; $action = $1; @@ -1070,6 +1088,152 @@ require ExtUtils::Manifest; # ExtUtils::Manifest is not warnings clean. local ($^W, $ExtUtils::Manifest::Quiet) = (0,1); ExtUtils::Manifest::mkmanifest(); +} + +# This code is mostly borrowed from ExtUtils::MM_Unix 6.10_03, with a +# few tweaks based on the PPD spec at +# http://www.xav.com/perl/site/lib/XML/PPD.html +sub ACTION_ppd { + my ($self) = @_; + + unless (exists $self->{args}{codebase}) { + warn "Cannot create a PPD file unless codebase argument is given\n"; + return; + } + + $self->find_version; + my $version = $self->_ppd_version($self->{properties}{dist_version}); + + my $abstract = $self->{properties}{abstract}; + + unless (defined $abstract) { + $abstract = $self->_parse_abstract($self->{properties}{dist_version_from}); + } + + $abstract = '' unless defined $abstract; + + my $author = + defined $self->{properties}{author} ? $self->{properties}{author} : ''; + + $self->_simple_xml_escape($_) for ($abstract, $author); + + # could add <LICENSE HREF=...> tag if we knew what the URLs were for + # various licenses + my $ppd = sprintf(<<'EOF', $self->{properties}{dist_name}, $version, $self->{properties}{dist_name}, $abstract, $author); +<SOFTPKG NAME="%s" VERSION="%s"> + <TITLE>%s</TITLE> + <ABSTRACT>%s</ABSTRACT> + <AUTHOR>%s</AUTHOR> + <IMPLEMENTATION> +EOF + + foreach my $type (qw(requires recommends build_requires)) { + while (my ($modname, $spec) = each %{$self->{properties}{$type}}) { + next if $modname eq 'perl'; + + my $min_version = '0.0'; + foreach my $c ($self->_parse_conditions($spec)) { + my ($op, $version) = $c =~ /^\s* (<=?|>=?|==|!=) \s* ([\w.]+) \s*$/x; + + # This is a nasty hack because it fails if there is no >= op + if ($op eq '>=') { + $min_version = $version; + last; + } + } + + $modname =~ s/::/-/g; + + # Another hack because we treat everything as a plain dependency + $ppd .= sprintf(<<'EOF', $modname, $self->_ppd_version($min_version)); + <DEPENDENCY NAME="%s" VERSION="%s" /> +EOF + + } + } + + # We only include these tags if this module involves XS, on the + # assumption that pure Perl modules will work on any OS. PERLCORE, + # unfortunately, seems to indicate that a module works with _only_ + # that version of Perl, and so is only appropriate when a module + # uses XS. + if (@{$self->find_xs_files}) { + my $perl_version = $self->_ppd_version($self->_find_perl_version); + $ppd .= sprintf(<<'EOF', $perl_version, $^O, $self->{config}{archname}); + <PERLCORE VERSION="%s" /> + <OS VALUE="%s" /> + <ARCHITECTURE NAME="%s" /> +EOF + } + + foreach my $codebase (ref $self->{args}{codebase} ? + @{$self->{args}{codebase}} : + $self->{args}{codebase} ) { + $self->_simple_xml_escape($codebase); + $ppd .= sprintf(<<'EOF', $codebase); + <CODEBASE HREF="%s" /> +EOF + } + + $ppd .= <<'EOF'; + </IMPLEMENTATION> +</SOFTPKG> +EOF + + my $ppd_file = "$self->{properties}{dist_name}.ppd"; + my $fh = IO::File->new(">$ppd_file") + or die "Cannot write to $ppd_file: $!"; + print $fh $ppd; + close $fh; + + $self->add_to_cleanup($ppd_file); +} + +sub _parse_abstract { + my($self, $file) = @_; + + my $result; + local $/ = "\n"; + + my $fh = IO::File->new("<$file") + or die "Could not open $file: $!"; + + my $package = $self->{properties}{dist_name}; + $package =~ s/-/::/g; + + my $inpod = 0; + while (<$fh>) { + $inpod = /^=(?!cut)/ ? 1 : /^=cut/ ? 0 : $inpod; + + next unless $inpod; + + chomp; + + next unless /^($package\s-\s)(.*)/; + + $result = $2; + last; + } + close $fh; + + return $result; +} + +sub _ppd_version { + my ($self, $version) = @_; + + # generates something like "0,18,0,0" + return join ',', (split(/\./, $version), (0)x4)[0..3]; +} + +sub _simple_xml_escape { + my ($self) = @_; + + $_[1] =~ s/\n/\\n/sg; + $_[1] =~ s/\"/"/g; + $_[1] =~ s/&/&/g; + $_[1] =~ s/</</g; + $_[1] =~ s/>/>/g; } sub dist_dir { Index: t/runthrough.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/runthrough.t,v retrieving revision 1.17 diff -u -r1.17 runthrough.t --- t/runthrough.t 24 Apr 2003 16:24:35 -0000 1.17 +++ t/runthrough.t 24 Apr 2003 20:27:00 -0000 @@ -1,5 +1,7 @@ +use strict; + use Test; -BEGIN { plan tests => 17 } +BEGIN { plan tests => 18 } use Module::Build; use File::Spec; use File::Path; @@ -20,6 +22,9 @@ chdir $goto or die "can't chdir to $goto: $!"; my $build = new Module::Build( module_name => 'Sample', scripts => [ 'script' ], + requires => {'Module::Build' => 0.05}, + author => 'Sample Author', + abstract => 'Sample Abstract', license => 'perl' ); ok $build; @@ -101,6 +106,28 @@ ok $first_line ne "#!perl -w\n"; } + +{ + $build->dispatch('ppd', args => {codebase => '/path/to/codebase'}); + + my $ppd = slurp('Sample.ppd'); + + # This test is quite a hack since with XML you don't really want to + # do a strict string comparison, but absent an XML parser it's the + # best we can do. + ok $ppd, <<'EOF'; +<SOFTPKG NAME="Sample" VERSION="0,01,0,0"> + <TITLE>Sample</TITLE> + <ABSTRACT>Sample Abstract</ABSTRACT> + <AUTHOR>Sample Author</AUTHOR> + <IMPLEMENTATION> + <DEPENDENCY NAME="Module-Build" VERSION="0,05,0,0" /> + <CODEBASE HREF="/path/to/codebase" /> + </IMPLEMENTATION> +</SOFTPKG> +EOF +} + eval {$build->dispatch('realclean')}; ok $@, ''; Index: t/xs.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/xs.t,v retrieving revision 1.5 diff -u -r1.5 xs.t --- t/xs.t 24 Feb 2003 18:23:20 -0000 1.5 +++ t/xs.t 24 Apr 2003 20:27:00 -0000 @@ -4,12 +4,15 @@ use Test; print("1..0 # Skipped: no compiler found\n"), exit(0) unless have_compiler(); -plan tests => 7; +plan tests => 8; +use Config; use Module::Build; use File::Spec; ok(1); +require File::Spec->catfile('t', 'common.pl'); + ######################### End of black magic. # Pretend we're in the t/XSTest/ subdirectory @@ -19,6 +22,7 @@ my $m = new Module::Build ( module_name => 'XSTest', + author => 'XSTest Author', ); ok(1); @@ -31,6 +35,31 @@ # We can't be verbose in the sub-test, because Test::Harness will think that the output is for the top-level test. eval {$m->dispatch('test')}; ok $@, ''; + +{ + $m->dispatch('ppd', args => {codebase => '/path/to/codebase-xs'}); + + my $ppd = slurp('XSTest.ppd'); + + my $perl_version = $m->_ppd_version($m->_find_perl_version); + + # This test is quite a hack since with XML you don't really want to + # do a strict string comparison, but absent an XML parser it's the + # best we can do. + ok $ppd, <<"EOF"; +<SOFTPKG NAME="XSTest" VERSION="0,01,0,0"> + <TITLE>XSTest</TITLE> + <ABSTRACT>Perl extension for blah blah blah</ABSTRACT> + <AUTHOR>XSTest Author</AUTHOR> + <IMPLEMENTATION> + <PERLCORE VERSION="$perl_version" /> + <OS VALUE="$^O" /> + <ARCHITECTURE NAME="$Config{archname}" /> + <CODEBASE HREF="/path/to/codebase-xs" /> + </IMPLEMENTATION> +</SOFTPKG> +EOF +} eval {$m->dispatch('realclean')}; ok $@, ''; |
|
From: Dave R. <au...@ur...> - 2003-04-24 18:58:38
|
On Thu, 24 Apr 2003, Ken Williams wrote: > I don't much like the idea of the tests reading the 'cleanup' file - > first because that should basically be considered private data, not > part of the interface, and second because the caller shouldn't really > care whether it's on disk or not, just whether it "works right". > > The current design is that the list of cleanup files is written to disk > at the soonest possible moment, which means whenever add_to_cleanup() > is called and there's a config directory to write into. Maybe we > should try to do it even sooner, i.e. whenever add_to_cleanup() *or* > create_build_script() is called. > > The patch I'll apply is appended here. It uses some new interface > stuff that I think is useful. It also changes the add_to_cleanup() > method yet again, this time for the simpler. I think the whole system > is a bit simpler now, actually. Simpler is good. -dave |
|
From: Ken W. <ke...@ma...> - 2003-04-24 16:24:54
|
Hey,
I don't much like the idea of the tests reading the 'cleanup' file -
first because that should basically be considered private data, not
part of the interface, and second because the caller shouldn't really
care whether it's on disk or not, just whether it "works right".
The current design is that the list of cleanup files is written to disk
at the soonest possible moment, which means whenever add_to_cleanup()
is called and there's a config directory to write into. Maybe we
should try to do it even sooner, i.e. whenever add_to_cleanup() *or*
create_build_script() is called.
The patch I'll apply is appended here. It uses some new interface
stuff that I think is useful. It also changes the add_to_cleanup()
method yet again, this time for the simpler. I think the whole system
is a bit simpler now, actually.
-Ken
On Thursday, April 24, 2003, at 09:36 AM, Dave Rolsky wrote:
> On Thu, 24 Apr 2003, Dave Rolsky wrote:
>
>> Ken, you changed my patch in a way that broke it. Unfortunately, my
>> test
>> case wasn't very good, so it didn't catch it.
>>
>> Here's another patch that fixes this problem again and adds a test
>> case
>> that actually tests it ;)
>
> Except this broke the XS tests cause it wasn't quite right. Ok, here
> it
> is yet again, totally freaking working!
>
>
Index: lib/Module/Build/Base.pm
===================================================================
RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v
retrieving revision 1.95
diff -u -r1.95 Base.pm
--- lib/Module/Build/Base.pm 21 Apr 2003 20:54:40 -0000 1.95
+++ lib/Module/Build/Base.pm 24 Apr 2003 16:19:59 -0000
@@ -1,6 +1,6 @@
package Module::Build::Base;
-# $Id: Base.pm,v 1.95 2003/04/21 20:54:40 kwilliams Exp $
+# $Id: Base.pm,v 1.96 2003/04/24 15:50:43 kwilliams Exp $
use strict;
BEGIN { require 5.00503 }
@@ -292,26 +292,44 @@
return undef;
}
-sub add_to_cleanup {
+sub _write_cleanup {
my $self = shift;
- my @new_files = grep {!exists $self->{cleanup}{$_}} @_, keys
%{$self->{add_to_cleanup}};
- return unless @new_files;
+ my @to_write = keys %{ $self->{add_to_cleanup} }
+ or return;
+
+ my $file = $self->config_file('cleanup');
+ my $fh = IO::File->new(">> $file") or die "Can't write to $file: $!";
+ print $fh "$_\n" foreach @to_write;
+ close $fh;
- if ( my $file = $self->config_file('cleanup') ) {
- # A state file exists on disk, so we don't need to save in memory
+ @{ $self->{cleanup} }{ @to_write } = ();
+ $self->{add_to_cleanup} = {};
+}
- my $fh = IO::File->new(">> $file") or die "Can't append to $file:
$!";
- print $fh "$_\n" foreach @new_files;
- delete $self->{add_to_cleanup};
-
- } else {
- # No state file is being used. Maybe it will later, but for now
- # just save in memory.
+sub cleanup_is_flushed {
+ my $self = shift;
+ return ! keys %{ $self->{add_to_cleanup} };
+}
- @{$self->{add_to_cleanup}}{ @new_files } = ();
- }
+sub add_to_cleanup {
+ my $self = shift;
+
+ # $self->{cleanup} contains files that are already written in the
+ # 'cleanup' file. $self->{add_to_cleanup} is a buffer that we
+ # haven't written yet (and may never write if we don't ever create
+ # the cleanup file).
+
+ my @new_files = grep {!exists $self->{cleanup}{$_}} @_
+ or return;
+
+ @{$self->{add_to_cleanup}}{ @new_files } = ();
- @{$self->{cleanup}}{ @new_files } = ();
+ $self->_write_cleanup if $self->config_file('cleanup');
+}
+
+sub cleanup {
+ my $self = shift;
+ return (keys %{$self->{cleanup}}, keys %{$self->{add_to_cleanup}});
}
sub config_file {
@@ -358,6 +376,8 @@
my @items = qw(requires build_requires conflicts recommends);
print $fh Data::Dumper::Dumper( { map {$_,$self->{properties}{$_}}
@items } );
close $fh;
+
+ $self->_write_cleanup;
}
sub prereq_failures {
@@ -953,7 +973,7 @@
sub ACTION_clean {
my ($self) = @_;
- foreach my $item (keys %{$self->{cleanup}}) {
+ foreach my $item ($self->cleanup) {
$self->delete_filetree($item);
}
}
Index: t/runthrough.t
===================================================================
RCS file: /cvsroot/module-build/Module-Build/t/runthrough.t,v
retrieving revision 1.15
diff -u -r1.15 runthrough.t
--- t/runthrough.t 21 Apr 2003 19:44:04 -0000 1.15
+++ t/runthrough.t 24 Apr 2003 16:19:59 -0000
@@ -1,5 +1,5 @@
use Test;
-BEGIN { plan tests => 14 }
+BEGIN { plan tests => 17 }
use Module::Build;
use File::Spec;
use File::Path;
@@ -23,14 +23,22 @@
license => 'perl' );
ok $build;
+# Make sure cleanup files added before create_build_script() get
respected
$build->add_to_cleanup('before_script');
eval {$build->create_build_script};
ok $@, '';
+ok $build->cleanup_is_flushed;
-ok grep $_ eq 'before_script', keys %{$build->{cleanup}};
+# The 'cleanup' file doesn't exist yet
+ok grep $_ eq 'before_script', $build->cleanup;
$build->add_to_cleanup('save_out');
+
+# The 'cleanup' file now exists
+ok grep $_ eq 'before_script', $build->cleanup;
+ok grep $_ eq 'save_out', $build->cleanup;
+
my $output = eval {
stdout_of( sub { $build->dispatch('test', verbose => 1) } )
};
|
|
From: Dave R. <au...@ur...> - 2003-04-24 14:37:59
|
On Thu, 24 Apr 2003, Dave Rolsky wrote: > Ken, you changed my patch in a way that broke it. Unfortunately, my test > case wasn't very good, so it didn't catch it. > > Here's another patch that fixes this problem again and adds a test case > that actually tests it ;) Except this broke the XS tests cause it wasn't quite right. Ok, here it is yet again, totally freaking working! -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/ ? t/XSTest/lib/XSTest.bs ? t/XSTest/lib/XSTest.c Index: lib/Module/Build/Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.95 diff -u -r1.95 Base.pm --- lib/Module/Build/Base.pm 21 Apr 2003 20:54:40 -0000 1.95 +++ lib/Module/Build/Base.pm 24 Apr 2003 14:36:13 -0000 @@ -307,8 +307,8 @@ } else { # No state file is being used. Maybe it will later, but for now # just save in memory. - @{$self->{add_to_cleanup}}{ @new_files } = (); + return; } @{$self->{cleanup}}{ @new_files } = (); @@ -953,7 +953,7 @@ sub ACTION_clean { my ($self) = @_; - foreach my $item (keys %{$self->{cleanup}}) { + foreach my $item (keys %{$self->{cleanup}}, keys %{$self->{add_to_cleanup}}) { $self->delete_filetree($item); } } Index: t/runthrough.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/runthrough.t,v retrieving revision 1.15 diff -u -r1.15 runthrough.t --- t/runthrough.t 21 Apr 2003 19:44:04 -0000 1.15 +++ t/runthrough.t 24 Apr 2003 14:36:13 -0000 @@ -3,6 +3,7 @@ use Module::Build; use File::Spec; use File::Path; +use IO::File; my $HAVE_YAML = eval {require YAML; 1}; my $HAVE_SIGNATURE = eval {require Module::Signature; 1}; @@ -28,9 +29,19 @@ eval {$build->create_build_script}; ok $@, ''; -ok grep $_ eq 'before_script', keys %{$build->{cleanup}}; - +# Do this here to force it to write cleanup file $build->add_to_cleanup('save_out'); + +my $cleanup = $build->config_file('cleanup'); +my $fh = IO::File->new("<$cleanup") + or die "Cannot read $cleanup: $!"; +my $found = 0; +while (<$fh>) { + chomp; + $found = 1 if $_ eq 'before_script'; +} +ok $found; + my $output = eval { stdout_of( sub { $build->dispatch('test', verbose => 1) } ) }; |
|
From: Dave R. <au...@ur...> - 2003-04-24 14:31:19
|
Ken, you changed my patch in a way that broke it. Unfortunately, my test case wasn't very good, so it didn't catch it. Here's another patch that fixes this problem again and adds a test case that actually tests it ;) /*======================= House Absolute Consulting www.houseabsolute.com =======================*/ ? t/XSTest/blib ? t/XSTest/lib/XSTest.bs ? t/XSTest/lib/XSTest.c Index: lib/Module/Build/Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.95 diff -u -r1.95 Base.pm --- lib/Module/Build/Base.pm 21 Apr 2003 20:54:40 -0000 1.95 +++ lib/Module/Build/Base.pm 24 Apr 2003 14:28:38 -0000 @@ -309,6 +309,7 @@ # just save in memory. @{$self->{add_to_cleanup}}{ @new_files } = (); + return; } @{$self->{cleanup}}{ @new_files } = (); Index: t/runthrough.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/runthrough.t,v retrieving revision 1.15 diff -u -r1.15 runthrough.t --- t/runthrough.t 21 Apr 2003 19:44:04 -0000 1.15 +++ t/runthrough.t 24 Apr 2003 14:28:38 -0000 @@ -3,6 +3,7 @@ use Module::Build; use File::Spec; use File::Path; +use IO::File; my $HAVE_YAML = eval {require YAML; 1}; my $HAVE_SIGNATURE = eval {require Module::Signature; 1}; @@ -28,9 +29,19 @@ eval {$build->create_build_script}; ok $@, ''; -ok grep $_ eq 'before_script', keys %{$build->{cleanup}}; - +# Do this here to force it to write cleanup file $build->add_to_cleanup('save_out'); + +my $cleanup = $build->config_file('cleanup'); +my $fh = IO::File->new("<$cleanup") + or die "Cannot read $cleanup: $!"; +my $found = 0; +while (<$fh>) { + chomp; + $found = 1 if $_ eq 'before_script'; +} +ok $found; + my $output = eval { stdout_of( sub { $build->dispatch('test', verbose => 1) } ) }; |
|
From: Richard C. <ric...@un...> - 2003-04-24 12:49:35
|
I'm having a fun interaction between META.yml and SIGNATURE. If I don't blow away SIGNATURE and META.yml before ./Build dist the SIGNATURE generated has stale values. If I do blow them away then SIGNATURE doesn't know about META.yml, so when you come to verify the dist later, it fails. Which is the right way around to make a signed dist? -- Richard Clamp <ric...@un...> |
|
From: David C. <dl...@ha...> - 2003-04-23 18:09:29
|
On Mon, Apr 21, 2003 at 03:50:52PM -0700, sc...@po... wrote: > On Mon, Apr 21, 2003 at 02:13:05PM -0500, Ken Williams wrote: > > > > > > What are people doing now for manification of POD and installation of > > > said manpages? > > > > Nothing yet. There's an item in the to-do list for it, and there's an > > action called 'manifypods' that gets started on implementing it, but > > it's not done yet. If you could contribute any time to implementing & > > testing it, it'd be welcome effort. > > The pod2man* functions in ExtUtils::Command::MM should serve as a starting > point for about 80% of the work. Be sure to use the alpha version from CPAN > or on makemaker.org, earlier versions of MakeMaker's manifypods stuff is > frightening. My thoughts, too. I'll try to find some time to work on it. |
|
From: <sc...@po...> - 2003-04-21 22:51:18
|
On Mon, Apr 21, 2003 at 02:13:05PM -0500, Ken Williams wrote: > > > > What are people doing now for manification of POD and installation of > > said manpages? > > Nothing yet. There's an item in the to-do list for it, and there's an > action called 'manifypods' that gets started on implementing it, but > it's not done yet. If you could contribute any time to implementing & > testing it, it'd be welcome effort. The pod2man* functions in ExtUtils::Command::MM should serve as a starting point for about 80% of the work. Be sure to use the alpha version from CPAN or on makemaker.org, earlier versions of MakeMaker's manifypods stuff is frightening. |
|
From: Ken W. <ke...@ma...> - 2003-04-21 19:44:46
|
Applied! -Ken On Monday, April 21, 2003, at 02:26 PM, Dave Rolsky wrote: > On Mon, 21 Apr 2003, Ken Williams wrote: > >> This is probably a bug, not something that should be documented. >> add_to_cleanup() should work even if you're not using a Build script >> or >> if it hasn't been created yet. > > Patch below sig. It's not the most beautiful test, but it does work. > > > /*======================= > House Absolute Consulting > www.houseabsolute.com > =======================*/ > > > Index: lib/Module/Build/Base.pm > =================================================================== > RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v > retrieving revision 1.92 > diff -u -r1.92 Base.pm > --- lib/Module/Build/Base.pm 19 Apr 2003 00:16:47 -0000 1.92 > +++ lib/Module/Build/Base.pm 21 Apr 2003 19:26:04 -0000 > @@ -292,12 +292,14 @@ > > sub add_to_cleanup { > my $self = shift; > - my @need_to_write = grep {!exists $self->{cleanup}{$_}} @_; > + my @need_to_write = grep {!exists $self->{cleanup}{$_}} @_, keys > %{$self->{add_to_cleanup}}; > return unless @need_to_write; > > if ( my $file = $self->config_file('cleanup') ) { > my $fh = IO::File->new(">> $file") or die "Can't append to $file: > $!"; > print $fh "$_\n" foreach @need_to_write; > + } else { > + @{$self->{add_to_cleanup}}{@need_to_write} = (); > } > > @{$self->{cleanup}}{ @need_to_write } = (); > Index: t/runthrough.t > =================================================================== > RCS file: /cvsroot/module-build/Module-Build/t/runthrough.t,v > retrieving revision 1.14 > diff -u -r1.14 runthrough.t > --- t/runthrough.t 13 Apr 2003 12:37:04 -0000 1.14 > +++ t/runthrough.t 21 Apr 2003 19:26:04 -0000 > @@ -1,5 +1,5 @@ > use Test; > -BEGIN { plan tests => 13 } > +BEGIN { plan tests => 14 } > use Module::Build; > use File::Spec; > use File::Path; > @@ -23,8 +23,12 @@ > license => 'perl' ); > ok $build; > > +$build->add_to_cleanup('before_script'); > + > eval {$build->create_build_script}; > ok $@, ''; > + > +ok grep $_ eq 'before_script', keys %{$build->{cleanup}}; > > $build->add_to_cleanup('save_out'); > my $output = eval { > |
|
From: Dave R. <au...@ur...> - 2003-04-21 19:27:44
|
On Mon, 21 Apr 2003, Ken Williams wrote: > This is probably a bug, not something that should be documented. > add_to_cleanup() should work even if you're not using a Build script or > if it hasn't been created yet. Patch below sig. It's not the most beautiful test, but it does work. /*======================= House Absolute Consulting www.houseabsolute.com =======================*/ Index: lib/Module/Build/Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.92 diff -u -r1.92 Base.pm --- lib/Module/Build/Base.pm 19 Apr 2003 00:16:47 -0000 1.92 +++ lib/Module/Build/Base.pm 21 Apr 2003 19:26:04 -0000 @@ -292,12 +292,14 @@ sub add_to_cleanup { my $self = shift; - my @need_to_write = grep {!exists $self->{cleanup}{$_}} @_; + my @need_to_write = grep {!exists $self->{cleanup}{$_}} @_, keys %{$self->{add_to_cleanup}}; return unless @need_to_write; if ( my $file = $self->config_file('cleanup') ) { my $fh = IO::File->new(">> $file") or die "Can't append to $file: $!"; print $fh "$_\n" foreach @need_to_write; + } else { + @{$self->{add_to_cleanup}}{@need_to_write} = (); } @{$self->{cleanup}}{ @need_to_write } = (); Index: t/runthrough.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/runthrough.t,v retrieving revision 1.14 diff -u -r1.14 runthrough.t --- t/runthrough.t 13 Apr 2003 12:37:04 -0000 1.14 +++ t/runthrough.t 21 Apr 2003 19:26:04 -0000 @@ -1,5 +1,5 @@ use Test; -BEGIN { plan tests => 13 } +BEGIN { plan tests => 14 } use Module::Build; use File::Spec; use File::Path; @@ -23,8 +23,12 @@ license => 'perl' ); ok $build; +$build->add_to_cleanup('before_script'); + eval {$build->create_build_script}; ok $@, ''; + +ok grep $_ eq 'before_script', keys %{$build->{cleanup}}; $build->add_to_cleanup('save_out'); my $output = eval { |
|
From: Ken W. <ke...@ma...> - 2003-04-21 19:13:13
|
On Monday, April 21, 2003, at 01:34 PM, David Carmean wrote: > > What are people doing now for manification of POD and installation of > said manpages? Nothing yet. There's an item in the to-do list for it, and there's an action called 'manifypods' that gets started on implementing it, but it's not done yet. If you could contribute any time to implementing & testing it, it'd be welcome effort. -Ken |
|
From: Ken W. <ke...@ma...> - 2003-04-21 19:10:48
|
On Sunday, April 20, 2003, at 12:26 PM, Dave Rolsky wrote: > This was mystifying me for a little while. > > > --- Build.pm.~1.61.~ 2003-04-20 12:26:23.000000000 -0500 > +++ Build.pm 2003-04-20 12:27:05.000000000 -0500 > @@ -452,6 +452,9 @@ > responsibility for registering temporary files close to the code that > creates them. > > +This method will not do anything if it is called before the build > +script has been created with the C<create_build_script()> method. > + This is probably a bug, not something that should be documented. add_to_cleanup() should work even if you're not using a Build script or if it hasn't been created yet. -Ken |
|
From: David C. <dl...@ha...> - 2003-04-21 18:35:15
|
What are people doing now for manification of POD and installation of said manpages? |
|
From: Dave R. <au...@ur...> - 2003-04-20 17:27:58
|
This was mystifying me for a little while. --- Build.pm.~1.61.~ 2003-04-20 12:26:23.000000000 -0500 +++ Build.pm 2003-04-20 12:27:05.000000000 -0500 @@ -452,6 +452,9 @@ responsibility for registering temporary files close to the code that creates them. +This method will not do anything if it is called before the build +script has been created with the C<create_build_script()> method. + =item resume() You'll probably never call this method directly, it's only called from |
|
From: Teun B. <bu...@ec...> - 2003-04-16 08:08:35
|
Hello Ken,
Ken Williams wrote:
> If you manually change line 1030 in Base.pm from
>
> $self->run_perl_script('Build.PL') or die "Error executing 'Build.PL'
> in dist directory: $!";
>
> to something like
>
> $self->run_perl_script('Build.PL',
> ['-I/export/home/snuf3/aburgers/alpha/lib/perl5'])
> or die "Error executing 'Build.PL' in dist directory: $!";
>
> does it start working?
No...
see the attached p.txt for a diff -u patch for Base.pm against the snapshot.
I printed @INC just before the run_perl_script. At this point it still
contains /home/snuf3/aburgers/alpha/lib/perl5
Here is the result of the print STDERR "->@INC<-":
->/export/home3/aburgers/.cpan/build/Module-Build-0.18-snap-patch/blib/lib
blib/lib
blib/arch
lib
/home/snuf3/aburgers/alpha/lib/perl5/5.8.0/alpha-dec_osf
/home/snuf3/aburgers/alpha/lib/perl5/5.8.0/alpha-dec_osf
/home/snuf3/aburgers/alpha/lib/perl5/5.8.0
/home/snuf3/aburgers/alpha/lib/perl5/5.8.0/alpha-dec_osf
/home/snuf3/aburgers/alpha/lib/perl5/5.8.0
/home/snuf3/aburgers/alpha/lib/perl5
/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0/alpha-dec_osf /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0/alpha-dec_osf
/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0
/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.1/alpha-dec_osf
/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.1
/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.0/alpha-dec_osf
/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.0
/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0/alpha-dec_osf /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0 /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.1
/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.0
/home/snuf3/aburgers/alpha/lib/perl5/site_perl
.
/home/snuf3/aburgers/alpha/lib/perl5/5.8.0/alpha-dec_osf
/home/snuf3/aburgers/alpha/lib/perl5/5.8.0
/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0/alpha-dec_osf
/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0
/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.1
/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.0
/home/snuf3/aburgers/alpha/lib/perl5/site_perl
.<-
This is the @INC when B::Module::Info.pm can't be found:
Can't locate B/Module/Info.pm in @INC (@INC contains:
/export/home3/aburgers/.cpan/build/Module-Build-0.18-snap-patch/blib/lib
/home/snuf3/aburgers/alpha/lib/perl5/5.8.0/alpha-dec_osf
/home/snuf3/aburgers/alpha/lib/perl5/5.8.0
/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0/alpha-dec_osf
/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0
/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.1
/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.0
/home/snuf3/aburgers/alpha/lib/perl5/site_perl
Look like everything up to and including the first "." directory is stripped from @INC
somewhere in run_perl_script.
> I guess I should look at MakeMaker to see whether it handles this case
> either. My guess is that it doesn't - if you set @INC directories via
> -I or some other method-of-limited-scope when you run 'perl
> Makefile.PL',
This is how I invoked Makefile.PL:
perl -d Makefile.PL INSTALLARCHLIB=/home/snuf3/aburgers/alpha/lib/perl5 INSTALLPRIVLIB=/home/snuf3/aburgers/alpha/lib/perl5 INSTALLBIN=/home/snuf3/aburgers/alpha/bin
INSTALLSCRIPT=/home/snuf3/aburgers/alpha/bin INSTALLSITELIB=/home/snuf3/aburgers/alpha/lib/perl5 INSTALLMAN1DIR=/home/snuf3/aburgers/alpha/man/man1 INSTALLMAN3DIR=/home/snuf3/aburgers/alpha/man/man3
INSTALLSITEARCH=/home/snuf3/aburgers/alpha/lib/perl5 INSTALLSITELIB=/home/snuf3/aburgers/alpha/lib/perl5
> then you may get errors later in the process when @INC isn't propagated.
I've never run into problems with @INC using this approach.
Teun
--
Drs A.R. Burgers Energy research Centre of the Netherlands
Phone: +31-224-564959 P.O. Box 1
Fax : +31-224-568214 NL-1755 ZG Petten
email: bu...@ec... The Netherlands |
|
From: Ken W. <ke...@ma...> - 2003-04-15 19:07:10
|
On Tuesday, April 15, 2003, at 09:24 AM, Mark Stosberg wrote: > > I've just been reading about Module::Build and it seems like a great > solution. As a module author myself, I'm ready to try it out. As a > first > step, I tried installing the "Thesaurus.pm" module onto my home Linux > machine. > > The process eventually failed because of the dependency on > BerkeleyDB.pm, which depended on the C-based Berkelely DB libraries to > be installed, which weren't found. > > The README for the module documents a number of known failures, and > their solutions. > > I like the idea that Module::Build is trying to be a more "pure perl" > solution, and I see this dependency as a stumbling block. I, for one, > am > not going to switch a module on CPAN to use it, knowing that the > installation may fail in a way that a user may not be able to figure > out > how to address. > > I would prefer that Module::Build be able to use some other "pure perl" > back-end to avoid this. This also seems to be in line with the goals of > the module. > > I understand that the C-based Berkeley DB is probably faster, but I > don't think about module installation as an operation that needs to be > optimized for speed...especially for a forward looking project like > this > one. Hi Mark, Module::Build doesn't depend on Berlekey DB, so this must be a prerequisite for Thesaurus.pm . I've tried to keep the list of required prerequisites for Module::Build to only include things that are present in perl 5.6.0's core distribution. -Ken |
|
From: Ken W. <ke...@ma...> - 2003-04-15 14:48:25
|
Hi Teun,
Okay, I know I said this last time too, but I think I know what's
causing this. The ACTION_disttest() routine runs a 'perl Build.PL' in
an external process, which resets @INC.
I guess a solution for this would be to add a bunch of -Ifoo/ arguments
to the command. Preferably we would only add the directories that are
necessary, but I'm not exactly sure how we can tell the difference at
that point.
If you manually change line 1030 in Base.pm from
$self->run_perl_script('Build.PL') or die "Error executing 'Build.PL'
in dist directory: $!";
to something like
$self->run_perl_script('Build.PL',
['-I/export/home/snuf3/aburgers/alpha/lib/perl5'])
or die "Error executing 'Build.PL' in dist directory: $!";
does it start working?
I guess I should look at MakeMaker to see whether it handles this case
either. My guess is that it doesn't - if you set @INC directories via
-I or some other method-of-limited-scope when you run 'perl
Makefile.PL', then you may get errors later in the process when @INC
isn't propagated.
-Ken
> From: Teun Burgers <bu...@ec...>
> Date: Tue Apr 15, 2003 8:27:26 AM US/Central
> To: Ken Williams <ke...@ma...>
> Subject: Re: [Module-build-general] Module::Build 0.18 @INC problem
>
> Ken Williams wrote:
>>
>> On Tuesday, April 15, 2003, at 02:49 AM, Teun Burgers wrote:
>>
>>> Ken Williams wrote:
>>>
>>>> It would be helpful if you could try the current CVS code and verify
>>>> that it works.
>>>
>>> my company's firewall does not allow CVS access.
>>> Can you mail me a snapshot?
>>
>> Ok, you can download a snapshot at
>>
>> http://www.campstaff.com/~ken/Module-Build-snap.tar.gz
>
> Thanks for the snapshot.
>
> I tried your snapshot and it has the same problem unfortunately.
> The /export/home/snuf3/aburgers/alpha/lib/perl5 is present in @INC in
> Build,
> but not during testing (see tst.log).
>
> These are the timestamps of the .pm files:
>
> ls -l `find lib/Module -name '*.pm'`
> -rw-r----- 1 aburgers DE_zon 39772 Apr 12 05:30
> lib/Module/Build.pm
> -rw-r----- 1 aburgers DE_zon 38133 Apr 14 17:30
> lib/Module/Build/Base.pm
> -rw-r----- 1 aburgers DE_zon 6342 Mar 29 21:23
> lib/Module/Build/Compat.pm
> -rw-r----- 1 aburgers DE_zon 497 Nov 11 2001
> lib/Module/Build/Platform/Amiga.pm
> -rw-r----- 1 aburgers DE_zon 499 Aug 6 2001
> lib/Module/Build/Platform/Default.pm
> -rw-r----- 1 aburgers DE_zon 500 Nov 11 2001
> lib/Module/Build/Platform/EBCDIC.pm
> -rw-r----- 1 aburgers DE_zon 497 Nov 11 2001
> lib/Module/Build/Platform/MPEiX.pm
> -rw-r----- 1 aburgers DE_zon 3430 Dec 1 10:12
> lib/Module/Build/Platform/MacOS.pm
> -rw-r----- 1 aburgers DE_zon 500 Nov 11 2001
> lib/Module/Build/Platform/RiscOS.pm
> -rw-r----- 1 aburgers DE_zon 789 Jun 9 2002
> lib/Module/Build/Platform/Unix.pm
> -rw-r----- 1 aburgers DE_zon 1277 Mar 31 04:17
> lib/Module/Build/Platform/VMS.pm
> -rw-r----- 1 aburgers DE_zon 491 Nov 11 2001
> lib/Module/Build/Platform/VOS.pm
> -rw-r----- 1 aburgers DE_zon 18695 Mar 11 17:19
> lib/Module/Build/Platform/Windows.pm
> -rw-r----- 1 aburgers DE_zon 1030 Mar 8 2002
> lib/Module/Build/Platform/darwin.pm
>
>
> Teun
>
> -- Drs A.R. Burgers Energy research Centre of the Netherlands
> Phone: +31-224-564959 P.O. Box 1
> Fax : +31-224-568214 NL-1755 ZG Petten
> email: bu...@ec... The
> Netherlands#!/home/snuf3/aburgers/alpha/bin/perl
>
> BEGIN {
> $^W = 1; # Use warnings
> my $start_dir =
> '/export/home3/aburgers/.cpan/build/Module-Build-0.18-snap';
> chdir($start_dir) or die "Cannot chdir to $start_dir: $!";
> @INC = ('lib',
> '/home/snuf3/aburgers/alpha/lib/perl5/5.8.0/alpha-dec_osf',
> '/home/snuf3/aburgers/alpha/lib/perl5/5.8.0',
> '/home/snuf3/aburgers/alpha/lib/perl5',
> '/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0/alpha-dec_osf',
> '/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0',
> '/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.1',
> '/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.0',
> '/home/snuf3/aburgers/alpha/lib/perl5/site_perl', '.');
> }
>
> use Module::Build;
>
> # This should have just enough arguments to be able to bootstrap the
> rest.
> my $build = resume Module::Build (
> properties => {
> config_dir => '_build',
> build_script => 'Build',
> },
> );
>
> $build->dispatch;
> perl ./Build test
> t/basic.........ok
> t/runthrough....B::Module::Info,packages use failed with 2 saying:
> Can't locate B/Module/Info.pm in @INC (@INC contains:
> /export/home3/aburgers/.cpan/build/Module-Build-0.18-snap/blib/lib
> /home/snuf3/aburgers/alpha/lib/perl5/5.8.0/alpha-dec_osf
> /home/snuf3/aburgers/alpha/lib/perl5/5.8.0
> /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0/alpha-dec_osf
> /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0
> /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.1
> /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.0
> /home/snuf3/aburgers/alpha/lib/perl5/site_perl .) at (eval 1) line 18.
>
> BEGIN failed--compilation aborted at (eval 1) line 18.
>
> BEGIN failed--compilation aborted.
> Can't locate Data/Dumper.pm in @INC (@INC contains:
> /export/home3/aburgers/.cpan/build/Module-Build-0.18-snap/blib/lib
> /home/snuf3/aburgers/alpha/lib/perl5/5.8.0/alpha-dec_osf
> /home/snuf3/aburgers/alpha/lib/perl5/5.8.0
> /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0/alpha-dec_osf
> /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0
> /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.1
> /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.0
> /home/snuf3/aburgers/alpha/lib/perl5/site_perl .) at
> /export/home3/aburgers/.cpan/build/Module-Build-0.18-snap/blib/lib/
> Module/Build/Base.pm line 14.
> BEGIN failed--compilation aborted at
> /export/home3/aburgers/.cpan/build/Module-Build-0.18-snap/blib/lib/
> Module/Build/Base.pm line 14.
> Compilation failed in require at
> /export/home3/aburgers/.cpan/build/Module-Build-0.18-snap/blib/lib/
> Module/Build/Platform/Unix.pm line 4.
> BEGIN failed--compilation aborted at
> /export/home3/aburgers/.cpan/build/Module-Build-0.18-snap/blib/lib/
> Module/Build/Platform/Unix.pm line 4.
> Compilation failed in require at (eval 1) line 2.
> BEGIN failed--compilation aborted at (eval 1) line 2.
> Compilation failed in require at Build.PL line 1.
> BEGIN failed--compilation aborted at Build.PL line 1.
> # Test 5 got: 'Error executing 'Build.PL' in dist directory: No such
> file or directory at blib/lib/Module/Build/Base.pm line 1026.
> ' (t/runthrough.t at line 44)
> # Expected: ''
> # Failed test 6 in t/runthrough.t at line 47
> B::Module::Info,packages use failed with 2 saying:
> Can't locate B/Module/Info.pm in @INC (@INC contains:
> /export/home3/aburgers/.cpan/build/Module-Build-0.18-snap/blib/lib
> /home/snuf3/aburgers/alpha/lib/perl5/5.8.0/alpha-dec_osf
> /home/snuf3/aburgers/alpha/lib/perl5/5.8.0
> /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0/alpha-dec_osf
> /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0
> /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.1
> /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.0
> /home/snuf3/aburgers/alpha/lib/perl5/site_perl .) at (eval 1) line 18.
>
> BEGIN failed--compilation aborted at (eval 1) line 18.
>
> BEGIN failed--compilation aborted.
> # Failed test 11 in t/runthrough.t at line 84
> FAILED tests 5-6, 11
> Failed 3/13 tests, 76.92% okay
> t/xs............ld:
> Warning: Unresolved:
> Perl_croak
> Perl_mg_set
> Perl_newXS
> Perl_sv_2iv
> Perl_sv_newmortal
> Perl_sv_setiv
> PL_sv_yes
> PL_stack_sp
> PL_op
> PL_curpad
> PL_stack_base
> PL_markstack_ptr
> __exc_add_pc_range_table
> __exc_add_gp_range
> __exc_remove_pc_range_table
> __exc_remove_gp_range
> ok
> Failed 1/3 test scripts, 66.67% okay. 3/35 subtests failed, 91.43%
> okay.
> Failed Test Stat Wstat Total Fail Failed List of Failed
> -----------------------------------------------------------------------
> --------
> t/runthrough.t 13 3 23.08% 5-6 11
> make: *** [test] Error 25
>
|
|
From: Dave R. <au...@ur...> - 2003-04-15 14:39:24
|
On Tue, 15 Apr 2003, Mark Stosberg wrote: > I've just been reading about Module::Build and it seems like a great > solution. As a module author myself, I'm ready to try it out. As a first > step, I tried installing the "Thesaurus.pm" module onto my home Linux > machine. > > The process eventually failed because of the dependency on > BerkeleyDB.pm, which depended on the C-based Berkelely DB libraries to > be installed, which weren't found. The dependency in question here is for Thesaurus, not Module::Build. M::B itself does not use BerkeleyDB. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/ |
|
From: Mark S. <ma...@su...> - 2003-04-15 14:25:24
|
Hello, I've just been reading about Module::Build and it seems like a great solution. As a module author myself, I'm ready to try it out. As a first step, I tried installing the "Thesaurus.pm" module onto my home Linux machine. The process eventually failed because of the dependency on BerkeleyDB.pm, which depended on the C-based Berkelely DB libraries to be installed, which weren't found. The README for the module documents a number of known failures, and their solutions. I like the idea that Module::Build is trying to be a more "pure perl" solution, and I see this dependency as a stumbling block. I, for one, am not going to switch a module on CPAN to use it, knowing that the installation may fail in a way that a user may not be able to figure out how to address. I would prefer that Module::Build be able to use some other "pure perl" back-end to avoid this. This also seems to be in line with the goals of the module. I understand that the C-based Berkeley DB is probably faster, but I don't think about module installation as an operation that needs to be optimized for speed...especially for a forward looking project like this one. Regards, Mark -- . . . . . . . . . . . . . . . . . . . . . . . . . . . Mark Stosberg Principal Developer ma...@su... Summersault, LLC 765-939-9301 ext 202 database driven websites . . . . . http://www.summersault.com/ . . . . . . . . |
|
From: Ken W. <ke...@ma...> - 2003-04-15 14:12:46
|
Begin forwarded message: > From: Teun Burgers <bu...@ec...> > Date: Tue Apr 15, 2003 8:27:26 AM US/Central > To: Ken Williams <ke...@ma...> > Subject: Re: [Module-build-general] Module::Build 0.18 @INC problem > > Ken Williams wrote: >> >> On Tuesday, April 15, 2003, at 02:49 AM, Teun Burgers wrote: >> >>> Ken Williams wrote: >>> >>>> It would be helpful if you could try the current CVS code and verify >>>> that it works. >>> >>> my company's firewall does not allow CVS access. >>> Can you mail me a snapshot? >> >> Ok, you can download a snapshot at >> >> http://www.campstaff.com/~ken/Module-Build-snap.tar.gz > > Thanks for the snapshot. > > I tried your snapshot and it has the same problem unfortunately. > The /export/home/snuf3/aburgers/alpha/lib/perl5 is present in @INC in > Build, > but not during testing (see tst.log). > > These are the timestamps of the .pm files: > > ls -l `find lib/Module -name '*.pm'` > -rw-r----- 1 aburgers DE_zon 39772 Apr 12 05:30 > lib/Module/Build.pm > -rw-r----- 1 aburgers DE_zon 38133 Apr 14 17:30 > lib/Module/Build/Base.pm > -rw-r----- 1 aburgers DE_zon 6342 Mar 29 21:23 > lib/Module/Build/Compat.pm > -rw-r----- 1 aburgers DE_zon 497 Nov 11 2001 > lib/Module/Build/Platform/Amiga.pm > -rw-r----- 1 aburgers DE_zon 499 Aug 6 2001 > lib/Module/Build/Platform/Default.pm > -rw-r----- 1 aburgers DE_zon 500 Nov 11 2001 > lib/Module/Build/Platform/EBCDIC.pm > -rw-r----- 1 aburgers DE_zon 497 Nov 11 2001 > lib/Module/Build/Platform/MPEiX.pm > -rw-r----- 1 aburgers DE_zon 3430 Dec 1 10:12 > lib/Module/Build/Platform/MacOS.pm > -rw-r----- 1 aburgers DE_zon 500 Nov 11 2001 > lib/Module/Build/Platform/RiscOS.pm > -rw-r----- 1 aburgers DE_zon 789 Jun 9 2002 > lib/Module/Build/Platform/Unix.pm > -rw-r----- 1 aburgers DE_zon 1277 Mar 31 04:17 > lib/Module/Build/Platform/VMS.pm > -rw-r----- 1 aburgers DE_zon 491 Nov 11 2001 > lib/Module/Build/Platform/VOS.pm > -rw-r----- 1 aburgers DE_zon 18695 Mar 11 17:19 > lib/Module/Build/Platform/Windows.pm > -rw-r----- 1 aburgers DE_zon 1030 Mar 8 2002 > lib/Module/Build/Platform/darwin.pm > > > Teun > > -- > Drs A.R. Burgers Energy research Centre of the Netherlands > Phone: +31-224-564959 P.O. Box 1 > Fax : +31-224-568214 NL-1755 ZG Petten > email: bu...@ec... The > Netherlands#!/home/snuf3/aburgers/alpha/bin/perl > > BEGIN { > $^W = 1; # Use warnings > my $start_dir = > '/export/home3/aburgers/.cpan/build/Module-Build-0.18-snap'; > chdir($start_dir) or die "Cannot chdir to $start_dir: $!"; > @INC = ('lib', > '/home/snuf3/aburgers/alpha/lib/perl5/5.8.0/alpha-dec_osf', > '/home/snuf3/aburgers/alpha/lib/perl5/5.8.0', > '/home/snuf3/aburgers/alpha/lib/perl5', > '/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0/alpha-dec_osf', > '/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0', > '/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.1', > '/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.0', > '/home/snuf3/aburgers/alpha/lib/perl5/site_perl', '.'); > } > > use Module::Build; > > # This should have just enough arguments to be able to bootstrap the > rest. > my $build = resume Module::Build ( > properties => { > config_dir => '_build', > build_script => 'Build', > }, > ); > > $build->dispatch; > perl ./Build test > t/basic.........ok > t/runthrough....B::Module::Info,packages use failed with 2 saying: > Can't locate B/Module/Info.pm in @INC (@INC contains: > /export/home3/aburgers/.cpan/build/Module-Build-0.18-snap/blib/lib > /home/snuf3/aburgers/alpha/lib/perl5/5.8.0/alpha-dec_osf > /home/snuf3/aburgers/alpha/lib/perl5/5.8.0 > /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0/alpha-dec_osf > /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0 > /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.1 > /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.0 > /home/snuf3/aburgers/alpha/lib/perl5/site_perl .) at (eval 1) line 18. > > BEGIN failed--compilation aborted at (eval 1) line 18. > > BEGIN failed--compilation aborted. > Can't locate Data/Dumper.pm in @INC (@INC contains: > /export/home3/aburgers/.cpan/build/Module-Build-0.18-snap/blib/lib > /home/snuf3/aburgers/alpha/lib/perl5/5.8.0/alpha-dec_osf > /home/snuf3/aburgers/alpha/lib/perl5/5.8.0 > /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0/alpha-dec_osf > /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0 > /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.1 > /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.0 > /home/snuf3/aburgers/alpha/lib/perl5/site_perl .) at > /export/home3/aburgers/.cpan/build/Module-Build-0.18-snap/blib/lib/ > Module/Build/Base.pm line 14. > BEGIN failed--compilation aborted at > /export/home3/aburgers/.cpan/build/Module-Build-0.18-snap/blib/lib/ > Module/Build/Base.pm line 14. > Compilation failed in require at > /export/home3/aburgers/.cpan/build/Module-Build-0.18-snap/blib/lib/ > Module/Build/Platform/Unix.pm line 4. > BEGIN failed--compilation aborted at > /export/home3/aburgers/.cpan/build/Module-Build-0.18-snap/blib/lib/ > Module/Build/Platform/Unix.pm line 4. > Compilation failed in require at (eval 1) line 2. > BEGIN failed--compilation aborted at (eval 1) line 2. > Compilation failed in require at Build.PL line 1. > BEGIN failed--compilation aborted at Build.PL line 1. > # Test 5 got: 'Error executing 'Build.PL' in dist directory: No such > file or directory at blib/lib/Module/Build/Base.pm line 1026. > ' (t/runthrough.t at line 44) > # Expected: '' > # Failed test 6 in t/runthrough.t at line 47 > B::Module::Info,packages use failed with 2 saying: > Can't locate B/Module/Info.pm in @INC (@INC contains: > /export/home3/aburgers/.cpan/build/Module-Build-0.18-snap/blib/lib > /home/snuf3/aburgers/alpha/lib/perl5/5.8.0/alpha-dec_osf > /home/snuf3/aburgers/alpha/lib/perl5/5.8.0 > /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0/alpha-dec_osf > /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0 > /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.1 > /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.0 > /home/snuf3/aburgers/alpha/lib/perl5/site_perl .) at (eval 1) line 18. > > BEGIN failed--compilation aborted at (eval 1) line 18. > > BEGIN failed--compilation aborted. > # Failed test 11 in t/runthrough.t at line 84 > FAILED tests 5-6, 11 > Failed 3/13 tests, 76.92% okay > t/xs............ld: > Warning: Unresolved: > Perl_croak > Perl_mg_set > Perl_newXS > Perl_sv_2iv > Perl_sv_newmortal > Perl_sv_setiv > PL_sv_yes > PL_stack_sp > PL_op > PL_curpad > PL_stack_base > PL_markstack_ptr > __exc_add_pc_range_table > __exc_add_gp_range > __exc_remove_pc_range_table > __exc_remove_gp_range > ok > Failed 1/3 test scripts, 66.67% okay. 3/35 subtests failed, 91.43% > okay. > Failed Test Stat Wstat Total Fail Failed List of Failed > ----------------------------------------------------------------------- > -------- > t/runthrough.t 13 3 23.08% 5-6 11 > make: *** [test] Error 25 > -Ken |
|
From: Ken W. <ke...@ma...> - 2003-04-14 15:33:47
|
Hi Teun, I think this is already fixed in CVS. Version 0.18 had to load each .pm file to look for $VERSION variables in them (Module::Info did the real work here, and I think that's where @INC was getting dropped), whereas the current CVS code will just call an internal version_from_file() method to find the first $VERSION in the file, like MakeMaker and PAUSE and search.cpan.org do. It would be helpful if you could try the current CVS code and verify that it works. Thanks. -Ken On Monday, April 14, 2003, at 07:23 AM, Teun Burgers wrote: > Hello > > When I type: > > perl Build test > > it can't find B::Module::Info. > Here is the result of the find command: > >> find ~/alpha/lib/perl5 -name Info.pm > /home/snuf3/aburgers/alpha/lib/perl5/MP3/Info.pm > /home/snuf3/aburgers/alpha/lib/perl5/B/Module/Info.pm > /home/snuf3/aburgers/alpha/lib/perl5/Module/Info.pm > > The attached Build script does have > /home/snuf3/aburgers/alpha/lib/perl5 > in the @INC array. > > However looking at the test results, it appears > /home/snuf3/aburgers/alpha/lib/perl5 > gets stripped from @INC during testing. > > t/basic.........ok > t/runthrough....B::Module::Info,packages use failed with 2 saying: > Can't locate B/Module/Info.pm in @INC (@INC contains: > /export/home3/aburgers/.cpan/build/Module-Build-0.18/blib/lib > /home/snuf3/aburgers/alpha/lib/perl5/5.8.0/alpha-dec_osf > /home/snuf3/aburgers/alpha/lib/perl5/5.8.0 > /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0/alpha-dec_osf > /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0 > /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.1 > /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.0 > /home/snuf3/aburgers/alpha/lib/perl5/site_perl .) at (eval 1) line 18. > > Why and where does this path element get stripped? > > regards, > > Teun Burgers#!/home/snuf3/aburgers/alpha/bin/perl > > BEGIN { > $^W = 1; # Use warnings > chdir('/export/home3/aburgers/.cpan/build/Module-Build-0.18') or die > 'Cannot chdir to /export/home3/aburgers/.cpan/build/Module-Build-0.18: > '.$!; > @INC = ('lib', > '/home/snuf3/aburgers/alpha/lib/perl5/5.8.0/alpha-dec_osf', > '/home/snuf3/aburgers/alpha/lib/perl5/5.8.0', > '/home/snuf3/aburgers/alpha/lib/perl5', > '/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0/alpha-dec_osf', > '/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0', > '/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.1', > '/home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.0', > '/home/snuf3/aburgers/alpha/lib/perl5/site_perl', '.'); > } > > use Module::Build; > > # This should have just enough arguments to be able to bootstrap the > rest. > my $build = resume Module::Build ( > properties => { > config_dir => '_build', > build_script => 'Build', > }, > ); > > $build->dispatch; > |
|
From: Teun B. <bu...@ec...> - 2003-04-14 12:26:21
|
Hello When I type: perl Build test it can't find B::Module::Info. Here is the result of the find command: > find ~/alpha/lib/perl5 -name Info.pm /home/snuf3/aburgers/alpha/lib/perl5/MP3/Info.pm /home/snuf3/aburgers/alpha/lib/perl5/B/Module/Info.pm /home/snuf3/aburgers/alpha/lib/perl5/Module/Info.pm The attached Build script does have /home/snuf3/aburgers/alpha/lib/perl5 in the @INC array. However looking at the test results, it appears /home/snuf3/aburgers/alpha/lib/perl5 gets stripped from @INC during testing. t/basic.........ok t/runthrough....B::Module::Info,packages use failed with 2 saying: Can't locate B/Module/Info.pm in @INC (@INC contains: /export/home3/aburgers/.cpan/build/Module-Build-0.18/blib/lib /home/snuf3/aburgers/alpha/lib/perl5/5.8.0/alpha-dec_osf /home/snuf3/aburgers/alpha/lib/perl5/5.8.0 /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0/alpha-dec_osf /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.8.0 /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.1 /home/snuf3/aburgers/alpha/lib/perl5/site_perl/5.6.0 /home/snuf3/aburgers/alpha/lib/perl5/site_perl .) at (eval 1) line 18. Why and where does this path element get stripped? regards, Teun Burgers |