more refactoring to roles
[gitmo/MooseX-MetaDescription.git] / lib / MooseX / MetaDescription / Meta / Class.pm
index 3e0395c..ee53920 100644 (file)
@@ -7,27 +7,11 @@ our $VERSION   = '0.01';
 our $AUTHORITY = 'cpan:STEVAN';
 
 extends 'Moose::Meta::Class';
+   with 'MooseX::MetaDescription::Meta::Role::HasMetaDescription';
 
-has 'description' => (
-    is      => 'ro',
-    isa     => 'HashRef',
-    lazy    => 1,   
-    default => sub { +{} },
-);
-
-has 'metadescription' => (
-    is      => 'ro',
-    isa     => 'MooseX::MetaDescription::Description',
-    lazy    => 1,   
+has '+metadescription_classname' => (
     default => sub {
-        my $self = shift;
-        
-        # TODO: handle traits ...
-        
-        MooseX::MetaDescription::Description::Class->new(
-            %{$self->description},
-            class => $self,
-        )
+        'MooseX::MetaDescription::Description::Class'
     },
 );
 
@@ -47,7 +31,7 @@ MooseX::MetaDescription::Meta::Class - A Moosey solution to this problem
 
 =head1 DESCRIPTION
 
-=head1 METHODS 
+=head1 METHODS
 
 =over 4
 
@@ -57,7 +41,7 @@ MooseX::MetaDescription::Meta::Class - A Moosey solution to this problem
 
 =head1 BUGS
 
-All complex software has bugs lurking in it, and this module is no 
+All complex software has bugs lurking in it, and this module is no
 exception. If you find a bug please either email me, or add the bug
 to cpan-RT.