Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential opportunity for partial functionality without installer #347

Open
kentfredric opened this issue Jan 15, 2014 · 1 comment
Open

Comments

@kentfredric
Copy link
Contributor

In some discussion in #distzilla on irc.perl.org, we realised something:

That you could potentially support at very least doing

cpanm --installdeps .

With just a META.json, and no *.PL

Presently, if all you have is META.json, cpanm --installdeps . can only go as far as installing configure_requires, because it relies on an installer being present to generate MYMETA.json and resolve subsequent dependencies.

However, it seems possible to get useful behaviour, as long as:

  1. There is no Build.PL / Makefile.PL
  2. META.json says "dynamic_config": "0"

Then you can safely assume that the dependencies in META.json will not change in the production of MYMETA.json, and in the absence of an installer, simply assume META.json as a viable drop in.

And this would at least render a useful behaviour from --installdeps

You could possibly even get more useful behaviour, and potentially even install distributions that didn't explicitly ship with an installer script, assuming the above conditions are true, with

perl -MModule::Build::Tiny -e 'BuildPL(); Build(); Build("install")'

Though there's a degree of debate in my mind how "safe" that is to do, especially if for example, META.json has anything at all in configure.requires

If configure.requires however only contains Module::Build::Tiny, then it is indeed safe to do the above invocation in the absence of a Build.PL

And I guess by proxy you could attempt some sane behaviour by autovivifying a configure script as long as configure.requires contained only ExtUtils::MakeMaker or Module::Build, though I'm not 100% sure on the former.

Maybe an experimental option like --allow-no-installer would be required to trigger this behaviour.

@miyagawa
Copy link
Owner

With just a META.json, and no *.PL

Yes. This is something i always have had in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants