X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FMetaDescription.pm;h=4606763d48405b1dabcc89a2df15f4e2bad7f12b;hb=f2ce52ccc6ccbcf8a2009c5ba5c4f5d3067bc2a3;hp=dc4a2b00b39a2bedfcfed1832c32b7e153cc2bb5;hpb=91297cb4d55bab5d38c404df82637282a5450661;p=gitmo%2FMooseX-MetaDescription.git diff --git a/lib/MooseX/MetaDescription.pm b/lib/MooseX/MetaDescription.pm index dc4a2b0..4606763 100644 --- a/lib/MooseX/MetaDescription.pm +++ b/lib/MooseX/MetaDescription.pm @@ -16,14 +16,33 @@ __END__ =head1 NAME -MooseX::MetaDescription - A Moosey solution to this problem +MooseX::MetaDescription - A framework for adding additional metadata to Moose classes =head1 SYNOPSIS - use MooseX::MetaDescription; + package Foo; + use Moose; + + has 'bar' => ( + metaclass => 'MooseX::MetaDescription::Meta::Attribute', + is => 'ro', + isa => 'Str', + default => sub { Bar->new() }, + description => { + node_type => 'element', + } + ); + + ... + + $foo->meta->description; # { 'Hello' => 'World' } + $foo->meta->get_attribute('bar')->description; # { baz => 'Foo::bar::baz' } =head1 DESCRIPTION +MooseX::MetaDescription allows you to add arbitrary out of band metadata to your Moose classes and attributes. This will allow you to +track out of band data along with attributes, which is very useful for say serializing Moose classes in HTML or XML. + =head1 METHODS =over 4 @@ -40,6 +59,9 @@ to cpan-RT. =head1 AUTHOR +Code and Design originally by Jonathan Rockway in the Ernst module, +extracted and refactored by: + Stevan Little Estevan.little@iinteractive.comE =head1 COPYRIGHT AND LICENSE