https://github.com/jonasbn/pcpmpul
Perl::Critic::Policy::logicLAB::ProhibitUseLib - simple policy prohibiting the use of 'use lib'
https://github.com/jonasbn/pcpmpul
hacktoberfest perl perl-critic perl5 policy
Last synced: 10 months ago
JSON representation
Perl::Critic::Policy::logicLAB::ProhibitUseLib - simple policy prohibiting the use of 'use lib'
- Host: GitHub
- URL: https://github.com/jonasbn/pcpmpul
- Owner: jonasbn
- Created: 2013-12-05T13:59:39.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2021-05-18T04:55:00.000Z (about 5 years ago)
- Last Synced: 2025-08-23T06:10:05.580Z (10 months ago)
- Topics: hacktoberfest, perl, perl-critic, perl5, policy
- Language: Perl
- Homepage:
- Size: 1.58 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.mkdn
- Changelog: Changes
- Contributing: CONTRIBUTING.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](http://badge.fury.io/pl/Perl-Critic-Policy-logicLAB-ProhibitUseLib)
[](https://travis-ci.org/jonasbn/pcpmpul)
[](https://coveralls.io/r/jonasbn/pcpmpul)
# NAME
Perl::Critic::Policy::logicLAB::ProhibitUseLib - simple policy prohibiting the use of 'use lib'
# AFFILIATION
This policy is a policy in the [Perl::Critic::logicLAB](https://metacpan.org/pod/Perl::Critic::logicLAB) distribution.
# VERSION
This documentation describes version 0.03
# DESCRIPTION
The 'use lib' statement, hardcodes the include path to be used. This can give
issues when moving modules and scripts between diverse environments.
use lib '/some/path'; #not ok
use lib qw(/you/do/not/want/to/go/down/this/path /or/this); #not ok
Instead use the environment variable PERL5LIB
#bash
export PERL5LIB='/some/path/some/where'
#tcsh and csh
setenv PERL5LIB '/some/path/some/where'
# CONFIGURATION AND ENVIRONMENT
This Policy is not configurable except for the standard options.
# DEPENDENCIES AND REQUIREMENTS
- [Perl::Critic](https://metacpan.org/pod/Perl::Critic)
- [Perl::Critic::Utils](https://metacpan.org/pod/Perl::Critic::Utils)
- [Readonly](https://metacpan.org/pod/Readonly)
- [Test::More](https://metacpan.org/pod/Test::More)
- [Test::Perl::Critic](https://metacpan.org/pod/Test::Perl::Critic)
# INCOMPATIBILITIES
This distribution has no known incompatibilities.
# BUGS AND LIMITATIONS
Currently the policy has no special opinion on [FindBin](https://metacpan.org/pod/FindBin). It only aims to
address messy, misleading, buggy and obscuring use of 'use lib'.
# BUG REPORTING
Please use Requets Tracker for bug reporting:
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Perl-Critic-logicLAB-ProhibitUseLib
# TEST AND QUALITY
The following policies have been disabled for this distribution
- [Perl::Crititc::Policy::ValuesAndExpressions::ProhibitConstantPragma](https://metacpan.org/pod/Perl::Crititc::Policy::ValuesAndExpressions::ProhibitConstantPragma)
- [Perl::Crititc::Policy::NamingConventions::Capitalization](https://metacpan.org/pod/Perl::Crititc::Policy::NamingConventions::Capitalization)
See also `t/perlcriticrc`
## TEST COVERAGE
---------------------------- ------ ------ ------ ------ ------ ------ ------
File stmt bran cond sub pod time total
---------------------------- ------ ------ ------ ------ ------ ------ ------
...ogicLAB/ProhibitUseLib.pm 100.0 50.0 n/a 100.0 100.0 100.0 95.3
Total 100.0 50.0 n/a 100.0 100.0 100.0 95.3
---------------------------- ------ ------ ------ ------ ------ ------ ------
# SEE ALSO
- [http://perldoc.perl.org/perlrun.html#ENVIRONMENT](http://perldoc.perl.org/perlrun.html#ENVIRONMENT)
- [http://logiclab.jira.com/wiki/display/OPEN/Development#Development-MakeyourComponentsEnvironmentAgnostic](http://logiclab.jira.com/wiki/display/OPEN/Development#Development-MakeyourComponentsEnvironmentAgnostic)
- [http://logicLAB.jira.com/wiki/display/PCPMPUL/Home](http://logicLAB.jira.com/wiki/display/PCPMPUL/Home)
# AUTHOR
- Jonas B. Nielsen, jonasbn ``
# LICENSE AND COPYRIGHT
Copyright (c) 2009-2014 Jonas B. Nielsen. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.