[Module-build-general] Warning on shebang/extending M::B
Status: Beta
Brought to you by:
kwilliams
|
From: Ken Y. C. <kc...@lo...> - 2003-09-10 20:33:49
|
I've been trying to convert a distribution of mine over to use
Module::Build, and I've got a couple of questions
1. This is mostly just annoying and isn't really stopping anything,
but, after I run "perl Build.PL," I get this warning:
* WARNING: Configuration was initially created with '/usr/bin/perl',
but we are now using '/usr/local/bin/perl'.
Both perl's are the same, so it's not a version problem, but see:
$ which perl
/usr/bin/perl
$ perl -MConfig -e 'print "$Config::Config{startperl}\n"'
#!/usr/local/bin/perl
And the latter is what Module::Build::Base::print_build_script uses.
Is there a way to fix this so that it uses whatever is the path for
the binary used to execute "Build.PL" instead?
2. The main reason I want to move away from MakeMaker is because I have
a number of files (HTML templates, configuration files, stylesheet)
that I want to install into directories that the user defines as
arguments to Build.PL. In MM, I'd create extra targets for the
"make install," but with Module::Build the docs say I ought to be
able to just add some code to "ACTION_install" to get this to
happen, but I'm not having any luck. Even something simple like
this doesn't work:
my $builder = Module::Build->subclass(
class => 'My::Builder',
code => q[
sub ACTION_install {
my $self = shift;
print "Yo!\n";
}
]
)->new(
module_name => 'Bio::GMOD::CMap',
dist_author => 'Ken Y. Clark <kc...@cs...>',
dist_name => 'cmap',
dist_version_from => 'lib/Bio/GMOD/CMap.pm',
license => 'gpl',
);
$builder->create_build_script;
When I run "./Build fakeinstall" (because I don't want to actually
install on this machine), I don't see "Yo" but I do see lots of
"Installing..." statements. I've scoured the docs, looked at the
Cookbook, read the perl.com article, and searched the list archives,
but I don't really see how I can add some actions like this. I'd
really appreciate a point to the right docs if they exist, or some
help in making them if they don't.
Also, FWIW, some of the pmtools complain about
Module::Build::Cookbook, e.g.:
$ pmpath Module::Build::Cookbook
/usr/local/bin/pmpath: Module/Build/Cookbook.pm did not return a true value
ky
|