Perl::Critic::Policy::Plicease::ProhibitLeadingZeros - Leading zeroes are okay as the first arg to chmod, and other such reasonableness
version 0.02
This is a stupid mistake:
my $x = 1231; my $y = 2345; my $z = 0032;
This is not:
chmod 0700, "secret_file.txt";
Neither is this:
use File::Path qw( mkpath ); mkpath("/foo/bar/baz", 1, 0700);
Nor is this:
use Path::Class qw( dir ); dir()->mkpath(1,0700);
Because mkpath is not a built in (as chmod is), this policy does not differentiate between the mkpath function provided by File::Path or the mkpath method provided by Path::Class::Dir and arbitrary mkpath function or methods that you or someone else might define. Also, there is no way to really check if the object invocant of a mkpath method is really an instance of Path::Class::Dir.
mkpath
chmod
This policy is based largely on the existing in-core policy, and one in the lax bundle, but adds a few exceptions that I find useful.
Graham Ollis <plicease@cpan.org>
This software is copyright (c) 2019 by Graham Ollis.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Perl::Critic::Plicease, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl::Critic::Plicease
CPAN shell
perl -MCPAN -e shell install Perl::Critic::Plicease
For more information on module installation, please visit the detailed CPAN module installation guide.