From: gfx Date: Tue, 13 Oct 2009 07:37:53 +0000 (+0900) Subject: Add a test for RT #50421 X-Git-Tag: 0.39~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cf938ec7ea7a0c91c19aa0b1d61fad651f8529b3;p=gitmo%2FMouse.git Add a test for RT #50421 --- diff --git a/t/900_bug/003_RT50421.t b/t/900_bug/003_RT50421.t new file mode 100644 index 0000000..8950508 --- /dev/null +++ b/t/900_bug/003_RT50421.t @@ -0,0 +1,42 @@ +#!/usr/bin/perl -w +use Test; + +plan tests => 3; + +{ + package Class; + sub new {} +} + +{ + package MouseClass; + use Mouse; +} + + +{ + package Foo; + + use Mouse; + + has unknown => ( + is => 'rw', + isa => 'HashRef[Unknown]' + ); + + has class => ( + is => 'rw', + isa => 'HashRef[Class]', + ); + + has mouse => ( + is => 'rw', + isa => 'HashRef[MouseClass]', + ); +} + + +my $obj = Foo->new; +ok eval { $obj->unknown({}); }; +ok eval { $obj->class({}); }; +ok eval { $obj->mouse({}); };