Commit | Line | Data |
de7ba0e9 |
1 | package MooseX::MetaDescription::Meta::Role::HasMetaDescription; |
2 | use Moose::Role; |
3 | |
4 | our $VERSION = '0.01'; |
5 | our $AUTHORITY = 'cpan:STEVAN'; |
6 | |
7 | with 'MooseX::MetaDescription::Meta::Role::HasDescription'; |
8 | |
9 | has 'metadescription_classname' => ( |
10 | is => 'ro', |
11 | isa => 'Str', |
12 | ); |
13 | |
14 | has '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 | |
30 | no Moose::Role; 1; |
31 | |
32 | __END__ |
33 | |
34 | =pod |
35 | |
36 | =head1 NAME |
37 | |
38 | MooseX::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 | |
56 | All complex software has bugs lurking in it, and this module is no |
57 | exception. If you find a bug please either email me, or add the bug |
58 | to cpan-RT. |
59 | |
60 | =head1 AUTHOR |
61 | |
62 | Stevan Little E<lt>stevan.little@iinteractive.comE<gt> |
63 | |
64 | =head1 COPYRIGHT AND LICENSE |
65 | |
66 | Copyright 2008 Infinity Interactive, Inc. |
67 | |
68 | L<http://www.iinteractive.com> |
69 | |
70 | This library is free software; you can redistribute it and/or modify |
71 | it under the same terms as Perl itself. |
72 | |
73 | =cut |