Closed theory closed 6 years ago
I would suggest to implement this by adding an environment variable to be recognized by Perl::Build like PERL_PERLBUILD_OPT, which could then be set in whatever way is convenient for you.
Well I only needed from and building a new version of Perl. I wouldn’t want it set in my shell all the time. Seems silly.
There's not much functional difference between adding these options to an arbitrary file and adding them to your .bashrc, but the latter gives more flexibility in how they can be used and is easier to implement.
plenv allows you to put arbitrary commands in ~/.plenv/libexec
where you can just place a script (bash or perl or whatever) to invoke plenv-install
with the arguments you like.
Is there an example of that, @miyagawa? Is it just this?
#!env bash
set -e
plenv-install -Duseshrplib -Dusemultiplicity
I'd do exec plenv-install ... $@
but yeah, i just tried it and it worked as i would expect :)
#!/usr/bin/env bash
#
# Summary: Build a Perl version with customized Configure options.
#
# Usage: plenv build [-v|--verbose] <version>
#
set -e
[ -n "$PLENV_DEBUG" ] && set -x
exec plenv install -Duseshrplib -Dusemultiplicity $@
Cool, thanks!
I'd love to be able to edit a file to set
Configure
options that would be passed by default unless overridden on the command line. Something like:These would then be passed unless the corresponding
-D
was passed toinstall
.