Commit | Line | Data |
95d07360 |
1 | #!/usr/bin/env perl |
2 | use strict; |
3 | use warnings; |
a28e50e4 |
4 | use Test::More; |
95d07360 |
5 | |
6 | do { |
7 | package My::Meta::Class; |
8 | use Moose; |
9 | BEGIN { extends 'Moose::Meta::Class' }; |
8a8856de |
10 | |
11 | package Moose::Meta::Class::Custom::MyMetaClass; |
12 | sub register_implementation { 'My::Meta::Class' } |
95d07360 |
13 | }; |
14 | |
15 | do { |
16 | package My::Class; |
17 | use Moose -metaclass => 'My::Meta::Class'; |
18 | }; |
19 | |
8a8856de |
20 | do { |
21 | package My::Class::Aliased; |
22 | use Moose -metaclass => 'MyMetaClass'; |
23 | }; |
24 | |
95d07360 |
25 | is(My::Class->meta->meta->name, 'My::Meta::Class'); |
8a8856de |
26 | is(My::Class::Aliased->meta->meta->name, 'My::Meta::Class'); |
95d07360 |
27 | |
a28e50e4 |
28 | done_testing; |