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

Bad advice in README #4

Open
dolmen opened this issue Jul 2, 2013 · 2 comments
Open

Bad advice in README #4

dolmen opened this issue Jul 2, 2013 · 2 comments

Comments

@dolmen
Copy link

dolmen commented Jul 2, 2013

The installation instructions says:

sudo perl -MCPAN -e 'force install DBI'

This is very bad practice because:

  • this will probably corrupt the packages handled by the system (usually on Linux systems). Instead, suggest to the user to use a local::lib-based environment.
  • force install is a bad practice. If DBI doesn't install, there is a good reason that must be fixed, either on the system or in DBI.
@philip-stoev
Copy link
Contributor

Thank you for the feedback. I will fix the README to advise an upgrade via the OS-specific mechanism. If no recent DBI package is available this way, then uninstall the one provided by the OS and perform a non-forced install via CPAN. Would you agree that such advice would be safe to give?

@dolmen
Copy link
Author

dolmen commented Jul 8, 2013

If the sysadmin installs DBI from the CPAN and then installs DBI from the package manager, the one from the package manager will override the one from the CPAN. So that is not a better solution.

So, no, this is not a good advice either.
The proper way is to avoid installing Perl modules in a place that is handled by the OS and to set PERL5LIB to point to that area. local::lib is an helper module for that task.
Another solution is to avoid to use /usr/bin/perl to run applications and instead to build your own perl and to deploy it with your application.

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