Perl::Critic::Policy - Base class for all Policy modules.

Perl::Critic::Policy is the abstract base class for all Policy objects. If you're developing your own Policies, your job is to implement and override its methods in a subclass. To work with the Perl::Critic engine, your implementation must behave as ...

THALJEF/Perl-Critic-1.126 - 11 Aug 2015 06:48:47 GMT

Test::Perl::Critic::Policy - A framework for testing your custom Policies

This module provides a framework for function-testing your custom Perl::Critic::Policy modules. Policy testing usually involves feeding it a string of Perl code and checking its behavior. In the old days, those strings of Perl code were mixed directl...

THALJEF/Perl-Critic-1.126 - 11 Aug 2015 06:48:47 GMT

Perl::Critic::Policy::Perlsecret - Prevent perlsecrets entering your codebase

This policy checks for perlsecret operators in your code and warns you about them. You can override the secrets that are allowed or disallowed using the parameters "allow_secrets" and "disallow_secrets". The default is to simply disallow everything. ...

LANCEW/Perl-Critic-Policy-Perlsecret-0.0.11 - 05 Jan 2017 20:45:37 GMT

Perl::Critic::Policy::CompileTime - Provide Perl::Critic support for hunting down compile-time side effects

Perl::Critic::Policy::CompileTime is a Perl::Critic module which allows one to quickly find code in a large codebase or installation which may not run the way one expects when compiled by the Perl compiler, B::C. With the help of the underlying code ...

XAN/Perl-Critic-Policy-CompileTime-0.03 - 26 Sep 2014 20:34:02 GMT

Perl::Critic::Policy::HTTPCookies - Avoid using HTTP::Cookies

This module provides Perl::Critic policies to detect the use of HTTP::Cookies. HTTP::Cookies takes a very lenient approach to setting cookies that does not work well with today's Internet: <https://github.com/libwww-perl/http-cookies/pull/7> Consider...

TOMHUKINS/Perl-Critic-Policy-HTTPCookies-0.53 - 04 Jan 2017 18:50:14 GMT

Perl::Critic::Policy::Freenode::Each - Don't use each to iterate through a hash

The "each()" function relies on an iterator internal to a hash (or array), which is the same iterator used by "keys()" and "values()". So deleting or adding hash elements during iteration, or just calling "keys()" or "values()" on the hash, will caus...

DBOOK/Perl-Critic-Freenode-0.020 - 16 May 2017 00:45:20 GMT

Perl::Critic::Policy::Freenode::ModPerl - Don't use mod_perl to write web applications

mod_perl <http://perl.apache.org/> is an embedded Perl interpreter for the Apache <http://www.apache.org/> web server. It allows you to dynamically configure and mod Apache. It is not a generally good solution for writing web applications. Frameworks...

DBOOK/Perl-Critic-Freenode-0.020 - 16 May 2017 00:45:20 GMT

Perl::Critic::Policy::Freenode::Threads - Interpreter-based threads are officially discouraged

Perl interpreter threads are officially discouraged. They were created to emulate "fork()" in Windows environments, and are not fast or lightweight as one may expect. Non-blocking code or I/O can be easily parallelized by using an event loop such as ...

DBOOK/Perl-Critic-Freenode-0.020 - 16 May 2017 00:45:20 GMT

Perl::Critic::Policy::Freenode::DollarAB - Don't use $a or $b as variable names outside sort

The special variables $a and $b are reserved for "sort()" and similar functions which assign to them to iterate over pairs of values. These are global variables, and declaring them as lexical variables with "my" to use them outside this context can b...

DBOOK/Perl-Critic-Freenode-0.020 - 16 May 2017 00:45:20 GMT

Perl::Critic::Policy::Freenode::OpenArgs - Always use the three-argument form of open

The "open()" function may be called in a two-argument form where the filename is parsed to determine the mode of opening, which may include piping input or output. (In the one-argument form, this filename is retrieved from a global variable, but the ...

DBOOK/Perl-Critic-Freenode-0.020 - 16 May 2017 00:45:20 GMT

Perl::Critic::Policy::TryTiny::RequireUse - Requires that code which utilizes Try::Tiny actually use()es it.

A common problem with Try::Tiny is forgetting to use the module in the first place. For example: perl -e 'try { print "hello" } catch { print "world" }' Can't call method "catch" without a package or object reference at -e line 1. helloworld If you f...

BLUEFEET/Perl-Critic-Policy-TryTiny-RequireUse-0.02 - 21 Jun 2016 15:32:43 GMT

Perl::Critic::Policy::Freenode::Wantarray - Don't write context-sensitive functions using wantarray

Context-sensitive functions, while one way to write functions that DWIM (Do What I Mean), tend to instead lead to unexpected behavior when the function is accidentally used in a different context, especially if the function's behavior changes signifi...

DBOOK/Perl-Critic-Freenode-0.020 - 16 May 2017 00:45:20 GMT

Perl::Critic::Policy::Dynamic::NoIndirect - Perl::Critic policy against indirect method calls.

This Perl::Critic dynamic policy reports any use of indirect object syntax with a 'stern' severity. It's listed under the 'dynamic' and 'maintenance' themes. Since it wraps around indirect, it needs to compile the audited code and as such is implemen...

VPIT/Perl-Critic-Policy-Dynamic-NoIndirect-0.06 - 25 Aug 2011 14:55:26 GMT

Perl::Critic::Policy::Freenode::Prototypes - Don't use function prototypes

Function prototypes are primarily a hint to the Perl parser for parsing the function's argument list. They are not a way to validate or count the arguments passed to the function, and will cause confusion if used this way. Often, the prototype can si...

DBOOK/Perl-Critic-Freenode-0.020 - 16 May 2017 00:45:20 GMT

Perl::Critic::Policy::Bangs::ProhibitNoPlan - Know what you're going to test.

Test::More should be given a plan indicting the number of tests to be run. This policy searches for instances of Test::More called with "no_plan"....

PETDANCE/Perl-Critic-Bangs-1.10 - 20 Aug 2012 20:02:43 GMT

Perl::Critic::Policy::Freenode::EmptyReturn - Don't use return with no arguments

Context-sensitive functions, while one way to write functions that DWIM (Do What I Mean), tend to instead lead to unexpected behavior when the function is accidentally used in a different context, especially if the function's behavior changes signifi...

DBOOK/Perl-Critic-Freenode-0.020 - 16 May 2017 00:45:20 GMT

Perl::Critic::Policy::TryTiny::RequireCatch - Always include a "catch" block when using "try"

Programmers from other programming languages may assume that the following code does not swallow exceptions: use Try::Tiny; try { # ... } finally { # ... }; However, Try::Tiny's implementation always swallows exceptions unless a catch block has been ...

FLIMM/Perl-Critic-Lokku-0.002 - 02 Mar 2015 16:47:32 GMT

Perl::Critic::Policy::Tics::ProhibitUseBase - do not use base.pm

use base qw(Baseclass); You've seen that a hundred times, right? That doesn't mean that it's a good idea. It screws with $VERSION, it alters (for the worse) the exceptions reported by failure-to-require, it doesn't let you call the base class's "impo...

RJBS/Perl-Critic-Tics-0.009 - 28 Jul 2014 19:26:56 GMT

Perl::Critic::Policy::Freenode::POSIXImports - Don't use POSIX without specifying an import list

The POSIX module imports hundreds of symbols (functions and constants) by default for backwards compatibility reasons. To avoid this, and to assist in finding where functions have been imported from, specify the symbols you want to import explicitly ...

DBOOK/Perl-Critic-Freenode-0.020 - 16 May 2017 00:45:20 GMT

Perl::Critic::Policy::Tics::ProhibitLongLines - 80 x 40 for life!

Please keep your code to about eighty columns wide, the One True Terminal Width. Going over that occasionally is okay, but only once in a while. This policy always throws a violation for extremely long lines. It will also throw a violation if there a...

RJBS/Perl-Critic-Tics-0.009 - 28 Jul 2014 19:26:56 GMT

348 results (0.111 seconds)