Perl::Critic::Policy::TryTiny::RequireCatch - Always include a "catch" block when using "try"
version 0.003
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 specified.
The programmer should always include a catch block. The block may be empty, to indicate that exceptions are deliberately ignored.
use Try::Tiny; try { # ... } catch { # ... } finally { # ... };
This policy assumes that Try::Tiny is being used, and it doesn't run if it can't find it being imported.
This Policy is not configurable except for the standard options.
David D Lowe <flimm@cpan.org>
This software is copyright (c) 2017 by Lokku <cpan@lokku.com>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Perl::Critic::Lokku, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl::Critic::Lokku
CPAN shell
perl -MCPAN -e shell install Perl::Critic::Lokku
For more information on module installation, please visit the detailed CPAN module installation guide.