this fix of just checking of GV-ness to determine if a class has methods defined...
[gitmo/Class-MOP.git] / t / 306_is_class_loaded.t
index a4adb10..eecc09e 100644 (file)
@@ -7,16 +7,11 @@ use lib "$Bin/lib";
 use Test::More;
 use Class::MOP ();
 
-plan 'skip_all' => 'This test is only meaningful for an XS-enabled CMOP with Perl < 5.10'
-    unless Class::MOP::USING_XS() && ! Class::MOP::IS_RUNNING_ON_5_10();
-
 plan tests => 1;
 
-# With pre-5.10 Perl, 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.
+# There was a bug that manifest on Perl < 5.10 when running under
+# XS. The mere mention of TestClassLoaded below broke the
+# is_class_loaded check.
 
 sub whatever {
     TestClassLoaded::this_method_does_not_even_exist();
@@ -24,11 +19,7 @@ sub whatever {
 
 Class::MOP::load_class('TestClassLoaded');
 
-TODO: {
-    local $TODO = 'The XS is_class_loaded is confused by the bogus method defined in whatever()';
-    ok(
-        TestClassLoaded->can('a_method'),
-        'TestClassLoader::a_method is defined'
-    );
-}
+ok( TestClassLoaded->can('a_method'),
+    'TestClassLoader::a_method is defined' );
+