Perl::Critic::Policy::Subroutines::ProhibitNestedSubs - sub never { sub correct {} }. River stage three • 122 direct dependents • 472 total dependents

Attention would-be clever Perl writers (including Younger RJBS): This does not do what you think: sub do_something { ... sub do_subprocess { ... } ... } "do_subprocess()" is global, despite where it is declared. Either write your subs without nesting...

PETDANCE/Perl-Critic-1.138 - 24 Jan 2020 21:54:57 UTC

Perl::Critic::Policy::Modules::RequireExplicitPackage - Always make the package explicit. River stage three • 122 direct dependents • 472 total dependents

In general, the first statement of any Perl module or library should be a "package" statement. Otherwise, all the code that comes before the "package" statement is getting executed in the caller's package, and you have no idea who that is. Good encap...

PETDANCE/Perl-Critic-1.138 - 24 Jan 2020 21:54:57 UTC

Perl::Critic::Policy::InputOutput::RequireCheckedOpen - Write < my $error = open $fh, $mode, $filename; > instead of < open $fh, $mode, $filename; >. River stage three • 122 direct dependents • 472 total dependents

The perl builtin I/O function "open" returns a false value on failure. That value should always be checked to ensure that the open was successful. my $error = open( $filehandle, $mode, $filename ); # ok open( $filehandle, $mode, $filename ) or die "u...

PETDANCE/Perl-Critic-1.138 - 24 Jan 2020 21:54:57 UTC

Perl::Critic::Policy::logicLAB::RequireParamsValidate - simple policy for enforcing use of Params::Validate River stage one • 1 direct dependent • 2 total dependents

JONASBN/Perl-Critic-Policy-logicLAB-RequireParamsValidate-0.03 - 27 Aug 2015 21:05:32 UTC

Perl::Critic::Policy::logicLAB::ProhibitShellDispatch - simple policy prohibiting shell dispatching River stage one • 2 direct dependents • 3 total dependents

Using Perl builtins to dispatch to external shell commands are not particularly portable. This policy aims to assist the user in identifying these critical spots in the code and exchange these for pure-perl solutions and CPAN distributions. The polic...

JONASBN/Perl-Critic-Policy-logicLAB-ProhibitShellDispatch-0.05 - 21 Aug 2015 18:49:01 UTC

Perl::Critic::Policy::CodeLayout::TabIndentSpaceAlign - Use tabs for indenting, spaces for aligning. River stage one • 2 direct dependents • 2 total dependents

Hard tabs are a perfectly fine way to indent code for accessibility and usability purposes, allowing different users to tweak indentation settings to suit their needs and habits. However, hard tabs should not be used for formatting / aligning, as thi...

AUBERTG/Perl-Critic-Policy-CodeLayout-TabIndentSpaceAlign-v1.1.0 - 23 Mar 2017 06:13:35 UTC

Perl::Critic::Policy::Bangs::ProhibitCommentedOutCode - Commented-out code is usually noise. It should be removed. River stage two • 6 direct dependents • 11 total dependents

Commented-out code is often a sign of a place where the developer is unsure of how the code should be. If historical information about the code is important, then keep it in your version control system....

PETDANCE/Perl-Critic-Bangs-1.12 - 25 May 2017 04:09:31 UTC

Perl::Critic::Policy::TooMuchCode::ProhibitLargeBlock - Find oversized blocks River stage zero No dependents

This policy scan for large code blocks of the following type. map { ... }; grep { ... }; do { ... }; By default a large block is one with more than 10 statements. If you need an other limit, you can set the parameter "block_statement_count_limit". Fo...

GUGOD/Perl-Critic-TooMuchCode-0.13 - 16 Dec 2019 01:10:34 UTC

Perl::Critic::Policy::OTRS::ProhibitSomeCoreFunctions - Some core functions should not be used River stage one • 1 direct dependent • 1 total dependent

RENEEB/Perl-Critic-OTRS-0.09 - 23 Jan 2019 08:26:11 UTC

Perl::Critic::Policy::Storable::ProhibitStoreOrFreeze - do not use store or freeze in Storable.pm River stage one • 2 direct dependents • 6 total dependents

Imagine the scenario, you've got some Perl code running on a server that uses Storable's freeze and thaw to serialise Perl data to and from a shared store. The load on the server increases so you add another one to share the work. The two of them are...

MATTD/Perl-Critic-Storable-0.01 - 11 Aug 2008 09:02:00 UTC

Perl::Critic::Policy::Bangs::ProhibitDebuggingModules - Prohibit loading of debugging modules like Data::Dumper River stage two • 6 direct dependents • 11 total dependents

This policy prohibits loading common debugging modules like Data::Dumper. While such modules are incredibly useful during development and debugging, they should probably not be loaded in production use. If this policy is violated, it probably means y...

PETDANCE/Perl-Critic-Bangs-1.12 - 25 May 2017 04:09:31 UTC

Perl::Critic::Policy::Bangs::ProhibitBitwiseOperators - Bitwise operators are usually accidentally used instead of logical boolean operators. River stage two • 6 direct dependents • 11 total dependents

Bitwise operators are usually accidentally used instead of logical boolean operators. Instead of writing "$a || $b", people will often write "$a | $b", which is not correct....

PETDANCE/Perl-Critic-Bangs-1.12 - 25 May 2017 04:09:31 UTC

Perl::Critic::Policy::Subroutines::RequireFinalReturn - End every path through a subroutine with an explicit return statement. River stage three • 122 direct dependents • 472 total dependents

Require all subroutines to terminate explicitly with one of the following: "return", "carp", "croak", "die", "exec", "exit", "goto", or "throw". Subroutines without explicit return statements at their ends can be confusing. It can be challenging to d...

PETDANCE/Perl-Critic-1.138 - 24 Jan 2020 21:54:57 UTC

Perl::Critic::Policy::Objects::ProhibitIndirectSyntax - Prohibit indirect object call syntax. River stage three • 122 direct dependents • 472 total dependents

Indirect object syntax is commonly used in other object-oriented languages for instantiating objects. Perl allows this, but to say that it supports it may be going too far. Instead of writing my $foo = new Foo; it is preferable to write my $foo = Foo...

PETDANCE/Perl-Critic-1.138 - 24 Jan 2020 21:54:57 UTC

Perl::Critic::Policy::InputOutput::ProhibitTwoArgOpen - Write < open $fh, q{<}, $filename; > instead of < open $fh, "<$filename"; >. River stage three • 122 direct dependents • 472 total dependents

The three-argument form of "open" (introduced in Perl 5.6) prevents subtle bugs that occur when the filename starts with funny characters like '>' or '<'. The IO::File module provides a nice object-oriented interface to filehandles, which I think is ...

PETDANCE/Perl-Critic-1.138 - 24 Jan 2020 21:54:57 UTC

Perl::Critic::Policy::Documentation::RequireLinkedURLs - use Lltgt markup on URLs in POD River stage two • 4 direct dependents • 14 total dependents

This policy is part of the "Perl::Critic::Pulp" add-on. It asks you to put "L<>" markup on URLs in POD text in Perl 5.8 and higher. use 5.008; =head1 HOME PAGE http://foo.org/mystuff/index.html # bad L<http://foo.org/mystuff/index.html> # good "L<>" ...

KRYDE/Perl-Critic-Pulp-97 - 19 Oct 2019 01:22:54 UTC

Perl::Critic::Policy::Compatibility::PodMinimumVersion - check Perl version declared against POD features used River stage two • 4 direct dependents • 14 total dependents

This policy is part of the "Perl::Critic::Pulp" add-on. It checks that the POD features you use don't exceed your target Perl version as indicated by "use 5.008" etc. use 5.005; =pod C<< something >> # bad, double angles needs 5.006 POD doesn't affec...

KRYDE/Perl-Critic-Pulp-97 - 19 Oct 2019 01:22:54 UTC

Perl::Critic::Policy::Freenode::PackageMatchesFilename - Module files should declare a package matching the filename River stage one • 4 direct dependents • 5 total dependents

Perl modules are normally loaded by "require" (possibly via "use" or "no"). When given a module name, "require" will translate this into a filename and then load whatever that file contains. The file doesn't need to actually contain a package matchin...

DBOOK/Perl-Critic-Freenode-0.032 - 11 Nov 2019 16:10:10 UTC

Perl::Critic::Policy::Freenode::LexicalForeachIterator - Don't use undeclared foreach loop iterators River stage one • 4 direct dependents • 5 total dependents

It's possible to use a variable that's already been declared as the iterator for a foreach loop, but this will localize the variable to the loop and its value will be reverted after the loop is done. Always declare the loop iterator in the lexical sc...

DBOOK/Perl-Critic-Freenode-0.032 - 11 Nov 2019 16:10:10 UTC

Perl::Critic::Policy::TryTiny::RequireBlockTermination - Requires that try/catch/finally blocks are properly terminated. River stage zero No dependents

A common problem with Try::Tiny is forgetting to put a semicolon after the try/catch/finally block which can lead to difficul to debug issues. While Try::Tiny does do its best to detect this issue it cannot if the code after the block returns an empt...

BLUEFEET/Perl-Critic-Policy-TryTiny-RequireBlockTermination-0.03 - 03 Mar 2019 18:51:40 UTC

434 results (0.042 seconds)