Skip Menu |

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

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

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

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



Subject: Install of modules fail with CPAN.pm if Module::Build not installed
Not sure whether this is a bug or a feature. In any case, if you try to install a module that uses Module::Build for its build process _and_ Module::Build is not installed, installation of the module will fail with the message that Module::Build can not be loaded. Which initially makes you wonder why the module author was stupid enough to not list that dependency. Until you find out everything is hunky dory when Module::Build _is_ installed. Being a module author myself, I like the concept of Module::Build a lot, especially the "recommended" functionality. However, I'm very hesitant to start using Module::Build if it is going to fail in all those cases where Module::Build is not installed yet. I tried to adapt the Makefile.PL that apparently comes with Module::Build such: eval "use Module::Build::Compat"; if (!defined %Module::Build::Compat::) { warn "*** Attempting to install Module::Build first\n"; eval "use CPAN"; if (defined $CPAN::VERSION) { if (my $cpan = CPAN::Shell->expand( 'Module','Module::Build' )) { $cpan->install; eval "use Module::Build::Compat"; } } } if (defined %Module::Build::Compat::) { Module::Build::Compat->run_build_pl(args => \@ARGV); Module::Build::Compat->write_makefile(); } else { warn <<EOD; This module can only be installed if the Module::Build package has been installed. Please install Module::Build _first_ before attempting to install this module again. EOD exit 1; } anyway, you get the idea.
Show quoted text
> I tried to adapt the Makefile.PL that apparently comes with > Module::Build such:
Scratch this. Just found the Module::Build::Compat documentation. The module that I was installing, did _not_ have the special Makefile.PL that is described there. I'll send in a bugreport for that particular module. Liz
Ticket closed. Out of curiosity, what module was this? optimize.pm, perhaps?