The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more

use strict;
use Test::More 0.88;
{
package T;
use strict;
use warnings;
use lib 't/lib';
my $loader = Module::Implementation::build_loader_sub(
implementations => [ 'ImplFails1', 'Impl1' ],
symbols => [qw( return_42 )],
);
$loader->();
}
{
ok( T->can('return_42'), 'T package has a return_42 sub' );
ok( !T->can('return_package'), 'T package has a return_package sub' );
}
done_testing();