From: Fuji, Goro Date: Fri, 7 May 2010 04:55:03 +0000 (+0900) Subject: Add RT57144.t, but it is not fixed yet... X-Git-Tag: 0.57~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a5347147c9e6fec9f0801e51e57a6c0f0f8bb5a1;p=gitmo%2FMouse.git Add RT57144.t, but it is not fixed yet... --- diff --git a/t/900_mouse_bugs/009_RT57144.t b/t/900_mouse_bugs/009_RT57144.t new file mode 100644 index 0000000..d2660aa --- /dev/null +++ b/t/900_mouse_bugs/009_RT57144.t @@ -0,0 +1,45 @@ +#!/usr/bin/perl +# https://rt.cpan.org/Public/Bug/Display.html?id=57144 +use strict; +use Test::More; + +package Hoge; +use Mouse; + +has 'fuga' => ( + is => 'rw', + isa => 'Str', + lazy_build => 1, +); + +has 'hoge' => ( + is => 'rw', + isa => 'Str', + lazy_build => 1, +); + +sub _build_fuga { + shift->hoge; +} + +sub _build_hoge { + eval "use Hoge::Hoge"; ## no critic + "HOGE"; +} + +sub msg { + shift->fuga; +} + +package main; +use strict; +use warnings; + +pass 'The problem remains ...'; + +if(0) { + my $hoge = Hoge->new; + is $hoge->msg, "HOGE"; +} + +done_testing;