projects
/
gitmo/Class-MOP.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
3cd4ca9
)
test for throwing when a class is empty or nonexistent in a loaded file
Robert Buels [Wed, 10 Feb 2010 23:33:11 +0000 (15:33 -0800)]
t/083_load_class.t
patch
|
blob
|
blame
|
history
t/lib/MistypedPackageName.pm
[new file with mode: 0644]
patch
|
blob
diff --git
a/t/083_load_class.t
b/t/083_load_class.t
index
67553be
..
2a11077
100644
(file)
--- a/
t/083_load_class.t
+++ b/
t/083_load_class.t
@@
-145,4
+145,13
@@
throws_ok {
'an @ISA with members does mean a class is loaded' );
}
+{
+
+ throws_ok {
+ Class::MOP::load_class("MistypedPackageName")
+ } qr/empty/, 'throws for nonexistent package name with something in a sub-namespace';
+
+}
+
+
done_testing;
diff --git a/t/lib/MistypedPackageName.pm
b/t/lib/MistypedPackageName.pm
new file mode 100644
(file)
index 0000000..
26a235d
--- /dev/null
+++ b/
t/lib/MistypedPackageName.pm
@@ -0,0
+1,7
@@
+package MistypedPackageName_Oops_I_Mistyped_it;
+use Moose;
+
+package MistypedPackageName::SubNamespace;
+use Moose;
+1;
+