From: Dave Rolsky Date: Sat, 22 Oct 2011 00:38:34 +0000 (-0500) Subject: Don't expect CMOP::Class to have a $VERSION var (when running before dzil build it... X-Git-Tag: 2.0302~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9b60687dd55f9b0fd4936a1b820e5735b4b9d79d;p=gitmo%2FMoose.git Don't expect CMOP::Class to have a $VERSION var (when running before dzil build it does not) --- diff --git a/t/cmop/self_introspection.t b/t/cmop/self_introspection.t index 8afa742..18b9e98 100644 --- a/t/cmop/self_introspection.t +++ b/t/cmop/self_introspection.t @@ -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)');