whoa, this is being whittled down to nothing
[gitmo/MooseX-MetaDescription.git] / lib / MooseX / MetaDescription / Meta / Trait.pm
1 package MooseX::MetaDescription::Meta::Trait;
2 use Moose::Role;
3
4 our $VERSION   = '0.01';
5 our $AUTHORITY = 'cpan:STEVAN';
6
7 has 'description' => (
8     is      => 'ro',
9     isa     => 'HashRef',
10     lazy    => 1,   
11     default => sub { +{} },
12 );
13
14 has 'metadescription_classname' => (
15     is      => 'ro',
16     isa     => 'Str', 
17     default => sub {
18         'MooseX::MetaDescription::Description'
19     }  
20 );
21
22 has 'metadescription' => (
23     is      => 'ro',
24     isa     => 'MooseX::MetaDescription::Description',
25     lazy    => 1,   
26     default => sub {
27         my $self = shift;
28         $self->metadescription_classname->new(
29             %{ $self->description },
30             descriptor => $self,
31         )
32     },
33 );
34
35 no Moose::Role; 1;
36
37 __END__
38
39 =pod
40
41 =head1 NAME
42
43 MooseX::MetaDescription::Meta::Trait - A Moosey solution to this problem
44
45 =head1 SYNOPSIS
46
47   use MooseX::MetaDescription::Meta::Trait;
48
49 =head1 DESCRIPTION
50
51 =head1 METHODS 
52
53 =over 4
54
55 =item B<>
56
57 =back
58
59 =head1 BUGS
60
61 All complex software has bugs lurking in it, and this module is no 
62 exception. If you find a bug please either email me, or add the bug
63 to cpan-RT.
64
65 =head1 AUTHOR
66
67 Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
68
69 =head1 COPYRIGHT AND LICENSE
70
71 Copyright 2008 Infinity Interactive, Inc.
72
73 L<http://www.iinteractive.com>
74
75 This library is free software; you can redistribute it and/or modify
76 it under the same terms as Perl itself.
77
78 =cut