From: Graham Knop <haarg@haarg.org>
Date: Thu, 11 Jul 2013 09:46:18 +0000 (-0400)
Subject: document use of Class::XSAccessor and caveats
X-Git-Tag: v1.003000~11
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dcbfe1d9ae5ed87d618f1c7856320a177cd3ecd7;p=gitmo%2FMoo.git

document use of Class::XSAccessor and caveats
---

diff --git a/Changes b/Changes
index 69f30fe..2d1e9e3 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,4 @@
+  - document optional use of Class::XSAccessor with caveats
   - fix constructor generated when creating a class with
     create_class_with_roles when the superclass constructor hasn't been
     generated yet
diff --git a/lib/Moo.pm b/lib/Moo.pm
index bcc4b71..e49fc38 100644
--- a/lib/Moo.pm
+++ b/lib/Moo.pm
@@ -310,6 +310,15 @@ to your code before Moose is loaded, but bear in mind that this switch is
 currently global and turns the mechanism off entirely so don't put this
 in library code.
 
+=head1 MOO AND CLASS::XSACCESSOR
+
+If a new enough version of L<Class::XSAccessor> is available, it
+will be used to generate simple accessors, readers, and writers for
+a speed boost.  Simple accessors are those without lazy defaults,
+type checks/coercions, or triggers.  Readers and writers generated
+by L<Class::XSAccessor> will behave slightly differently: they will
+reject attempts to call them with the incorrect number of parameters.
+
 =head1 MOO VERSUS ANY::MOOSE
 
 L<Any::Moose> will load L<Mouse> normally, and L<Moose> in a program using