our $VERSION = '0.01';
our $AUTHORITY = 'cpan:STEVAN';
-with 'MooseX::MetaDescription::Meta::Role::HasDescription';
+has 'description' => (
+ is => 'ro',
+ isa => 'HashRef',
+ lazy => 1,
+ default => sub { +{} },
+);
has 'metadescription_classname' => (
is => 'ro',
# TODO: handle traits ...
$self->metadescription_classname->new(
- %{$self->description},
+ %{ $self->description },
descriptor => $self,
)
},
use_ok('MooseX::MetaDescription::Meta::Attribute');
use_ok('MooseX::MetaDescription::Meta::Attribute::Trait');
- use_ok('MooseX::MetaDescription::Meta::Role::HasDescription');
use_ok('MooseX::MetaDescription::Meta::Role::HasMetaDescription');
use_ok('MooseX::MetaDescription::Description');
# check the meta-desc
my $foo_class = Foo->meta;
+isa_ok($foo_class->metadescription, 'MooseX::MetaDescription::Description::Class');
is($foo_class->metadescription->descriptor, $foo_class, '... got the circular ref');
my $bar_attr = Foo->meta->get_attribute('bar');
+isa_ok($bar_attr->metadescription, 'MooseX::MetaDescription::Description::Attribute');
is($bar_attr->metadescription->descriptor, $bar_attr, '... got the circular ref');
my $baz_attr = Foo->meta->get_attribute('baz');
+isa_ok($baz_attr->metadescription, 'MooseX::MetaDescription::Description::Attribute');
is($baz_attr->metadescription->descriptor, $baz_attr, '... got the circular ref');
# check the actual descs