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