1 package MooseX::MetaDescription::Meta::Trait;
5 our $AUTHORITY = 'cpan:STEVAN';
11 default => sub { +{} },
14 has 'metadescription_classname' => (
19 'MooseX::MetaDescription::Description'
23 has 'metadescription' => (
25 isa => 'MooseX::MetaDescription::Description',
30 my $metadesc_class = $self->metadescription_classname;
31 my $desc = $self->description;
33 if (my $traits = delete $desc->{traits}) {
34 my $meta = Moose::Meta::Class->create_anon_class(
35 superclasses => [ $metadesc_class ],
38 $meta->add_method('meta' => sub { $meta });
39 $metadesc_class = $meta->name;
42 return $metadesc_class->new(%$desc, descriptor => $self);
54 MooseX::MetaDescription::Meta::Trait - A Moosey solution to this problem
58 use MooseX::MetaDescription::Meta::Trait;
72 All complex software has bugs lurking in it, and this module is no
73 exception. If you find a bug please either email me, or add the bug
78 Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
80 =head1 COPYRIGHT AND LICENSE
82 Copyright 2008 Infinity Interactive, Inc.
84 L<http://www.iinteractive.com>
86 This library is free software; you can redistribute it and/or modify
87 it under the same terms as Perl itself.