1 package MooseX::MetaDescription::Meta::Class;
5 our $AUTHORITY = 'cpan:STEVAN';
7 extends 'Moose::Meta::Class';
8 with 'MooseX::MetaDescription::Meta::Trait';
10 has '+description' => (
13 my @supers = $self->linearized_isa;
16 foreach my $super (@supers) {
17 if ($super->meta->isa('MooseX::MetaDescription::Meta::Class')) {
18 %desc = (%{ $super->meta->description }, %desc)
33 MooseX::MetaDescription::Meta::Class - Custom class metaclass for meta-descriptions
38 use metaclass 'MooseX::MetaDescription::Meta::Class' => (
50 # always add it *after* the extends
51 __PACKAGE__->meta->description->{'Hello'} = 'Earth';
59 use metaclass 'MooseX::MetaDescription::Meta::Class' => (
70 Foo->meta->description # { 'Hello' => 'World', 'World' => 'Hello' }
71 Bar->meta->description # { 'Hello' => 'Earth', 'World' => 'Hello' } # change one, inherit the other
72 Baz->meta->description # { 'Hello' => 'Earth', 'World' => 'Hello' } # inherit both
73 Gorch->meta->description # { 'Hello' => 'World' } # overrides all, no inheritance
77 This module provides the custom metaclass to add Meta Descriptions
78 to your classes. It provides a limited degree of inheritance of
79 meta-descriptions, the details of which are shown above in the
84 NOTE: these are methods composed into this class from
85 L<MooseX::MetaDescription::Meta::Trait> refer to that
86 module for the complete description.
92 =item B<metadescription_classname>
94 =item B<metadescription>
102 All complex software has bugs lurking in it, and this module is no
103 exception. If you find a bug please either email me, or add the bug
108 Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
110 =head1 COPYRIGHT AND LICENSE
112 Copyright 2008 Infinity Interactive, Inc.
114 L<http://www.iinteractive.com>
116 This library is free software; you can redistribute it and/or modify
117 it under the same terms as Perl itself.