complete re-organization of the test suite
[gitmo/Moose.git] / t / 100_bugs / 001_subtype_quote_bug.t
diff --git a/t/100_bugs/001_subtype_quote_bug.t b/t/100_bugs/001_subtype_quote_bug.t
new file mode 100644 (file)
index 0000000..f01d168
--- /dev/null
@@ -0,0 +1,31 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More tests => 1;
+
+=pod
+
+This is a test for a bug found by Purge on #moose:
+The code:
+
+  subtype Stuff
+    => as Object
+    => where { ... }
+  
+will break if the Object:: namespace exists. So the 
+solution is to quote 'Object', like so:
+
+  subtype Stuff
+    => as 'Object'
+    => where { ... }
+
+Moose 0.03 did this, now it doesn't, so all should 
+be well from now on. 
+
+=cut
+
+{ package Object::Test; }
+
+use_ok('Moose');