##
my $orig_warn = $SIG{__WARN__};
$SIG{__WARN__} = $orig_warn
? sub { my $w = shift; $orig_warn->($w) if $w !~ /::[ab]" used only once/ }
: sub { my $w = shift; warn $w if $w !~ /::[ab]" used only once/ };
##
##
my $abwarn = $SIG{__WARN__} // sub { warn shift };
$SIG{__WARN__} = sub {
my $w = shift;
$abwarn->($w) if $w !~ /::[ab]" used only once:/;
};