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

t/script.t should preserve PERL5LIB #3

Open
eserte opened this issue Nov 15, 2017 · 0 comments
Open

t/script.t should preserve PERL5LIB #3

eserte opened this issue Nov 15, 2017 · 0 comments

Comments

@eserte
Copy link

eserte commented Nov 15, 2017

t/script.t sets PERL5LIB for later script executions. Unfortunately this means that a previous PERL5LIB is overwritten. This may actually cause test failures like this:

/foo: Can't locate Params/Validate.pm in @INC (you may need to install the Params::Validate module) (@INC contains: lib /usr/perl5.18.4p/lib/site_perl/5.18.4/amd64-freebsd /usr/perl5.18.4p/lib/site_perl/5.18.4 /usr/perl5.18.4p/lib/5.18.4/amd64-freebsd /usr/perl5.18.4p/lib/5.18.4 .) at lib/Morpheus/Plugin/File.pm line 13.
BEGIN failed--compilation aborted at lib/Morpheus/Plugin/File.pm line 13.
Compilation failed in require at lib/Morpheus/Bootstrap/Extra.pm line 11.
BEGIN failed--compilation aborted at lib/Morpheus/Bootstrap/Extra.pm line 11.
Compilation failed in require at lib/Morpheus/Bootstrap.pm line 44.

#   Failed test 'morph without arguments prints json'
#   at t/script.t line 21.
#          got: ''
#     expected: '{
#    "bar" : 5
# }
# '
...

(Test failures happen only if CPAN.pm runs in "test"-only mode)

Probably you should use something like (untested) $ENV{PERL5LIB} .= ":lib".

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

1 participant