The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

Search results for "module:Perl::Community"

Perl::Critic::Community - Community-inspired Perl::Critic policies River stage one • 8 direct dependents • 9 total dependents

A set of Perl::Critic policies to enforce the practices generally recommended by subsets of the Perl community, particularly on IRC. Formerly known as Perl::Critic::Freenode. Because this policy "theme" is designed to be used with zero configuration ...

DBOOK/Perl-Critic-Community-v1.0.3 - 24 Jul 2022 06:28:31 UTC

Perl::Critic::Community::Utils - Utility functions for the Community policy set River stage one • 8 direct dependents • 9 total dependents

This module contains utility functions for use in Perl::Critic::Community policies. All functions are exportable on demand....

DBOOK/Perl-Critic-Community-v1.0.3 - 24 Jul 2022 06:28:31 UTC

Perl::Critic::Policy::Community::Each - Don't use each to iterate through a hash River stage one • 8 direct dependents • 9 total dependents

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-Community-v1.0.3 - 24 Jul 2022 06:28:31 UTC

Perl::Critic::Policy::Community::Threads - Interpreter-based threads are officially discouraged River stage one • 8 direct dependents • 9 total dependents

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-Community-v1.0.3 - 24 Jul 2022 06:28:31 UTC

Perl::Critic::Policy::Community::ModPerl - Don't use mod_perl to write web applications River stage one • 8 direct dependents • 9 total dependents

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-Community-v1.0.3 - 24 Jul 2022 06:28:31 UTC

Perl::Critic::Policy::Community::DollarAB - Don't use $a or $b as variable names outside sort River stage one • 8 direct dependents • 9 total dependents

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-Community-v1.0.3 - 24 Jul 2022 06:28:31 UTC

Perl::Critic::Policy::Community::OpenArgs - Always use the three-argument form of open River stage one • 8 direct dependents • 9 total dependents

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-Community-v1.0.3 - 24 Jul 2022 06:28:31 UTC

Perl::Critic::Policy::Community::Wantarray - Don't write context-sensitive functions using wantarray River stage one • 8 direct dependents • 9 total dependents

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-Community-v1.0.3 - 24 Jul 2022 06:28:31 UTC

Perl::Critic::Policy::Community::Prototypes - Don't use function prototypes River stage one • 8 direct dependents • 9 total dependents

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-Community-v1.0.3 - 24 Jul 2022 06:28:31 UTC

Perl::Critic::Policy::Community::LoopOnHash - Don't loop over hashes River stage one • 8 direct dependents • 9 total dependents

It's possible to loop over a hash as if it was a list, which results in alternating between the keys and values of the hash. Often, the intent was instead to loop over either the keys or the values of the hash. foreach my $foo (%hash) { ... } # not o...

DBOOK/Perl-Critic-Community-v1.0.3 - 24 Jul 2022 06:28:31 UTC

Perl::Critic::Policy::Community::EmptyReturn - Don't use return with no arguments River stage one • 8 direct dependents • 9 total dependents

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-Community-v1.0.3 - 24 Jul 2022 06:28:31 UTC

Perl::Critic::Policy::Community::POSIXImports - Don't use POSIX without specifying an import list River stage one • 8 direct dependents • 9 total dependents

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-Community-v1.0.3 - 24 Jul 2022 06:28:31 UTC

Perl::Critic::Policy::Community::WarningsSwitch - Scripts should not use the -w switch on the shebang line River stage one • 8 direct dependents • 9 total dependents

The "-w" switch enables warnings globally in a perl program, including for any modules that did not explicitly enable or disable any warnings. The "-W" switch enables warnings even for modules that explicitly disabled them. The primary issue with thi...

DBOOK/Perl-Critic-Community-v1.0.3 - 24 Jul 2022 06:28:31 UTC

Perl::Critic::Policy::Community::StrictWarnings - Always use strict and warnings, or a module that imports these River stage one • 8 direct dependents • 9 total dependents

The strict and warnings pragmas help avoid many common pitfalls such as misspellings, scoping issues, and performing operations on undefined values. Warnings can also alert you to deprecated or experimental functionality. The pragmas may either be ex...

DBOOK/Perl-Critic-Community-v1.0.3 - 24 Jul 2022 06:28:31 UTC

Perl::Critic::Policy::Community::OverloadOptions - Don't use overload without specifying a bool overload and enabling fallback River stage one • 8 direct dependents • 9 total dependents

The overload module allows an object class to specify behavior for an object used in various operations. However, when activated it enables additional behavior by default: it autogenerates overload behavior for operators that are not specified, and i...

DBOOK/Perl-Critic-Community-v1.0.3 - 24 Jul 2022 06:28:31 UTC

Perl::Critic::Policy::Community::ArrayAssignAref - Don't assign an anonymous arrayref to an array River stage one • 8 direct dependents • 9 total dependents

A common mistake is to assign values to an array but use arrayref brackets "[]" rather than parentheses "()". This results in the array containing one element, an arrayref, which is usually unintended. If intended, the arrayref brackets can be wrappe...

DBOOK/Perl-Critic-Community-v1.0.3 - 24 Jul 2022 06:28:31 UTC

Perl::Critic::Policy::Community::AmpersandSubCalls - Don't use & to call subroutines River stage one • 8 direct dependents • 9 total dependents

Ampersands ("&") were once needed to call subroutines, but in modern Perl they are not only unnecessary but actually change the behavior from what you may expect. Calling a subroutine with an ampersand ignores the subroutine's prototype if any, which...

DBOOK/Perl-Critic-Community-v1.0.3 - 24 Jul 2022 06:28:31 UTC

Perl::Critic::Policy::Community::DeprecatedFeatures - Avoid features that have been deprecated or removed from Perl River stage one • 8 direct dependents • 9 total dependents

While Perl::Critic::Policy::Community::StrictWarnings will expose usage of deprecated or removed features when a modern perl is used, this policy will detect such features in use regardless of perl version, to assist in keeping your code modern and f...

DBOOK/Perl-Critic-Community-v1.0.3 - 24 Jul 2022 06:28:31 UTC

Perl::Critic::Policy::Community::DiscouragedModules - Various modules discouraged from use River stage one • 8 direct dependents • 9 total dependents

Various modules are discouraged by some subsets of the community, for various reasons which may include: buggy behavior, cruft, performance problems, maintainer issues, or simply better modern replacements. This is a high severity complement to Perl:...

DBOOK/Perl-Critic-Community-v1.0.3 - 24 Jul 2022 06:28:31 UTC

Perl::Critic::Policy::Community::BarewordFilehandles - Don't use bareword filehandles other than built-ins River stage one • 8 direct dependents • 9 total dependents

Bareword filehandles are allowed in "open()" as a legacy feature, but will use a global package variable. Instead, use a lexical variable with "my" so that the filehandle is scoped to the current block, and will be automatically closed when it goes o...

DBOOK/Perl-Critic-Community-v1.0.3 - 24 Jul 2022 06:28:31 UTC
68 results (0.044 seconds)