use strict;
use warnings;
-use Class::MOP ();
+use Module::Runtime 'use_module';
=head1 SYNOPSIS
=head1 DESCRIPTION
-Allows you to export types from multiple type libraries.
+Allows you to export types from multiple type libraries.
-Libraries on the right side of the type libs passed to L</provide_types_from>
+Libraries on the right end of the list passed to L</provide_types_from>
take precedence over those on the left in case of conflicts.
=cut
sub _check_type_lib {
my ($class, $lib) = @_;
- Class::MOP::load_class($lib);
+ use_module($lib);
die "Cannot use $lib in a combined type library, it does not provide any types"
unless $lib->can('type_names');