take a stab at a description
[gitmo/MooseX-MetaDescription.git] / lib / MooseX / MetaDescription.pm
index 5e35667..eb74454 100644 (file)
@@ -1,13 +1,13 @@
 package MooseX::MetaDescription;
 use Moose;
 
+our $VERSION   = '0.01';
+our $AUTHORITY = 'cpan:STEVAN';
+
 use MooseX::MetaDescription::Meta::Class;
 use MooseX::MetaDescription::Meta::Attribute;
 use MooseX::MetaDescription::Description;
 
-our $VERSION   = '0.01';
-our $AUTHORITY = 'cpan:STEVAN';
-
 no Moose; 1;
 
 __END__
@@ -16,14 +16,35 @@ __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 metaclass 'MooseX::MetaDescription::Meta::Class';
+    use Moose;
+
+    __PACKAGE__->meta->description->{'Hello'} = 'World';
+
+    has 'bar' => (
+        metaclass   => 'MooseX::MetaDescription::Meta::Attribute',
+        is          => 'ro',
+        isa         => 'Str',   
+        default     => sub { 'Foo::bar' },
+        description => {
+            baz   => 'Foo::bar::baz',
+        }
+    );
+
+    ...
+    
+    $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.
+
 =head1 METHODS 
 
 =over 4
@@ -40,6 +61,9 @@ to cpan-RT.
 
 =head1 AUTHOR
 
+Code and Design originally by Jonathan Rockway in the Ernst module, 
+extracted and refactored by:
+
 Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
 
 =head1 COPYRIGHT AND LICENSE