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

Add build_element support to the ModuleBuild plugin. #121

Closed
wants to merge 1 commit into from

Conversation

theory
Copy link
Contributor

@theory theory commented Sep 5, 2012

This is so that, if you have non-Perl files in lib (.js, .sql, .jpg, or whatever), you can tell Module::Build to install them.

I did a bit of testing with MakeMaker, and it looks as if it installs whatever is in lib without having to be told.

@theory
Copy link
Contributor Author

theory commented Sep 6, 2012

To be fair, users can also work around this issue by creating a subclass that makes the necessary calls in its constructor, and just specify it in mb_class. This is a little more convenient, though.

@dolmen
Copy link
Contributor

dolmen commented Sep 7, 2012

Why not put thoses files in share/ and use [ShareDir] ?

@theory
Copy link
Contributor Author

theory commented Sep 7, 2012

Because the cod that ends up looking for it may not always find it. For example, Locale::TextDomain looks for files in each directory in @INC. It does not (yet) know to look in the File::ShareDir directory. So I end up having to write instructions like this.

@rjbs
Copy link
Owner

rjbs commented Jul 25, 2015

I apologize for this patch languishing. I will apply it post haste if rebased. (I had a quick go at it, but it was not trivial.)

@karenetheridge
Copy link
Contributor

I don't think it's a good idea for us to be supporting putting non-perl files into PERL5LIB. That's what a sharedir is for.

@jberger
Copy link

jberger commented Jul 25, 2015

Share dir does do this but at additional cognitive overhead.

@theory
Copy link
Contributor Author

theory commented Jul 30, 2015

Rebased.

@karenetheridge
Copy link
Contributor

but at additional cognitive overhead.

@jberger what do you mean by this?

@theory
Copy link
Contributor Author

theory commented Jul 31, 2015

@karenetheridge This is a feature of Module::Build. You may not want to encourage it, which I get, but then that should go into the Module::Build docs as a recommendation or something (and the EU::MM docs). Ideally, Dist::Zilla would pass through whatever the installer modules support.

@karenetheridge
Copy link
Contributor

@Leont what do you think? Should we try to discourage this feature of Module::Build, or live with it?

@jberger
Copy link

jberger commented Jul 31, 2015

ShareDir still has the problem of the files being in a different place when you are in a git checkout or after installation. To use it people have to dream up heuristics to decide which scenario they are in. Allowing to install non perl files directly is useful in that you don't need these heuristics.

@karenetheridge
Copy link
Contributor

ShareDir still has the problem of the files being in a different place when you are in a git checkout or after installation.

Test::File::ShareDir works pretty well (although its guts need a lot of love.. different topic..)

@Leont
Copy link
Contributor

Leont commented Aug 1, 2015

build_element doesn't map one-on-one with sharedir, really; it's more that its default action kind can be used to a similar effect, but typically that's not a particularly interesting thing to do with it. Discouraging it is silly, encouraging sharedirs when they make sense is sensible, there two are not particularly related in my mind.

@rjbs
Copy link
Owner

rjbs commented Aug 7, 2015

Thanks, applied!

@rjbs rjbs closed this Aug 7, 2015
@karenetheridge
Copy link
Contributor

Oops, there's no documentation for this new option!

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

Successfully merging this pull request may close these issues.

None yet

6 participants