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

cpan.rb - export the environment variables output by local::lib. #850

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tomeon
Copy link

@tomeon tomeon commented Feb 10, 2015

See #843 -- ExtUtils::MakeMaker doesn't like it when both PREFIX and INSTALL_BASE are defined, and some CPAN packages don't play nice with the INSTALL_BASE= trick. This pull request deals with this issue by exporting local::lib's environment variables into the environment of the current process prior to calling Build.PL/Makefile.PL, skipping the PERL_MM_OPT and PERL_MB_OPT environment variables that were at the root of the problem.

# The subshell call to echo is necessary because some environment
# variables are defined in terms of other such variables; this technique
# expands the variables-within-variables.
ENV[k] = `echo #{v}`.chomp
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the comment explaining why you do this subshell echo. I was super confused until I read the comment ❤️

@tomeon
Copy link
Author

tomeon commented Jan 31, 2016

Fixed this up to be a bit saner -- no more subshell echoes, in other words :).

Matt Schreiber and others added 3 commits April 21, 2024 17:44
by reading the `local::lib` environment variables into the current
process, sans PERL_MB_OPT and PERL_MM_OPT.  This helps ensure that
ExtUtils::MakeMaker does not bail out with a complaint about both
INSTALL_BASE and PREFIX being set.

Fixes jordansissel#843.
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

Successfully merging this pull request may close these issues.

None yet

2 participants