=head1PURPOSETestC<class_has>inclasses,withinflationtoMoose.Checkintrospection.=head1AUTHORTobyInksterE<lt>tobyink@cpan.orgE<gt>.=head1COPYRIGHTANDLICENCEThissoftwareiscopyright(c)2013byTobyInkster.Thisisfreesoftware;youcanredistributeitand/ormodifyitunderthesametermsasthePerl5programminglanguagesystemitself.=cutusestrict;usewarnings;useTest::More;{packageFoo;useMoo;useMooX::ClassAttribute;class_hasfoo=>(is=>'rw');}Foo->foo(42);eval{requireMoose}orplanskip_all=>'need Moose';is(Foo->foo,42);{packageBar;useMoo;useMooX::ClassAttribute;class_hasbar=>(is=>'rw',default=>sub{"Elephant"});}is(Bar->bar,"Elephant");unless(eval{requireMooseX::ClassAttribute}){diag"no MooseX::ClassAttribute; no further tests";done_testing;exit;}can_ok(Foo->meta,'get_class_attribute');ok(Foo->meta->get_class_attribute('foo'));ok(notFoo->meta->get_class_attribute('foo')->has_default);can_ok(Bar->meta,'get_class_attribute');ok(Bar->meta->get_class_attribute('bar'));ok(Bar->meta->get_class_attribute('bar')->has_default);done_testing;