Re: Install custom files

Simon Ruderich <[email protected]> Mon, 4 Apr 2011 21:38:14 +0200
Newsgroups gmane.comp.lang.perl.modules.module-build
Message-ID <[email protected]>
--=_zucker.schokokeks.org-4041-1301945896-0001-2
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Apr 04, 2011 at 05:12:00PM +0200, Leon Timmermans wrote:
> What *exactly* did you try to do? =AB./Build --install_base foo=BB or
> =AB./Build install --install_base foo=BB? 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
--=20
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9

--=_zucker.schokokeks.org-4041-1301945896-0001-2
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBCAAGBQJNmh4mAAoJEJL+/bfkTDL50IoQAJ1FrS5i45DiymLIMlJdl1zi
22DkG2YLE9z6rKcrTqdbkXe0/VKZ1q23MDlzw56ksJEHFwvDKYUGXNAuYtw9pSt+
ze/WPBEwiztGXhSVNqxof2DKj2HqL721KkTvtgJVcscJTnUrNvvNZnQFLXS5wpKN
20heMnHyA5dWpQnhVI0Mtm6AbcDzi7rh0j9HoAEYM5FWWgq/8HV+p9BCOBryVTmc
oU0RF65uDcA15fcPlLd9sxM+oTQ+W/eFocjuj0zxdSSdCYpb8pJ0InhXPstXHanv
7IqXMX2J0ZyOJv45AB9D8qjKYoSvVFnqua7NiP0wJC7tWtFbuYVU/9+jgV/bcE8A
yXtZwywLSdOcoLt1jswMQ9u6sIRoPxTCV2PXymx/cnfg1pl9j2lhN2cJSBWwN+py
BN9+IWNvOfKWPi7f3CAlESKwtvPcPEBmdYJhCTkp14n0bp87cWriTnhV5KrOfykN
YrIHX/S8irRBF0B2ikvCY1dwvjC2N/0nfzh7MbrMIvORcRKabe8EfHMuIVGJJifr
YS3oJAezAQGYvykdQmhsj+1cLpjppTGXuaG3h6tflXlUD7aTa7RArfag9UJ/xUe9
5d9jagIGdHu1iUCDqUfGUXqP+zAdMbZOb+YGjFmqLOdIjesL8N9KPQ1Ss+p2W+vH
L11BYLNkDXzTp2rIJqby
=tFf/
-----END PGP SIGNATURE-----

--=_zucker.schokokeks.org-4041-1301945896-0001-2--