Subject: | Fails with perl < 5.22 |
As per subject. Best illustrated with the matrix: http://matrix.cpantesters.org/?dist=App-Cleo-Patra%200.001
Sample fail report: http://www.cpantesters.org/cpan/report/4884e6b0-b1ff-11e8-a6f7-dd1706c27539
Diagnostics: Unknown warnings category 'redundant' at /home/cpansand/.cpan/build/2018090614/App-Cleo-Patra-0.001-2/blib/lib/App/Cleo/Patra.pm line 95.
The referenced line as link: https://metacpan.org/source/BORISD/App-Cleo-Patra-0.001/lib/App/Cleo/Patra.pm#L95
Potential idiomatic workaround could be the if module that comes with perl. Something like this:
my $HAS_WARNINGS_REDUNDANT;
BEGIN {
$HAS_WARNINGS_REDUNDANT = eval q{ use warnings "redundant"; 1 };
}
no if $HAS_WARNINGS_REDUNDANT, warnings => 'redundant';