changes before dashing out the door
[gitmo/MooseX-MetaDescription.git] / lib / MooseX / MetaDescription.pm
CommitLineData
c13295c8 1package MooseX::MetaDescription;
2use Moose;
3
91297cb4 4our $VERSION = '0.01';
5our $AUTHORITY = 'cpan:STEVAN';
6
c13295c8 7use MooseX::MetaDescription::Meta::Class;
8use MooseX::MetaDescription::Meta::Attribute;
5d49532a 9use MooseX::MetaDescription::Description;
c13295c8 10
c13295c8 11no Moose; 1;
12
13__END__
14
15=pod
16
17=head1 NAME
18
48b1f986 19MooseX::MetaDescription - A framework for adding additional metadata to Moose classes
c13295c8 20
21=head1 SYNOPSIS
22
17f25b49 23 package Foo;
17f25b49 24 use Moose;
25
17f25b49 26 has 'bar' => (
27 metaclass => 'MooseX::MetaDescription::Meta::Attribute',
28 is => 'ro',
29 isa => 'Str',
f2ce52cc 30 default => sub { Bar->new() },
17f25b49 31 description => {
f2ce52cc 32 node_type => 'element',
17f25b49 33 }
34 );
35
36 ...
37
38 $foo->meta->description; # { 'Hello' => 'World' }
39 $foo->meta->get_attribute('bar')->description; # { baz => 'Foo::bar::baz' }
c13295c8 40
41=head1 DESCRIPTION
42
f2ce52cc 43MooseX::MetaDescription allows you to add arbitrary out of band metadata to your Moose classes and attributes. This will allow you to
44track out of band data along with attributes, which is very useful for say serializing Moose classes in HTML or XML.
0cb2eb0f 45
c13295c8 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
48b1f986 62Code and Design originally by Jonathan Rockway in the Ernst module,
63extracted and refactored by:
64
c13295c8 65Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
66
67=head1 COPYRIGHT AND LICENSE
68
69Copyright 2008 Infinity Interactive, Inc.
70
71L<http://www.iinteractive.com>
72
73This library is free software; you can redistribute it and/or modify
74it under the same terms as Perl itself.
75
76=cut