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