Commit | Line | Data |
a5347147 |
1 | #!/usr/bin/perl |
2 | # https://rt.cpan.org/Public/Bug/Display.html?id=57144 |
3 | use strict; |
4 | use Test::More; |
5 | |
6 | package Hoge; |
7 | use Mouse; |
8 | |
9 | has 'fuga' => ( |
10 | is => 'rw', |
11 | isa => 'Str', |
12 | lazy_build => 1, |
13 | ); |
14 | |
15 | has 'hoge' => ( |
16 | is => 'rw', |
17 | isa => 'Str', |
18 | lazy_build => 1, |
19 | ); |
20 | |
21 | sub _build_fuga { |
22 | shift->hoge; |
23 | } |
24 | |
25 | sub _build_hoge { |
26 | eval "use Hoge::Hoge"; ## no critic |
27 | "HOGE"; |
28 | } |
29 | |
30 | sub msg { |
31 | shift->fuga; |
32 | } |
33 | |
34 | package main; |
35 | use strict; |
36 | use warnings; |
37 | |
38 | pass 'The problem remains ...'; |
39 | |
40 | if(0) { |
41 | my $hoge = Hoge->new; |
42 | is $hoge->msg, "HOGE"; |
43 | } |
44 | |
45 | done_testing; |