Open afresh1 opened 3 years ago
I agree that current blead support of Perl-Build is very limited. OTOH, I'm not sure we should improve it.
I think building blead perl is quite different from building perl-5.XX.X.tar.gz.
Looking at your code, I think:
$as
) according to the configure options automatically.Why don't you write your own plenv plugin that builds blead perl?
Note that this is just my opinion; other maintainers might have their opinions.
The main improvement I would like is that when I plenv install blead --as blead-$( date +%Y-%m-%d )
I actually get a new "blead" instead of getting the months old cached blead.tar.gz. Yes, I could write plenv-install-from-github
that figures out the download commit hash and the --as
and calls out to plenv-install
, but perl-build already fat-packs HTTP::Tinyish and provides all the tools needed so it seemed a lot easier to put it here. If it's not welcome here, I'll put it on my TODO list for someday in the future.
This change makes two API requests per github install (one if the "already installed" check moves into perl-build from plenv-install). I expect the person who wants to install more than 30 perl versions from github per hour to add API token support.
This does not break the ability for people to set --as
however they want, this just adjusts the default if they don't provide one (or more specifically due to the weird interface difference between plenv-install
and perl-build
if it's detected they used plenv install's "default name").
Perl hackers who have the perl git repo checked out will just build directly from there, this is for folks who want to try recently merged features or test a feature branch to see if it addresses the problem they're experiencing. I want to use it on a machine where I don't have a perl checkout, but do have plenv set up.
This means you can not only
plenv install blead
but alsoplenv install blead@{2001-02-03}
orplenv install 41b10d901d
as well asplenv install leont/shutdownhook
. Unfortunately it doesn't work for pull-requests, but that could be added.