Commit | Line | Data |
4c98ebb0 |
1 | #!/usr/bin/perl |
ee5e6a03 |
2 | # This is automatically generated by author/import-moose-test.pl. |
3 | # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!! |
4 | use t::lib::MooseCompat; |
4c98ebb0 |
5 | |
6 | use strict; |
7 | use warnings; |
8 | |
ee5e6a03 |
9 | use Test::More; |
4c98ebb0 |
10 | |
11 | { |
12 | package Foo; |
13 | use Mouse; |
14 | has 'foo' => ( is => 'ro', reader => 'get_foo' ); |
15 | } |
16 | |
17 | { |
18 | my $foo = Foo->new(foo => 10); |
19 | my $reader = $foo->meta->get_attribute('foo')->reader; |
20 | is($reader, 'get_foo', |
21 | 'reader => "get_foo" has correct presedence'); |
22 | can_ok($foo, 'get_foo'); |
23 | is($foo->$reader, 10, "Reader works as expected"); |
24 | } |
25 | |
ee5e6a03 |
26 | done_testing; |