Perl::Critic::Policy::logicLAB::RequireParamsValidate - simple policy for enforcing use of Params::Validate
This policy is a policy in the Perl::Critic::logicLAB distribution. The policy is themed: logiclab.
This documentation describes version 0.03
# ok
sub foo {
validate(
@_, {
foo => 1, # mandatory
bar => 0, # optional
}
);
#...
}
# not ok
sub bar {
return 1;
}
# ok
sub _baz {
return 1;
}
Invocation of policy:
$ perlcritic --single-policy logicLAB::RequireParamsValidate lib
Explanation:
Use Params::Validate for public facing APIs
Description:
Parameter validation not complying with required standard
No special requirements or environment required.
- Module::Build
- Perl::Critic
- Perl::Critic::Utils
- Perl::Critic::Policy
- Test::More
- Test::Class
- Test::Perl::Critic
- Data::Dumper
- File::Spec
- List::MoreUtils
- Params::Validate
This distribution has no known incompatibilities.
There are no known bugs or limitations
The following policies have been disabled for this distribution
-
Perl::Critic::Policy::ValuesAndExpressions::ProhibitConstantPragma
Constants are good, - see the link below.
See also t/perlcriticrc
Coverage test executed the following way, the coverage report is based on the version described in this documentation (see "VERSION").
./Build testcover
---------------------------- ------ ------ ------ ------ ------ ------ ------
File stmt bran cond sub pod time total
---------------------------- ------ ------ ------ ------ ------ ------ ------
.../RequireParamsValidate.pm 100.0 100.0 66.7 100.0 100.0 100.0 98.6
Total 100.0 100.0 66.7 100.0 100.0 100.0 98.6
---------------------------- ------ ------ ------ ------ ------ ------ ------
- Jonas B. Nielsen, jonasbn
<jonasbn@cpan.org>
- Jeffrey Ryan Thalhammer (THALJEF) and the Perl::Critic contributors for Perl::Critic
Copyright (c) 2013-2015 Jonas B. Nielsen, jonasbn. All rights reserved.
Perl::Critic::Policy::logicLAB::RequirePackageNamePattern; is released under the Artistic License 2.0
The distribution is licensed under the Artistic License 2.0, as specified by the license file included in this distribution.