Skip Menu |
 

This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics
Id: 4963
Status: resolved
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: NUFFIN [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.22
Fixed in: (no value)

Attachments
Module-Build-Compat.patch



Subject: Module::Build::Compat generates a Makefile.PL without EXE_FILES == script_files
Download (untitled) / with headers
text/plain 709b
Module::Build::Compat generates a Makefile.PL (under traditional mode) which doesn't contain EXE_FILES corresponding to the $build->script_files parameter, should the latter exist. This results in the executable files not being installed when using Makefile.PL Attached is a qnd patch to allow that. I think the writing of the makefile shouldn't be atomical though, and should allow easier addition of more parameters, should the need for them arise. Use of some kind of serializer, possibly Data::Dumper, wrapped in some constant strings, is probably more of a Good Thing. Perhaps something like print Data::Dumper::Dumper($makemaker_params), <<EOF; use ExtUtils::MakeMaker; WriteMakefile(%$VAR1); EOF;
Only in Module-Build-0.22-Makefile.PL-traditional-EXE_FILES/: Build Only in Module-Build-0.22-Makefile.PL-traditional-EXE_FILES/: _build diff -ur Module-Build-0.22/lib/Module/Build/Compat.pm Module-Build-0.22-Makefile.PL-traditional-EXE_FILES/lib/Module/Build/Compat.pm --- Module-Build-0.22/lib/Module/Build/Compat.pm Sun Jan 11 06:19:59 2004 +++ Module-Build-0.22-Makefile.PL-traditional-EXE_FILES/lib/Module/Build/Compat.pm Sat Jan 17 13:55:03 2004 @@ -84,7 +84,22 @@ : (VERSION => $build->dist_version) ); - printf {$fh} <<'EOF', $name_key, $name, %v, $id, $prereq; + my $extra = ""; # anything extra going into the makefile + if ($build->script_files){ # if there are script files, executables, to be installed in the path, add the data for them + + $extra .= sprintf( + " %-12s => [ %s ],\n", # that's the format + "EXE_FILES", # the key of the parameter for ExtUtils::MakeMaker + join(", ", map { "'$_'" } # quote the strings, and join them together + ( $build->script_files =~ /ARRAY/ # script_files can be a hash ref + ? @{ $build->script_files } + : keys %{ $build->script_files } # Module::Build says: 'or as a hash reference whose keys are the files (and whose values will currently be ignored)' + ) + ) + ); + } + + printf {$fh} <<'EOF', $name_key, $name, %v, $id, $prereq, $extra; # Generated by Module::Build::Compat->create_makefile_pl use ExtUtils::MakeMaker; @@ -97,7 +112,7 @@ PREREQ_PM => { %s }, - ); +%s ); EOF } }
Download (untitled) / with headers
text/plain 196b
Using Data::Dumper (or something similar) is a good idea - I'll see if I can convert your script_files patch into something like that. Thanks, I hadn't noticed the omission of EXE_FILES. -Ken
This is now checked into CVS, and will be part of the next release.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.