Don't expect CMOP::Class to have a $VERSION var (when running before dzil build it...
Dave Rolsky [Sat, 22 Oct 2011 00:38:34 +0000 (19:38 -0500)]
t/cmop/self_introspection.t

index 8afa742..18b9e98 100644 (file)
@@ -325,7 +325,9 @@ is($class_mop_class_meta->find_attribute_by_name('attribute_metaclass')->default
 is($class_mop_class_meta->name, 'Class::MOP::Class', '... Class::MOP::Class->name');
 is($class_mop_class_meta->version, $Class::MOP::Class::VERSION, '... Class::MOP::Class->version');
 
-ok($class_mop_class_meta->has_package_symbol('$VERSION'), '... Class::MOP::Class->has_package_symbol($VERSION)');
+if ( defined $Class::MOP::Class::VERSION ) {
+    ok($class_mop_class_meta->has_package_symbol('$VERSION'), '... Class::MOP::Class->has_package_symbol($VERSION)');
+}
 is(${$class_mop_class_meta->get_package_symbol('$VERSION')},
    $Class::MOP::Class::VERSION,
    '... Class::MOP::Class->get_package_symbol($VERSION)');