more refactoring to roles
[gitmo/MooseX-MetaDescription.git] / lib / MooseX / MetaDescription / Meta / Attribute / Trait.pm
index 3692411..d7ee8d5 100644 (file)
@@ -6,26 +6,11 @@ use MooseX::MetaDescription::Description::Attribute;
 our $VERSION   = '0.01';
 our $AUTHORITY = 'cpan:STEVAN';
 
-has 'description' => (
-    is      => 'ro',
-    isa     => 'HashRef',
-    lazy    => 1,   
-    default => sub { +{} },
-);
+with 'MooseX::MetaDescription::Meta::Role::HasMetaDescription';
 
-has 'metadescription' => (
-    is      => 'ro',
-    isa     => 'MooseX::MetaDescription::Description',
-    lazy    => 1,   
-    default => sub {
-        my $self = shift;
-        
-        # TODO: handle traits ...
-        
-        MooseX::MetaDescription::Description::Attribute->new(
-            %{$self->description},
-            attribute => $self,
-        )
+has '+metadescription_classname' => (
+    default => sub { 
+        'MooseX::MetaDescription::Description::Attribute' 
     },
 );