module-build-checkins Mailing List for Module::Build (Page 8)
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...> - 2006-01-30 23:14:34
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6089 Modified Files: Changes Log Message: Make notes(key, val) return the new value Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.414 retrieving revision 1.415 diff -u -d -r1.414 -r1.415 --- Changes 24 Jan 2006 03:45:08 -0000 1.414 +++ Changes 30 Jan 2006 23:14:23 -0000 1.415 @@ -1,5 +1,11 @@ Revision history for Perl extension Module::Build. +0.27_07 + + - The notes() method now returns the new value when called with two + arguments, just like when it's called with one argument. [Tyler + MacDonald] + 0.27_06 Mon Jan 23 21:44:54 CST 2006 - Fixed an undefined-variable warning when building the META.yml file |
From: Ken W. <kwi...@us...> - 2006-01-30 23:14:34
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6089/lib/Module/Build Modified Files: Authoring.pod Notes.pm Log Message: Make notes(key, val) return the new value Index: Authoring.pod =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Authoring.pod,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- Authoring.pod 22 Jan 2006 02:30:44 -0000 1.29 +++ Authoring.pod 30 Jan 2006 23:14:25 -0000 1.30 @@ -1079,7 +1079,7 @@ arguments, C<notes()> returns the entire hash of notes. With one argument, C<notes($key)> returns the value associated with the given key. With two arguments, C<notes($key, $value)> sets the value associated with the given key -to C<$value>. +to C<$value> and returns the new value. The lifetime of the C<notes> data is for "a build" - that is, the C<notes> hash is created when C<perl Build.PL> is run (or when the Index: Notes.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Notes.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Notes.pm 4 Dec 2005 07:41:39 -0000 1.10 +++ Notes.pm 30 Jan 2006 23:14:25 -0000 1.11 @@ -36,7 +36,8 @@ return $self->read($key) unless @_; my $value = shift; - return $self->write({ $key => $value }); + $self->write({ $key => $value }); + return $self->read($key); } sub has_data { |
From: Ken W. <kwi...@us...> - 2006-01-27 03:12:34
|
Update of /cvsroot/module-build/Module-Build/t/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8096/t/lib Modified Files: DistGen.pm Log Message: Simplify the clean() method Index: DistGen.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/lib/DistGen.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- DistGen.pm 4 Dec 2005 08:48:09 -0000 1.15 +++ DistGen.pm 27 Jan 2006 03:12:25 -0000 1.16 @@ -284,31 +284,22 @@ my $filename = $self->_real_filename( $file ); my $dirname = File::Basename::dirname( $filename ); - $names{files}{$filename} = 0; + $names{$filename} = 0; my @dirs = File::Spec->splitdir( $dirname ); while ( @dirs ) { my $dir = File::Spec->catdir( @dirs ); - $names{dirs}{$dir} = 0; + $names{$dir} = 0; pop( @dirs ); } } File::Find::finddepth( sub { - my $dir = File::Spec->canonpath( $File::Find::dir ); my $name = File::Spec->canonpath( $File::Find::name ); - if ( -d && not exists $names{dirs}{$name} ) { - print "Removing directory '$name'\n" if $VERBOSE; + if ( not exists $names{$name} ) { + print "Removing '$name'\n" if $VERBOSE; File::Path::rmtree( $_ ); - return; - } elsif ( -d ) { - return; - } elsif ( exists $names{files}{$name} ) { - #print "Leaving file '$name'\n" if $VERBOSE; - } else { - print "Unlinking file '$name'\n" if $VERBOSE; - 1 while unlink( $_ ); } }, File::Spec->curdir ); |
From: Ken W. <kwi...@us...> - 2006-01-24 03:45:21
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16811 Modified Files: Changes Log Message: Version bump Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.413 retrieving revision 1.414 diff -u -d -r1.413 -r1.414 --- Changes 24 Jan 2006 01:23:35 -0000 1.413 +++ Changes 24 Jan 2006 03:45:08 -0000 1.414 @@ -1,6 +1,6 @@ Revision history for Perl extension Module::Build. -0.27_06 +0.27_06 Mon Jan 23 21:44:54 CST 2006 - Fixed an undefined-variable warning when building the META.yml file and the author hasn't used the 'module_name' mechanism. [Chris Dolan] |
From: Ken W. <kwi...@us...> - 2006-01-24 03:45:21
|
Update of /cvsroot/module-build/Module-Build/lib/Module In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16811/lib/Module Modified Files: Build.pm Log Message: Version bump Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build.pm,v retrieving revision 1.207 retrieving revision 1.208 diff -u -d -r1.207 -r1.208 --- Build.pm 12 Jan 2006 23:41:45 -0000 1.207 +++ Build.pm 24 Jan 2006 03:45:08 -0000 1.208 @@ -15,7 +15,7 @@ use vars qw($VERSION @ISA); @ISA = qw(Module::Build::Base); -$VERSION = '0.27_05'; +$VERSION = '0.27_06'; $VERSION = eval $VERSION; # Okay, this is the brute-force method of finding out what kind of |
From: Ken W. <kwi...@us...> - 2006-01-24 01:23:44
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5877 Modified Files: Changes Log Message: Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.412 retrieving revision 1.413 diff -u -d -r1.412 -r1.413 --- Changes 23 Jan 2006 13:27:42 -0000 1.412 +++ Changes 24 Jan 2006 01:23:35 -0000 1.413 @@ -8,7 +8,8 @@ - We should now work with recent (> 0.49) versions of YAML.pm when creating the META.yml file. [Yitzchak Scott-Thoennes] - - The prompt() and y_n() methods have been improved with respect to + - The y_n() method now requires the default parameter, and the + prompt() and y_n() methods have been improved with respect to how they behave/detect when there is no user to ask. We're now more consistent with MakeMaker, including respecting the PERL_MM_USE_DEFAULT environment variable. [Tyler MacDonald and |
From: Ken W. <kwi...@us...> - 2006-01-23 13:27:51
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30673/lib/Module/Build Modified Files: Base.pm Log Message: Work around a Pod::Text 3.01 bug Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.543 retrieving revision 1.544 diff -u -d -r1.543 -r1.544 --- Base.pm 23 Jan 2006 01:31:07 -0000 1.543 +++ Base.pm 23 Jan 2006 13:27:43 -0000 1.544 @@ -2702,7 +2702,24 @@ my $fh = IO::File->new('> README'); if ( defined($fh) ) { local $^W = 0; + no strict "refs"; + + # work around bug in Pod::Text 3.01, which expects + # Pod::Simple::parse_file to take input and output filehandles + # when it actually only takes an input filehandle + + my $old_parse_file; + $old_parse_file = \&{"Pod::Simple::parse_file"} + and + local *{"Pod::Simple::parse_file"} = sub { + my $self = shift; + $self->output_fh($_[1]) if $_[1]; + $self->$old_parse_file($_[0]); + } + if $Pod::Text::VERSION == 3.01; + Pod::Text::pod2text( $docfile, $fh ); + $fh->close; } else { $self->log_warn( @@ -2713,7 +2730,6 @@ } else { $self->log_warn("Can't load Pod::Readme or Pod::Text to create README\n"); return; - } $self->_add_to_manifest('MANIFEST', 'README'); |
From: Ken W. <kwi...@us...> - 2006-01-23 13:27:51
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30673 Modified Files: Changes Log Message: Work around a Pod::Text 3.01 bug Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.411 retrieving revision 1.412 diff -u -d -r1.411 -r1.412 --- Changes 22 Jan 2006 02:30:44 -0000 1.411 +++ Changes 23 Jan 2006 13:27:42 -0000 1.412 @@ -14,6 +14,11 @@ PERL_MM_USE_DEFAULT environment variable. [Tyler MacDonald and Yitzchak Scott-Thoennes] + - When building a README file using Pod::Text, work around a bug in + Pod::Text 3.01, which expects Pod::Simple::parse_file to take input + and output filehandles when it actually only takes an input + filehandle. [Yitzchak Scott-Thoennes] + 0.27_05 Thu Jan 12 17:39:21 CST 2006 - In t/common.pl, we were attempting to let the user's installed |
From: Ken W. <kwi...@us...> - 2006-01-23 01:31:24
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27427/lib/Module/Build Modified Files: Base.pm Log Message: Improve the way we react when the user renames/moves the build directory, or executes the Build script from elsewhere. We now remember a "magic number" that we write to a file in _build/ , and if that number is present, we don't need to check whether the cwd() matches what it used to be. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.542 retrieving revision 1.543 diff -u -d -r1.542 -r1.543 --- Base.pm 22 Jan 2006 02:30:44 -0000 1.542 +++ Base.pm 23 Jan 2006 01:31:07 -0000 1.543 @@ -657,6 +657,7 @@ install_base libdoc_dirs license + magic_number mb_version module_name orig_dir @@ -861,13 +862,13 @@ return scalar grep $self->{phash}{$_}->has_data(), qw(config_data features auto_features); } -sub _write_dumper { +sub _write_data { my ($self, $filename, $data) = @_; my $file = $self->config_file($filename); my $fh = IO::File->new("> $file") or die "Can't create '$file': $!"; local $Data::Dumper::Terse = 1; - print $fh Data::Dumper::Dumper($data); + print $fh ref($data) ? Data::Dumper::Dumper($data) : $data; } sub write_config { @@ -877,8 +878,11 @@ -d $self->{properties}{config_dir} or die "Can't mkdir $self->{properties}{config_dir}: $!"; my @items = @{ $self->prereq_action_types }; - $self->_write_dumper('prereqs', { map { $_, $self->$_() } @items }); - $self->_write_dumper('build_params', [$self->{args}, $self->{config}, $self->{properties}]); + $self->_write_data('prereqs', { map { $_, $self->$_() } @items }); + $self->_write_data('build_params', [$self->{args}, $self->{config}, $self->{properties}]); + + # Set a new magic number and write it to a file + $self->_write_data('magicnum', $self->magic_number(int rand 1_000_000)); $self->{phash}{$_}->write() foreach qw(notes cleanup features auto_features config_data runtime_params); } @@ -1164,15 +1168,17 @@ my $case_tolerant = 0+(File::Spec->can('case_tolerant') && File::Spec->case_tolerant); $q{base_dir} = uc $q{base_dir} if $case_tolerant; + $q{magic_numfile} = $self->config_file('magicnum'); my @myINC = $self->_added_to_INC; for (@myINC, values %q) { - $_ = File::Spec->canonpath( File::Spec->rel2abs($_) ); + $_ = File::Spec->canonpath( $_ ); s/([\\\'])/\\$1/g; } my $quoted_INC = join ",\n", map " '$_'", @myINC; my $shebang = $self->_startperl; + my $magic_number = $self->magic_number; print $fh <<EOF; $shebang @@ -1182,6 +1188,15 @@ use File::Basename; use File::Spec; +sub magic_number_matches { + return 0 unless -e '$q{magic_numfile}'; + local *FH; + open FH, '$q{magic_numfile}' or return 0; + my \$filenum = <FH>; + close FH; + return \$filenum == $magic_number; +} + my \$progname; my \$orig_dir; BEGIN { @@ -1189,8 +1204,13 @@ \$progname = basename(\$0); \$orig_dir = Cwd::cwd(); my \$base_dir = '$q{base_dir}'; - unless (chdir(\$base_dir)) { - die ("Couldn't chdir(\$base_dir), aborting\\n"); + if (!magic_number_matches()) { + unless (chdir(\$base_dir)) { + die ("Couldn't chdir(\$base_dir), aborting\\n"); + } + unless (magic_number_matches()) { + die ("Configuration seems to be out of date, please re-run 'perl Build.PL' again.\\n"); + } } unshift \@INC, ( |
From: Ken W. <kwi...@us...> - 2006-01-22 02:30:53
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32324/lib/Module/Build Modified Files: Authoring.pod Base.pm Log Message: Improve the behavior of prompt() and y_n() when there's no user Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.541 retrieving revision 1.542 diff -u -d -r1.541 -r1.542 --- Base.pm 20 Jan 2006 14:29:14 -0000 1.541 +++ Base.pm 22 Jan 2006 02:30:44 -0000 1.542 @@ -358,7 +358,8 @@ print "$mess $dispdef"; } my $ans; - if ($self->_is_interactive) { + if ( ! $ENV{PERL_MM_USE_DEFAULT} && + ( $self->_is_interactive || ! eof STDIN ) ) { $ans = <STDIN>; if ( defined $ans ) { chomp $ans; @@ -378,6 +379,7 @@ sub y_n { my $self = shift; die "y_n() called without a prompt message" unless @_; + die "y_n() called without y or n default" unless ($_[1]||"")=~/^[yn]/i; my $interactive = $self->_is_interactive; my $answer; @@ -385,7 +387,6 @@ $answer = $self->prompt(@_); return 1 if $answer =~ /^y/i; return 0 if $answer =~ /^n/i; - die "No y/n answer given, no default supplied, and no user to ask again" unless $interactive; print "Please answer 'y' or 'n'.\n"; } } Index: Authoring.pod =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Authoring.pod,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- Authoring.pod 4 Dec 2005 03:48:06 -0000 1.28 +++ Authoring.pod 22 Jan 2006 02:30:44 -0000 1.29 @@ -1229,10 +1229,12 @@ which is optional, specifies a default answer (for example, C<"wallet">). The user will be asked the question once. -If the current session doesn't seem to be interactive (i.e. if -C<STDIN> and C<STDOUT> look like they're attached to files or -something, not terminals), we'll just use the default without -letting the user provide an answer. +If C<prompt()> detects that it is not running interactively and there +is nothing on STDIN or if the PERL_MM_USE_DEFAULT environment variable +is set to true, the $default will be used without prompting. This +prevents automated processes from blocking on user input. + +If no $default is provided an empty string will be used instead. This method may be called as a class or object method. |
From: Ken W. <kwi...@us...> - 2006-01-22 02:30:52
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32324 Modified Files: Changes Log Message: Improve the behavior of prompt() and y_n() when there's no user Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.410 retrieving revision 1.411 diff -u -d -r1.410 -r1.411 --- Changes 20 Jan 2006 14:29:14 -0000 1.410 +++ Changes 22 Jan 2006 02:30:44 -0000 1.411 @@ -8,6 +8,12 @@ - We should now work with recent (> 0.49) versions of YAML.pm when creating the META.yml file. [Yitzchak Scott-Thoennes] + - The prompt() and y_n() methods have been improved with respect to + how they behave/detect when there is no user to ask. We're now + more consistent with MakeMaker, including respecting the + PERL_MM_USE_DEFAULT environment variable. [Tyler MacDonald and + Yitzchak Scott-Thoennes] + 0.27_05 Thu Jan 12 17:39:21 CST 2006 - In t/common.pl, we were attempting to let the user's installed |
From: Ken W. <kwi...@us...> - 2006-01-21 18:05:15
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build/Platform In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24597/lib/Module/Build/Platform Modified Files: Windows.pm Log Message: Find pl2bat differently when building in the core Index: Windows.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Platform/Windows.pm,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- Windows.pm 3 Dec 2005 03:08:14 -0000 1.25 +++ Windows.pm 21 Jan 2006 18:05:01 -0000 1.26 @@ -13,14 +13,32 @@ sub new { my $class = shift; my $self = $class->SUPER::new(@_); + + $self->_find_pl2bat(); + return $self; +} + + +sub _find_pl2bat { + my $self = shift; my $cf = $self->{config}; # Find 'pl2bat.bat' utility used for installing perl scripts. # This search is probably overkill, as I've never met a MSWin32 perl # where these locations differed from each other. - my @potential_dirs = map { File::Spec->canonpath($_) } - @${cf}{qw(installscript installbin installsitebin installvendorbin)}, - File::Basename::dirname($self->{properties}{perl}); + + my @potential_dirs; + + if ( $ENV{PERL_CORE} ) { + + require ExtUtils::CBuilder; + @potential_dirs = File::Spec->catdir( ExtUtils::CBuilder->new()->perl_src(), + qw/win32 bin/ ); + } else { + @potential_dirs = map { File::Spec->canonpath($_) } + @${cf}{qw(installscript installbin installsitebin installvendorbin)}, + File::Basename::dirname($self->{properties}{perl}); + } foreach my $dir (@potential_dirs) { my $potential_file = File::Spec->catfile($dir, 'pl2bat.bat'); @@ -29,8 +47,6 @@ last; } } - - return $self; } sub make_executable { @@ -49,7 +65,7 @@ (my $script_bat = $script) =~ s/\.plx?//i; $script_bat .= '.bat' unless $script_bat =~ /\.bat$/i; - my $status = $self->do_system($pl2bat, '<', $script, '>', $script_bat); + my $status = $self->do_system("$self->{properties}{perl} $pl2bat < $script > $script_bat"); if ( $status && -f $script_bat ) { $self->SUPER::make_executable($script_bat); } else { |
From: Ken W. <kwi...@us...> - 2006-01-20 14:29:27
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27316/lib/Module/Build Modified Files: Base.pm Log Message: Changes to work with recent YAML.pm Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.540 retrieving revision 1.541 diff -u -d -r1.540 -r1.541 --- Base.pm 20 Jan 2006 01:17:13 -0000 1.540 +++ Base.pm 20 Jan 2006 14:29:14 -0000 1.541 @@ -2987,6 +2987,7 @@ if ($self->_mb_feature('YAML_support')) { require YAML; + require YAML::Node; # We use YAML::Node to get the order nice in the YAML file. $self->prepare_metadata( my $node = YAML::Node->new({}) ); |
From: Ken W. <kwi...@us...> - 2006-01-20 14:29:27
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27316/t Modified Files: metadata.t Log Message: Changes to work with recent YAML.pm Index: metadata.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/metadata.t,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- metadata.t 9 Jan 2006 01:18:15 -0000 1.13 +++ metadata.t 20 Jan 2006 14:29:14 -0000 1.14 @@ -43,6 +43,7 @@ skip( 'YAML_support feature is not enabled', 8 ) unless $has_YAML; require YAML; + require YAML::Node; my $node = YAML::Node->new({}); $node = $mb->prepare_metadata( $node ); |
From: Ken W. <kwi...@us...> - 2006-01-20 14:29:27
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27316 Modified Files: Build.PL Changes Log Message: Changes to work with recent YAML.pm Index: Build.PL =================================================================== RCS file: /cvsroot/module-build/Module-Build/Build.PL,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- Build.PL 4 Dec 2005 07:41:39 -0000 1.63 +++ Build.PL 20 Jan 2006 14:29:14 -0000 1.64 @@ -53,7 +53,7 @@ YAML_support => { description => "Can write fully-functional META.yml files", - requires => { YAML => ' >= 0.35, < 0.49 ' }, + requires => { YAML => ' >= 0.35, != 0.49_01 ' }, }, C_support => { Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.409 retrieving revision 1.410 diff -u -d -r1.409 -r1.410 --- Changes 20 Jan 2006 01:21:07 -0000 1.409 +++ Changes 20 Jan 2006 14:29:14 -0000 1.410 @@ -5,6 +5,9 @@ - Fixed an undefined-variable warning when building the META.yml file and the author hasn't used the 'module_name' mechanism. [Chris Dolan] + - We should now work with recent (> 0.49) versions of YAML.pm when + creating the META.yml file. [Yitzchak Scott-Thoennes] + 0.27_05 Thu Jan 12 17:39:21 CST 2006 - In t/common.pl, we were attempting to let the user's installed |
From: Ken W. <kwi...@us...> - 2006-01-20 01:21:19
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16581 Modified Files: Changes Log Message: Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.408 retrieving revision 1.409 diff -u -d -r1.408 -r1.409 --- Changes 12 Jan 2006 23:41:45 -0000 1.408 +++ Changes 20 Jan 2006 01:21:07 -0000 1.409 @@ -1,5 +1,10 @@ Revision history for Perl extension Module::Build. +0.27_06 + + - Fixed an undefined-variable warning when building the META.yml file + and the author hasn't used the 'module_name' mechanism. [Chris Dolan] + 0.27_05 Thu Jan 12 17:39:21 CST 2006 - In t/common.pl, we were attempting to let the user's installed |
From: Ken W. <kwi...@us...> - 2006-01-20 01:17:22
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14705/lib/Module/Build Modified Files: Base.pm Log Message: Fix an undef warning when module_name isn't specified Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.539 retrieving revision 1.540 diff -u -d -r1.539 -r1.540 --- Base.pm 14 Dec 2005 23:30:25 -0000 1.539 +++ Base.pm 20 Jan 2006 01:17:13 -0000 1.540 @@ -2973,7 +2973,7 @@ # Since we're building ourself, we have to do some special stuff # here: the ConfigData module is found in blib/lib. local @INC = @INC; - if ($self->module_name eq 'Module::Build') { + if (($self->module_name || '') eq 'Module::Build') { $self->depends_on('config_data'); push @INC, File::Spec->catdir($self->blib, 'lib'); } |
From: Ken W. <kwi...@us...> - 2006-01-12 23:45:25
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27818 Modified Files: MANIFEST MANIFEST.SKIP Log Message: Index: MANIFEST =================================================================== RCS file: /cvsroot/module-build/Module-Build/MANIFEST,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- MANIFEST 23 Dec 2005 16:52:50 -0000 1.50 +++ MANIFEST 12 Jan 2006 23:45:17 -0000 1.51 @@ -30,7 +30,9 @@ README scripts/config_data t/basic.t -t/common.pl +t/bundled/Test/Builder.pm +t/bundled/Test/More.pm +t/bundled/Test/Simple.pm t/compat.t t/destinations.t t/ext.t @@ -38,9 +40,7 @@ t/files.t t/install.t t/lib/DistGen.pm -t/lib/Test/Builder.pm -t/lib/Test/More.pm -t/lib/Test/Simple.pm +t/lib/MBTest.pm t/manifypods.t t/metadata.t t/metadata2.t Index: MANIFEST.SKIP =================================================================== RCS file: /cvsroot/module-build/Module-Build/MANIFEST.SKIP,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- MANIFEST.SKIP 23 Dec 2005 16:52:50 -0000 1.21 +++ MANIFEST.SKIP 12 Jan 2006 23:45:17 -0000 1.22 @@ -33,3 +33,4 @@ ^META- Plugin ^doc_check.pl$ +^[^/]+\.patch$ |
From: Ken W. <kwi...@us...> - 2006-01-12 23:41:55
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27180 Modified Files: Changes Log Message: Version bump Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.407 retrieving revision 1.408 diff -u -d -r1.407 -r1.408 --- Changes 12 Jan 2006 23:39:11 -0000 1.407 +++ Changes 12 Jan 2006 23:41:45 -0000 1.408 @@ -1,6 +1,6 @@ Revision history for Perl extension Module::Build. -0.27_05 +0.27_05 Thu Jan 12 17:39:21 CST 2006 - In t/common.pl, we were attempting to let the user's installed Test::More take precedence over ours, but getting thwarted by all |
From: Ken W. <kwi...@us...> - 2006-01-12 23:41:55
|
Update of /cvsroot/module-build/Module-Build/lib/Module In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27180/lib/Module Modified Files: Build.pm Log Message: Version bump Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build.pm,v retrieving revision 1.206 retrieving revision 1.207 diff -u -d -r1.206 -r1.207 --- Build.pm 23 Dec 2005 16:46:50 -0000 1.206 +++ Build.pm 12 Jan 2006 23:41:45 -0000 1.207 @@ -15,7 +15,7 @@ use vars qw($VERSION @ISA); @ISA = qw(Module::Build::Base); -$VERSION = '0.27_04'; +$VERSION = '0.27_05'; $VERSION = eval $VERSION; # Okay, this is the brute-force method of finding out what kind of |
From: Ken W. <kwi...@us...> - 2006-01-12 23:39:20
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26513 Modified Files: Changes Log Message: Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.406 retrieving revision 1.407 diff -u -d -r1.406 -r1.407 --- Changes 29 Dec 2005 01:45:12 -0000 1.406 +++ Changes 12 Jan 2006 23:39:11 -0000 1.407 @@ -7,6 +7,12 @@ the test scripts' loading Test::More beforehand. Fixed. [Spotted by Yitzchak Scott-Thoennes] + - In various test scripts, we were outputting some strings that + weren't strictly conformant with Test::Harness's expected input, + though it didn't actually cause problems. Now we're more + conformant, though not yet strict. [Spotted by Yitzchak + Scott-Thoennes] + 0.27_04 Fri Dec 23 10:43:34 CST 2005 - Removed experimental feature that extended the prerequisite system @@ -19,7 +25,7 @@ actually installed. [David Wheeler] - Clarified the directory name that's created during the 'distdir' - action. [Suggested by Typler MacDonald] + action. [Suggested by Tyler MacDonald] - Fixed a bug when creating the META.yml file without the help of YAML.pm - some common strings weren't quoted & escaped properly. |
From: Ken W. <kwi...@us...> - 2006-01-09 03:58:13
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12912/t Modified Files: basic.t install.t runthrough.t Log Message: Use diag() and just good test names rather than print() Index: install.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/install.t,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- install.t 9 Jan 2006 01:18:15 -0000 1.32 +++ install.t 9 Jan 2006 03:58:01 -0000 1.33 @@ -69,8 +69,7 @@ my $libdir = strip_volume( $mb->install_destination('lib') ); my $install_to = File::Spec->catfile($destdir, $libdir, $dist->name ) . '.pm'; - print "Should have installed module as $install_to\n"; - ok -e $install_to; + file_exists($install_to); local @INC = (@INC, File::Spec->catdir($destdir, $libdir)); eval "require @{[$dist->name]}"; @@ -88,8 +87,7 @@ is $@, ''; my $libdir = strip_volume( $Config{installprivlib} ); my $install_to = File::Spec->catfile($destdir, $libdir, $dist->name ) . '.pm'; - print "Should have installed module as $install_to\n"; - ok -e $install_to; + file_exists($install_to); } { @@ -97,8 +95,7 @@ eval {$mb->dispatch('install', install_path => {lib => $libdir}, destdir => $destdir)}; is $@, ''; my $install_to = File::Spec->catfile($destdir, $libdir, $dist->name ) . '.pm'; - print "Should have installed module as $install_to\n"; - ok -e $install_to; + file_exists($install_to); } { @@ -106,8 +103,7 @@ eval {$mb->dispatch('install', install_base => $libdir, destdir => $destdir)}; is $@, ''; my $install_to = File::Spec->catfile($destdir, $libdir, 'lib', 'perl5', $dist->name ) . '.pm'; - print "Should have installed module as $install_to\n"; - ok -e $install_to; + file_exists($install_to); } { @@ -163,8 +159,7 @@ eval {$mb->run_perl_script('Build', [], ['install', '--destdir', $destdir])}; is $@, ''; my $install_to = File::Spec->catfile($destdir, $libdir, $dist->name ) . '.pm'; - print "# Should have installed module as $install_to\n"; - ok -e $install_to; + file_exists($install_to); my $basedir = File::Spec->catdir('', 'bar'); eval {$mb->run_perl_script('Build', [], ['install', '--destdir', $destdir, @@ -233,6 +228,11 @@ return $dir; } +sub file_exists { + my $file = shift; + ok -e $file or diag("Expected $file to exist, but it doesn't"); +} + # cleanup chdir( $cwd ) or die "Can''t chdir to '$cwd': $!"; Index: basic.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/basic.t,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- basic.t 9 Jan 2006 01:18:15 -0000 1.51 +++ basic.t 9 Jan 2006 03:58:00 -0000 1.52 @@ -88,8 +88,7 @@ $Foo::Module::VERSION = '1.01_02'; $info = Module::Build->check_installed_status('Foo::Module', '1.01_02'); - ok $info->{ok}; - print "# $info->{message}\n" if $info->{message}; + ok $info->{ok} or diag($info->{message}); } { Index: runthrough.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/runthrough.t,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- runthrough.t 9 Jan 2006 01:18:15 -0000 1.63 +++ runthrough.t 9 Jan 2006 03:58:01 -0000 1.64 @@ -94,21 +94,25 @@ ok grep {$_ eq 'before_script'} $mb->cleanup; ok grep {$_ eq 'save_out' } $mb->cleanup; -my $output = eval { - stdout_of( sub { $mb->dispatch('test', verbose => 1) } ) -}; -is $@, ''; -like $output, qr/all tests successful/i; - -# This is the output of lib/Simple/Script.PL -ok -e $mb->localize_file_path('lib/Simple/Script'); - +{ + # Make sure verbose=>1 works + my $all_ok = 1; + my $output = eval { + stdout_of( sub { $mb->dispatch('test', verbose => 1) } ) + }; + $all_ok &&= is($@, ''); + $all_ok &&= like($output, qr/all tests successful/i); + + # This is the output of lib/Simple/Script.PL + $all_ok &&= ok(-e $mb->localize_file_path('lib/Simple/Script')); -# We prefix all lines with "| " so Test::Harness doesn't get confused. -print "vvvvvvvvvvvvvvvvvvvvv Simple/test.pl output vvvvvvvvvvvvvvvvvvvvv\n"; -$output =~ s/^/| /mg; -print $output; -print "^^^^^^^^^^^^^^^^^^^^^ Simple/test.pl output ^^^^^^^^^^^^^^^^^^^^^\n"; + unless ($all_ok) { + # We use diag() so Test::Harness doesn't get confused. + diag("vvvvvvvvvvvvvvvvvvvvv Simple/test.pl output vvvvvvvvvvvvvvvvvvvvv"); + diag($output); + diag("^^^^^^^^^^^^^^^^^^^^^ Simple/test.pl output ^^^^^^^^^^^^^^^^^^^^^"); + } +} SKIP: { skip( 'YAML_support feature is not enabled', 7 ) unless $have_yaml; @@ -160,9 +164,7 @@ my $fh = IO::File->new($blib_script); my $first_line = <$fh>; - print "# rewritten shebang?\n$first_line"; - - isnt $first_line, "#!perl -w\n"; + isnt $first_line, "#!perl -w\n", "should rewrite the shebang line"; } { |
From: Ken W. <kwi...@us...> - 2006-01-09 01:18:30
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20993/t Modified Files: basic.t compat.t destinations.t ext.t extend.t files.t install.t manifypods.t metadata.t metadata2.t moduleinfo.t notes.t parents.t pod_parser.t ppm.t runthrough.t signature.t tilde.t versions.t xs.t Log Message: Changes from Yitzchak to make us core-able Index: files.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/files.t,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- files.t 29 Dec 2005 03:12:44 -0000 1.13 +++ files.t 9 Jan 2006 01:18:15 -0000 1.14 @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use lib 't/lib'; +use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; use MBTest tests => 6; use Cwd (); Index: signature.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/signature.t,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- signature.t 29 Dec 2005 03:12:44 -0000 1.17 +++ signature.t 9 Jan 2006 01:18:15 -0000 1.18 @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use lib 't/lib'; +use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; use MBTest; if ( $ENV{TEST_SIGNATURE} ) { Index: extend.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/extend.t,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- extend.t 29 Dec 2005 03:12:44 -0000 1.21 +++ extend.t 9 Jan 2006 01:18:15 -0000 1.22 @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use lib 't/lib'; +use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; use MBTest tests => 52; use Cwd (); Index: ext.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/ext.t,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- ext.t 29 Dec 2005 03:12:44 -0000 1.18 +++ ext.t 9 Jan 2006 01:18:15 -0000 1.19 @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use lib 't/lib'; +use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; use MBTest; my @unix_splits = Index: pod_parser.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/pod_parser.t,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- pod_parser.t 29 Dec 2005 03:12:44 -0000 1.6 +++ pod_parser.t 9 Jan 2006 01:18:15 -0000 1.7 @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use lib 't/lib'; +use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; use MBTest tests => 7; use Cwd (); Index: compat.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/compat.t,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- compat.t 29 Dec 2005 03:12:43 -0000 1.36 +++ compat.t 9 Jan 2006 01:18:15 -0000 1.37 @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use lib 't/lib'; +use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; use MBTest; use File::Spec; use Config; Index: basic.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/basic.t,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- basic.t 29 Dec 2005 03:01:48 -0000 1.50 +++ basic.t 9 Jan 2006 01:18:15 -0000 1.51 @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use lib 't/lib'; +use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; use MBTest tests => 55; use Cwd (); @@ -19,7 +19,10 @@ use_ok 'Module::Build'; -like $INC{'Module/Build.pm'}, qr/\bblib\b/, "Make sure Module::Build was loaded from blib/"; +SKIP: { + skip "no blib in core", 1 if $ENV{PERL_CORE}; + like $INC{'Module/Build.pm'}, qr/\bblib\b/, "Make sure Module::Build was loaded from blib/"; +} # Test object creation Index: ppm.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/ppm.t,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ppm.t 29 Dec 2005 03:12:44 -0000 1.7 +++ ppm.t 9 Jan 2006 01:18:15 -0000 1.8 @@ -1,24 +1,18 @@ #!/usr/bin/perl -w use strict; -use lib 't/lib'; +use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; use MBTest; use Module::Build; +use Module::Build::ConfigData; -my( $manpage_support, $HTML_support ); - -{ local $SIG{__WARN__} = sub {}; - - my $mb = Module::Build->current; - $mb->verbose( 0 ); - - $manpage_support = $mb->feature('manpage_support'); - $HTML_support = $mb->feature('HTML_support'); +my $manpage_support = Module::Build::ConfigData->feature('manpage_support'); +my $HTML_support = Module::Build::ConfigData->feature('HTML_support'); - my $have_c_compiler; - stderr_of( sub {$have_c_compiler = $mb->have_c_compiler} ); - if ( ! $mb->feature('C_support') ) { +{ + my ($have_c_compiler, $C_support_feature) = check_compiler(); + if (! $C_support_feature) { plan skip_all => 'C_support not enabled'; } elsif ( ! $have_c_compiler ) { plan skip_all => 'C_support enabled, but no compiler found'; Index: xs.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/xs.t,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- xs.t 29 Dec 2005 03:12:44 -0000 1.37 +++ xs.t 9 Jan 2006 01:18:15 -0000 1.38 @@ -1,19 +1,14 @@ #!/usr/bin/perl -w use strict; -use lib 't/lib'; +use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; use MBTest; use Module::Build; -{ local $SIG{__WARN__} = sub {}; - - my $mb = Module::Build->current; - $mb->verbose( 0 ); - - my $have_c_compiler; - stderr_of( sub {$have_c_compiler = $mb->have_c_compiler} ); +{ + my ($have_c_compiler, $C_support_feature) = check_compiler(); - if ( ! $mb->feature('C_support') ) { + if (! $C_support_feature) { plan skip_all => 'C_support not enabled'; } elsif ( !$have_c_compiler ) { plan skip_all => 'C_support enabled, but no compiler found'; Index: manifypods.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/manifypods.t,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- manifypods.t 29 Dec 2005 03:12:44 -0000 1.21 +++ manifypods.t 9 Jan 2006 01:18:15 -0000 1.22 @@ -1,11 +1,12 @@ #!/usr/bin/perl -w use strict; -use lib 't/lib'; +use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; use MBTest; use Module::Build; +use Module::Build::ConfigData; -if ( Module::Build->current->feature('manpage_support') ) { +if ( Module::Build::ConfigData->feature('manpage_support') ) { plan tests => 21; } else { plan skip_all => 'manpage_support feature is not enabled'; Index: destinations.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/destinations.t,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- destinations.t 29 Dec 2005 03:12:43 -0000 1.40 +++ destinations.t 9 Jan 2006 01:18:15 -0000 1.41 @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use lib 't/lib'; +use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; use MBTest tests => 92; use Cwd (); Index: runthrough.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/runthrough.t,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- runthrough.t 29 Dec 2005 03:12:44 -0000 1.62 +++ runthrough.t 9 Jan 2006 01:18:15 -0000 1.63 @@ -1,11 +1,12 @@ #!/usr/bin/perl -w use strict; -use lib 't/lib'; +use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; use MBTest tests => 28; use Module::Build; +use Module::Build::ConfigData; -my $have_yaml = Module::Build->current->feature('YAML_support'); +my $have_yaml = Module::Build::ConfigData->feature('YAML_support'); ######################### @@ -40,7 +41,9 @@ ok 1; require Module::Build; -ok $INC{'Module/Build.pm'}, qr/blib/, 'Module::Build should be loaded from blib'; +skip $ENV{PERL_CORE} && "no blib in core", + $INC{'Module/Build.pm'}, qr/blib/, 'Module::Build should be loaded from blib'; + print "# Cwd: ", Module::Build->cwd, "\n"; print "# \@INC: (@INC)\n"; print "Done.\n"; # t/compat.t looks for this @@ -62,7 +65,10 @@ use Module::Build; ok(1); -like $INC{'Module/Build.pm'}, qr/\bblib\b/, "Make sure version from blib/ is loaded"; +SKIP: { + skip "no blib in core", 1 if $ENV{PERL_CORE}; + like $INC{'Module/Build.pm'}, qr/\bblib\b/, "Make sure version from blib/ is loaded"; +} ######################### Index: moduleinfo.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/moduleinfo.t,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- moduleinfo.t 29 Dec 2005 03:12:44 -0000 1.15 +++ moduleinfo.t 9 Jan 2006 01:18:15 -0000 1.16 @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use lib 't/lib'; +use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; use MBTest tests => 64; use Cwd (); Index: versions.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/versions.t,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- versions.t 29 Dec 2005 03:12:44 -0000 1.10 +++ versions.t 9 Jan 2006 01:18:15 -0000 1.11 @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use lib 't/lib'; +use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; use MBTest tests => 2; use Cwd (); Index: parents.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/parents.t,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- parents.t 29 Dec 2005 03:12:44 -0000 1.5 +++ parents.t 9 Jan 2006 01:18:15 -0000 1.6 @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use lib 't/lib'; +use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; use MBTest tests => 27; ######################### Index: notes.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/notes.t,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- notes.t 29 Dec 2005 03:12:44 -0000 1.18 +++ notes.t 9 Jan 2006 01:18:15 -0000 1.19 @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use lib 't/lib'; +use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; use MBTest tests => 8; use Cwd (); Index: tilde.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/tilde.t,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- tilde.t 29 Dec 2005 03:12:44 -0000 1.15 +++ tilde.t 9 Jan 2006 01:18:15 -0000 1.16 @@ -3,7 +3,7 @@ # Test ~ expansion from command line arguments. use strict; -use lib 't/lib'; +use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; use MBTest tests => 11; use Cwd (); Index: install.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/install.t,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- install.t 29 Dec 2005 03:12:44 -0000 1.31 +++ install.t 9 Jan 2006 01:18:15 -0000 1.32 @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use lib 't/lib'; +use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; use MBTest tests => 34; use Cwd (); Index: metadata2.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/metadata2.t,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- metadata2.t 29 Dec 2005 03:12:44 -0000 1.10 +++ metadata2.t 9 Jan 2006 01:18:15 -0000 1.11 @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use lib 't/lib'; +use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; use MBTest tests => 18; use Cwd (); @@ -9,6 +9,7 @@ my $tmp = File::Spec->catdir( $cwd, 't', '_tmp' ); use Module::Build; +use Module::Build::ConfigData; use DistGen; @@ -16,7 +17,7 @@ SKIP: { skip( 'YAML_support feature is not enabled', 4 ) - unless Module::Build->current->feature('YAML_support'); + unless Module::Build::ConfigData->feature('YAML_support'); my $dist = DistGen->new( dir => $tmp, skip_manifest => 1 ); $dist->regen; Index: metadata.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/metadata.t,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- metadata.t 29 Dec 2005 03:12:44 -0000 1.12 +++ metadata.t 9 Jan 2006 01:18:15 -0000 1.13 @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use lib 't/lib'; +use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; use MBTest tests => 46; use Cwd (); @@ -10,13 +10,14 @@ use Module::Build; -my $has_YAML = Module::Build->current->feature('YAML_support'); +use Module::Build::ConfigData; +my $has_YAML = Module::Build::ConfigData->feature('YAML_support'); use DistGen; my $dist = DistGen->new( dir => $tmp ); $dist->change_file( 'Build.PL', <<"---" ); -use Module::Build; + my \$builder = Module::Build->new( module_name => '@{[$dist->name]}', dist_version => '3.14159265', |
From: Ken W. <kwi...@us...> - 2006-01-09 01:18:28
|
Update of /cvsroot/module-build/Module-Build/t/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20993/t/lib Modified Files: MBTest.pm Log Message: Changes from Yitzchak to make us core-able Index: MBTest.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/lib/MBTest.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- MBTest.pm 29 Dec 2005 03:04:22 -0000 1.2 +++ MBTest.pm 9 Jan 2006 01:18:15 -0000 1.3 @@ -13,6 +13,19 @@ # Make sure none of our tests load the users ~/.modulebuildrc file $ENV{MODULEBUILDRC} = 'NONE'; + + if ($ENV{PERL_CORE}) { + # We change directories, so expand @INC to absolute paths + # Also add . + @INC = (map(File::Spec->rel2abs($_), @INC), "."); + + # we are in 't', go up a level so we don't create t/t/_tmp + chdir '..' or die "Couldn't chdir to .."; + + # make sure children get @INC pointing to uninstalled files + require Cwd; + $ENV{PERL5LIB} = File::Spec->catdir(Cwd::cwd(), 'lib'); + } } use Exporter; @@ -28,7 +41,7 @@ # We have a few extra exports, but Test::More has a special import() # that won't take extra additions. -my @extra_exports = qw(stdout_of stderr_of slurp find_in_path); +my @extra_exports = qw(stdout_of stderr_of slurp find_in_path check_compiler); push @EXPORT, @extra_exports; __PACKAGE__->export(scalar caller, @extra_exports); @@ -74,4 +87,19 @@ return; } +# returns ($have_c_compiler, $C_support_feature); +sub check_compiler { + return (1,1) if $ENV{PERL_CORE}; + + local $SIG{__WARN__} = sub {}; + + my $mb = Module::Build->current; + $mb->verbose( 0 ); + + my $have_c_compiler; + stderr_of( sub {$have_c_compiler = $mb->have_c_compiler} ); + + return ($have_c_compiler, $mb->feature('C_support')); +} + 1; |
From: Ken W. <kwi...@us...> - 2006-01-07 16:59:44
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3060/lib/Module/Build Modified Files: Cookbook.pm Log Message: Some recipe updates Index: Cookbook.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Cookbook.pm,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- Cookbook.pm 3 Dec 2005 03:08:14 -0000 1.19 +++ Cookbook.pm 7 Jan 2006 16:59:33 -0000 1.20 @@ -23,18 +23,16 @@ =head2 The basic installation recipe for modules that use Module::Build -In most cases, you can just issue the following commands from your -shell: +In most cases, you can just issue the following commands: perl Build.PL - Build - Build test - Build install + ./Build + ./Build test + ./Build install There's nothing complicated here - first you're running a script called F<Build.PL>, then you're running a (newly-generated) script -called F<Build> and passing it various arguments. If you know how to -do that on your system, you can get installation working. +called F<Build> and passing it various arguments. The exact commands may vary a bit depending on how you invoke perl scripts on your system. For instance, if you have multiple versions @@ -42,22 +40,26 @@ directories like so: /usr/bin/perl5.8.1 Build.PL - Build - Build test - Build install + ./Build + ./Build test + ./Build install + +If you're on Windows, you'll probably do something like this: + + perl Build.PL + .\Build + .\Build test + .\Build install + +On the old Mac OS (version 9 or lower) using MacPerl, you can +double-click on the F<Build.PL> script to create the F<Build> script, +then double-click on the F<Build> script to run its C<build>, C<test>, +and C<install> actions. The F<Build> script knows what perl was used to run C<Build.PL>, so you don't need to re-invoke the F<Build> script with the complete perl path each time. If you invoke it with the I<wrong> perl path, you'll -get a warning. - -If the current directory (usually called '.') isn't in your path, you -can do C<./Build> or C<perl Build> to run the script: - - /usr/bin/perl Build.PL - ./Build - ./Build test - ./Build install +get a warning or a fatal error. =head2 Making a CPAN.pm-compatible distribution @@ -73,11 +75,16 @@ Module::Build::Compat->run_build_pl(args => \@ARGV); Module::Build::Compat->write_makefile(); -Now CPAN will work as usual, i.e.: `perl Makefile.PL`, `make`, `make test`, -and `make install`. +Now CPAN will work as usual, i.e.: `perl Makefile.PL`, `make`, `make +test`, and `make install`, provided the end-user already has +C<Module::Build> installed. -Alternatively, see the C<create_makefile_pl> parameter to the C<< -Module::Build->new() >> method. +If the end-user might not have C<Module::Build> installed, it's +probably best to supply a "traditional" F<Makefile.PL>. The +C<Module::Build::Compat> module has some very helpful tools for +keeping a F<Makefile.PL> in sync with a F<Build.PL>. See its +documentation, and also the C<create_makefile_pl> parameter to the +C<< Module::Build->new() >> method. =head2 Installing modules using the programmatic interface @@ -115,6 +122,27 @@ ./Build install --destdir /tmp/my-package-1.003 +This essentially just prepends all the installation paths with the +F</tmp/my-package-1.003> directory. + +=head2 Installing to a non-standard directory + +To install to a non-standard directory (for example, if you don't have +permission to install in the system-wide directories), you can use the +C<install_base> or C<prefix> parameters: + + ./Build install --install_base /foo/bar + or + ./Build install --prefix /foo/bar + +Note that these have somewhat different effects - C<prefix> is an +emulation of C<ExtUtils::MakeMaker>'s old C<PREFIX> setting, and +inherits all its nasty gotchas. C<install_base> is more predictable, +and newer versions of C<ExtUtils::MakeMaker> also support it, so it's +often your best choice. + +See L<Module::Build/"INSTALL PATHS"> for a much more complete +discussion of how installation paths are determined. =head2 Running a single test file @@ -158,30 +186,6 @@ C<Module::Build> code. -=head2 Dealing with more than one perl installation - -If you have more than one C<perl> interpreter installed on your -system, you can choose which installation to target whenever you use -C<Module::Build>. Usually it's as simple as using the right C<perl> -in the C<perl Build.PL> step - this perl will be remembered for the -rest of the life of the generated F<Build> script. - -Occasionally, however, we get it wrong. This is because there often -is no reliable way in perl to find a path to the currently-running -perl interpreter. When C<$^X> doesn't tell us much (e.g. when it's -something like "perl" instead of an absolute path), we do some very -effective guessing, but there's still a small chance we can get it -wrong. Or not find one at all. - -Therefore, if you want to explicitly tell C<Module::Build> which perl -binary you're targeting, you can override C<$Config{perlpath}>, like -so: - - /foo/perl Build.PL --config perlpath=/foo/perl - ./Build --config perlpath=/foo/perl - ./Build test --config perlpath=/foo/perl - - =head2 Adding new file types to the build process Sometimes you might have extra types of files that you want to install |