diff --git a/dist.ini b/dist.ini index b185f385..3d31202a 100644 --- a/dist.ini +++ b/dist.ini @@ -26,6 +26,9 @@ Task::Weaken = 0 [Prereqs / TestRequires] Test::More = 0.96 +[Breaks] +Perl::Critic = < 1.122 + [DynamicPrereqs] -body = requires('File::Spec', is_os('MSWin32') ? '3.2701' : '0.84'); -body = requires('IO::String') if $] < '5.008000'; @@ -64,6 +67,7 @@ filename = xt/author/kwalitee.t :version = 0.022 verify_prereqs = 1 version_extractor = ExtUtils::MakeMaker +[Test::CheckBreaks] [Test::Portability] ;[Test::CleanNamespaces] diff --git a/xt/author/check-breaks.t b/xt/author/check-breaks.t new file mode 100644 index 00000000..24e4ff9c --- /dev/null +++ b/xt/author/check-breaks.t @@ -0,0 +1,20 @@ +use strict; +use warnings; + +use Test::More 0.88; + +use CPAN::Meta 2.120900; + +SKIP: { + skip 'no META.json in source tree (requires dzil build)', 1 + if not -f 'META.json'; + + my $meta = CPAN::Meta->load_file('META.json'); + my $breaks = $meta->custom('x_breaks') || {}; + + ok( exists $breaks->{'Perl::Critic'}, + 'x_breaks declares Perl::Critic < 1.122 (incompatible with PPI >= 1.218 operator token changes)' + ); +} + +done_testing;