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

Remove unsafe/useless 'use lib' from codebase #28

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

Conversation

atoomic
Copy link

@atoomic atoomic commented Dec 20, 2018

Unit tests do not need to add 'use lib "lib"',
running 'prove -l' will automatically add it for you.

Concerning the two other scripts, it's unsafe to add 'lib'
to @INC, as this could result from loading .pm files from
any location. (depending from where the command is run and
which user is running it).

Once installed, it will use the default Perl @INC locations.
For development purpose, adding a -Ilib is probably better.

Using FindBin can be aceptable but also leaves a hole as the
lib directory might belong to a different user in production.

Note: this commit sit on top of the travis changes so I can be sure I'm not braking unit tests

This is a draft, we can probably find
some extra entries to add there.
Unit tests do not need to add 'use lib "lib"',
running 'prove -l' will automatically add it for you.

Concerning the two other scripts, it's unsafe to add 'lib'
to @inc, as this could result from loading .pm files from
any location. (depending from where the command is run and
which user is running it).

Once installed, it will use the default Perl @inc locations.
For development purpose, adding a -Ilib is probably better.

Using FindBin can be aceptable but also leaves a hole as the
lib directory might belong to a different user in production.
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.

1 participant