On Mon, Apr 04, 2011 at 05:12:00PM +0200, Leon Timmermans wrote: > What *exactly* did you try to do? «./Build --install_base foo» or > «./Build install --install_base foo»? Or both?
Sorry. I tried the following.
Works fine:
perl Build.PL --install_base ~/test
./Build
./Build install
Works, but doesn't correctly replace the paths with my hacky
solution. Exactly the problem you mentioned below.
perl Build.PL
./Build
./Build install --install_base ~/test
Doesn't work:
perl Build.PL
./Build --install_base ~/test
./Build install
I thought ./Build --install_base ~/test would store the path
somewhere.
>> Hm, looks really complicated for such a simple task :-/
>
> I agree. I think adding a helper function for this may be a good idea.
That would be perfect.
>> Yeah, at the moment I rewrite the files to point to the right
>> place. My current solution feels really like a hack:
>
> It has the issue that the install_destination may not be known at
> build time. The stages are rather independent. In theory it may even
> be installed to multiple locations.
Good point. But how can I handle the problem? Is there no
solution which works in all cases?
>> Is there a simple way for text replacements like this in
>> Module::Build (or maybe a better way to do it)? One known problem
>> with my solution is that a --prefix/--install_base change doesn't
>> case an update to the file, so it points to the wrong path.
>
> No there isn't (nor should there be IMO, it has enough cruft as it is).
Ok.
Regards,
Simon
--
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9
pgpbJ6ZDq4ofw.pgp
Description: PGP signature
