80fedfed40cf11781f690dc01d887058d81fc76e
[gitmo/MooseX-MetaDescription.git] / lib / MooseX / MetaDescription / Meta / Class.pm
1 package MooseX::MetaDescription::Meta::Class;
2 use Moose;
3
4 our $VERSION   = '0.02';
5 our $AUTHORITY = 'cpan:STEVAN';
6
7 extends 'Moose::Meta::Class';
8    with 'MooseX::MetaDescription::Meta::Trait';
9    
10 has '+description' => (
11    default => sub {
12        my $self   = shift;
13        my @supers = $self->linearized_isa;
14        shift @supers;
15        my %desc;
16        foreach my $super (@supers) {
17             if ($super->meta->isa('MooseX::MetaDescription::Meta::Class')) {
18                 %desc = (%{ $super->meta->description }, %desc)
19             }
20        }
21        \%desc;
22    },
23 );   
24
25 no Moose; 1;
26
27 __END__
28
29 =pod
30
31 =head1 NAME
32
33 MooseX::MetaDescription::Meta::Class - Custom class metaclass for meta-descriptions
34
35 =head1 DESCRIPTION
36
37 Nothing worth saying yet actually, mostly internal usage only. See the 
38 SYNPOSIS in L<MooseX::MetaDescription> for an example of usage.
39
40 =head1 BUGS
41
42 All complex software has bugs lurking in it, and this module is no
43 exception. If you find a bug please either email me, or add the bug
44 to cpan-RT.
45
46 =head1 AUTHOR
47
48 Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
49
50 =head1 COPYRIGHT AND LICENSE
51
52 Copyright 2008 Infinity Interactive, Inc.
53
54 L<http://www.iinteractive.com>
55
56 This library is free software; you can redistribute it and/or modify
57 it under the same terms as Perl itself.
58
59 =cut