package Foo; # lots of use statements here. use Import::Into; sub import { my $target = caller; 'strict'->import::into($target); 'warnings'->import::into($target, qw(FATAL utf8)); if ($] >= 5.017011) { # THIS IS THE PROBLEM LINE 'warnings'->unimport::out_of($target, 'experimental::smartmatch'); } }