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