#!perl

if (!require Test::Perl::Critic) {
    Test::More::plan(
        skip_all => "Test::Perl::Critic required for testing PBP compliance"
    );
}

# As of Perl 5.36.0 we allow sub signatures as they are no longer experimental.
#
# perlcritic v1.150 complains about sub prototypes and refers to page 194 of PBP,
# however PBP dates back to 2005, modern version of perl sub signatures was introduced
# as experimental in 5.19.9 back in 2014, and they became mainline in perl 5.36.0.
#
# Signatures are not prototypes, however perlcritic v1.150 misidentifies them as prototypes,
# so we exclude them until perlcritic catches up.
#
# FIXME: remove exclusion once perlcritic is up to date with perl 5.36.0

Test::Perl::Critic->import(-exclude => ['ProhibitSubroutinePrototypes']);

Test::Perl::Critic::all_critic_ok();
