Commit | Line | Data |
7adfd53f |
1 | package TestMe2; |
2 | use strict; |
3 | use warnings; |
4 | use Reaction::Class; |
5 | use Reaction::Types::DateTime; |
6 | |
7 | has id => (is => 'ro', required => 1, isa => 'Int'); |
8 | has username => (is => 'rw', required => 1, isa => 'NonEmptySimpleStr'); |
9 | has created_d => (is => 'rw', required => 1, isa => 'DateTime'); |
10 | |
11 | 1; |
12 | |
13 | package TestMe; |
14 | use strict; |
15 | use warnings; |
16 | use Reaction::Class; |
17 | |
18 | reflect_attributes_from('TestMe2' => qw(id username created_d)); |
19 | |
20 | 1; |
21 | |
22 | package main; |
23 | use strict; |
24 | use warnings; |
25 | use Data::Dumper; |
26 | use Test::More; |
27 | |
28 | plan tests => 1; |
29 | |
30 | my @test_list = TestMe->meta->get_attribute_list; |
31 | my @test2_list = TestMe2->meta->get_attribute_list; |
32 | is_deeply(\@test_list, \@test2_list, "Attribute lists match"); |
33 | |
34 | 1; |