Perl::Critic::Community::Utils(3pm)

Perl::Critic::Community::Utils3pm

Utility functions for the community policy set

Overview

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

Functions

is_empty_return

 my $bool = is_empty_return($elem);

Tests whether a PPI::Token::Word "return" element represents an empty "return" statement. This function returns false for return().

is_structural_block

 my $bool = is_structural_block($elem);

Tests whether a PPI::Structure::Block element is structural, and does not introduce a new calling context. This function currently only returns true for blocks in compound statements such as "if" and "foreach", but may be extended to cover more cases in the future.

Releases

2 releases since Debian 12 (Bookworm); the text changed 1 time.

  1. 12
  2. 13

Author

Dan Book, "[email protected]"

From libperl-critic-community-perl 1.0.4-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.