The Perl Toolchain Summit 2025 Needs You: You can help 🙏 Learn more

use strict;
# just like t/01-basic.t, but we have more than one conflicts_module
my $code = path('t', '01-basic.t')->slurp_utf8;
$code =~ s/(\[ 'Test::CheckBreaks' => \{ conflicts_module => )'Moose::Conflicts'/$1\[ qw\(Foo::Conflicts Bar::Conflicts\) \]/;
# note we expect the modules in reverse (alphabetical) order
$code =~ s/'Moose::Conflicts'/qw(Bar::Conflicts Foo::Conflicts)/g;
eval $code;
die $@ if $@;