Re: [Module::Build] M::B and no_index
Status: Beta
Brought to you by:
kwilliams
From: Randy W. S. <ml...@th...> - 2006-03-24 22:48:51
|
Johan Vromans wrote: > Johan Vromans <jvr...@sq...> writes: > >> Okay, now I've found it I'll give it a try. > > This version seems to cure a lot of problems. Nice. > > However, for the time being, I think it's better to distribute this > version of M::B together with the application. While it is trivial to > add a "use lib '.';" to the Build.PL, how can I achieve this with the > generated Build script? In the Module::Build directory, run perl Build.PL ./Build Then copy 'blib/lib' to your distro: cp -r blib/lib/* ~/Foo/inc/ Then write your Build.PL something like: use strict; use warnings; use lib 'inc'; use Module::Build; use Cwd; my $cwd = cwd(); my $build_class = Module::Build->subclass(code => <<"---"); use File::Spec; my \$inc = File::Spec->catdir("$cwd", 'inc'); unshift(\@INC, \$inc); use Module::Build; sub ACTION_version { print qq(Using Module::Build version \$Module::Build::VERSION\n); } --- my $builder = $build_class->new( module_name => 'Foo', license => 'perl', ); $builder->create_build_script(); __END__ Regards, Randy. |