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
CommitLineData
89f74416 1use strict;
2use warnings;
89f74416 3
8db4963b 4use FindBin qw/$Bin/;
5use lib "$Bin/lib";
6
7699d177 7use Test::More;
89f74416 8use Class::MOP ();
9
7699d177 10plan tests => 1;
11
0a6c6f37 12# There was a bug that manifest on Perl < 5.10 when running under
13# XS. The mere mention of TestClassLoaded below broke the
14# is_class_loaded check.
7699d177 15
16sub whatever {
b39d2247 17 TestClassLoaded::this_method_does_not_even_exist();
89f74416 18}
19
20Class::MOP::load_class('TestClassLoaded');
21
0a6c6f37 22ok( TestClassLoaded->can('a_method'),
23 'TestClassLoader::a_method is defined' );
24
89f74416 25