The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!perl

use strict;
use warnings;

use blib;

use Perl::Critic::TestUtils qw<pcritique_with_violations>;
Perl::Critic::TestUtils::block_perlcriticrc();

my $code = shift || exit;

my @violations = eval {
 pcritique_with_violations('Dynamic::NoIndirect', \$code)
};

if ($@) {
 print $@;
} else {
 print for @violations;
}