Perl::Critic::Policy::logicLAB::ProhibitUseLib - simple policy prohibiting the use of 'use lib'
This policy is a policy in the Perl::Critic::logicLAB distribution.
This documentation describes version 0.03
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'
This Policy is not configurable except for the standard options.
Perl::Critic
Perl::Critic::Utils
Readonly
Test::More
Test::Perl::Critic
This distribution has no known incompatibilities.
Currently the policy has no special opinion on FindBin. It only aims to address messy, misleading, buggy and obscuring use of 'use lib'.
Please use Requets Tracker for bug reporting:
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Perl-Critic-logicLAB-ProhibitUseLib
The following policies have been disabled for this distribution
Perl::Crititc::Policy::ValuesAndExpressions::ProhibitConstantPragma
Perl::Crititc::Policy::NamingConventions::Capitalization
See also t/perlcriticrc
---------------------------- ------ ------ ------ ------ ------ ------ ------ 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 ---------------------------- ------ ------ ------ ------ ------ ------ ------
http://perldoc.perl.org/perlrun.html#ENVIRONMENT
http://logiclab.jira.com/wiki/display/OPEN/Development#Development-MakeyourComponentsEnvironmentAgnostic
http://logicLAB.jira.com/wiki/display/PCPMPUL/Home
Jonas B. Nielsen, jonasbn <jonasbn@cpan.org>
<jonasbn@cpan.org>
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.
To install Perl::Critic::Policy::logicLAB::ProhibitUseLib, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl::Critic::Policy::logicLAB::ProhibitUseLib
CPAN shell
perl -MCPAN -e shell install Perl::Critic::Policy::logicLAB::ProhibitUseLib
For more information on module installation, please visit the detailed CPAN module installation guide.