Mouse::Util::does_role() respects $thing->does() method
[gitmo/Mouse.git] / t / 100_bugs / 001_subtype_quote_bug.t
1 #!/usr/bin/perl
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;
5
6 use strict;
7 use warnings;
8
9 use Test::More;
10
11 =pod
12
13 This is a test for a bug found by Purge on #moose:
14 The code:
15
16   subtype Stuff
17     => as Object
18     => where { ... }
19
20 will break if the Object:: namespace exists. So the
21 solution is to quote 'Object', like so:
22
23   subtype Stuff
24     => as 'Object'
25     => where { ... }
26
27 Mouse 0.03 did this, now it doesn't, so all should
28 be well from now on.
29
30 =cut
31
32 { package Object::Test; }
33
34 {
35     package Foo;
36     ::use_ok('Mouse');
37 }
38
39 done_testing;