logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: Fwd: [Module::Build] Does ./Build work on Windows?: msg#00113

Subject: Re: Fwd: [Module::Build] Does ./Build work on Windows?
CPAN.pm 1.83_59 does this to set up to run Build.PL:

 my($perl) = $self->perl or die "Couldn\'t find executable perl\n";
 $system = "$perl Build.PL $CPAN::Config->{mbuildpl_arg}";

Then it does this to set up the subsequent call to it:

 $system = "./Build $CPAN::Config->{mbuild_arg}";

 $system = "./Build test";

 $system = "./Build clean";

Every single one of these could be replaced with something like the first:

 $system = "$perl ./Build $CPAN::Config->{mbuild_arg}";

 $system = "$perl ./Build test";

 $system = "$perl ./Build clean";

That's a minute patch that should make CPAN.pm run ./Build on any system that has Perl and can run Build.PL in the first place. I don't understand why creating/destroying a .bat file is preferable. Am I missing something?

Only install is more complex:

 my($mbuild_install_build_command) =
            $CPAN::Config->{'mbuild_install_build_command'} ||
            "./Build";
 $system = join(" ",
                $mbuild_install_build_command,
                "install",
                $CPAN::Config->{mbuild_install_arg},
 );

Even that could be "$perl ./Build" -- and the docs could say that mbuild_install_arg should be "sudo perl ./Build".

Unless I'm missing something, I'd really rather see a simple (and backwards compatible) patch to CPAN.pm than another crufty, OS-specific behavior added to Module::Build.

Regards,
David


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642


<Prev in Thread] Current Thread [Next in Thread>