Commit | Line | Data |
e9ec68d6 |
1 | #!/usr/bin/perl |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
6 | use Test::More tests => 1; |
7 | |
8 | =pod |
9 | |
10 | This is a test for a bug found by Purge on #moose: |
11 | The code: |
12 | |
13 | subtype Stuff |
14 | => as Object |
15 | => where { ... } |
d03bd989 |
16 | |
17 | will break if the Object:: namespace exists. So the |
e9ec68d6 |
18 | solution is to quote 'Object', like so: |
19 | |
20 | subtype Stuff |
21 | => as 'Object' |
22 | => where { ... } |
23 | |
d03bd989 |
24 | Moose 0.03 did this, now it doesn't, so all should |
25 | be well from now on. |
e9ec68d6 |
26 | |
27 | =cut |
28 | |
29 | { package Object::Test; } |
30 | |
7ff56534 |
31 | package Foo; |
d03bd989 |
32 | ::use_ok('Moose'); |