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