The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
use strict;
use warnings;
use Test::More;

BEGIN {
	@::warn = ();
	$SIG{__WARN__} = sub {push @::warn, @_} unless $::NO_PLAN;
}

use List::Pairwise ();

unless ($::NO_PLAN) {
	plan tests => 3;
	List::Pairwise::mapp {$a, $b} (1..10);
	ok("@::warn", 'warnings for $a and $b when not used in module but not imported');
	
	for (0, 1) {
		like($::warn[$_], qr/Name "main::([ab])" used only once: possible typo at /, "warning $_");
	}
}