---
name: "Perl::Critic::Community::Utils"
section: "3pm"
platform: "linux"
package: "libperl-critic-community-perl"
version: "1.0.4-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Perl::Critic::Community::Utils"
---

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

Utility functions for the Community policy set

## NAME

Perl::Critic::Community::Utils - Utility functions for the Community policy set

## DESCRIPTION

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.

## AUTHOR

Dan Book, `"dbook@cpan.org"`

## COPYRIGHT AND LICENSE

Copyright 2015, Dan Book.

This library is free software; you may redistribute it and/or modify it under the terms of the Artistic License version 2.0.

## SEE ALSO

Perl::Critic, Perl::Critic::Community
