With the following code, this policy throws an exception because there's no next sibling:
#!/usr/bin/env perl
use Try::Tiny;
my $x = {};
if ( !try { $x->isa('Foo') } ) {
print "Not a Foo.\n";
}
Error:
brianc64 ok % perlcritic --single-policy TryTiny::RequireCatch example.pl
Fatal error while critiquing "example.pl": Can't call method "content" without a package or object reference at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Perl/Critic/Policy/TryTiny/RequireCatch.pm line 56.
With the following code, this policy throws an exception because there's no next sibling:
Error: