Revision history for Perl extension Class-MOP.
+ * Tests
+ - Add test showing how the xs Class::MOP::is_class_loaded can
+ be made to operate differently to the pure perl version (t0m)
+
0.75 Wed, December 31, 2008
* Class::MOP::Class
- A class that was made immutable and then mutable could end up
--- /dev/null
+use strict;
+use warnings;
+use FindBin qw/$Bin/;
+use lib "$Bin/lib";
+
+use Test::More tests => 1;
+use Class::MOP ();
+
+# Just defining this sub appears to shit in TestClassLoaded's symbol
+# tables (see the SCALAR package symbol you end up with).
+# This confuses the XS is_class_loaded method, which looks for _any_
+# symbol, not just code symbols of VERSION/AUTHORITY etc.
+
+sub fnar {
+ TestClassLoaded::this_method_does_not_even_exist()
+}
+
+Class::MOP::load_class('TestClassLoaded');
+
+TODO: {
+ local $TODO = 'Borked';
+ ok(TestClassLoaded->can('a_method'),
+ 'TestClassLoader::LoadedByLoader::a_method is defined');
+}
+