From: Gerda Shank Date: Tue, 8 Sep 2009 23:22:09 +0000 (-0400) Subject: change doc references to AttributeHelpers X-Git-Tag: 0.89_02~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e4a134edb64bafc43edda49a25b4bd846c6f845e;p=gitmo%2FMoose.git change doc references to AttributeHelpers --- diff --git a/lib/Moose/Manual/Attributes.pod b/lib/Moose/Manual/Attributes.pod index 921301a..35bcaed 100644 --- a/lib/Moose/Manual/Attributes.pod +++ b/lib/Moose/Manual/Attributes.pod @@ -530,8 +530,6 @@ of ways through the use of custom metaclasses and metaclass traits. When declaring an attribute, you can declare a metaclass or a set of traits for the attribute: - use Moose::AttributeHelpers; - has 'mapping' => ( metaclass => 'Hash', is => 'ro', @@ -655,8 +653,8 @@ returned from the reader method: This option only works if your attribute is explicitly typed as an C or C. -However, we recommend that you use L for -these types of attributes, which gives you much more control over how +However, we recommend that you use L traits +for these types of attributes, which gives you much more control over how they are accessed and manipulated. =head2 Initializer diff --git a/lib/Moose/Manual/BestPractices.pod b/lib/Moose/Manual/BestPractices.pod index 3a8e104..c11eda0 100644 --- a/lib/Moose/Manual/BestPractices.pod +++ b/lib/Moose/Manual/BestPractices.pod @@ -133,13 +133,12 @@ of object in the parent class. Don't know what we're talking about? That's fine. -=head2 Use L instead of C +=head2 Use L traits instead of C The C feature is a bit troublesome. Directly exposing a complex attribute is ugly. Instead, consider using -L to define an API that exposes those pieces -of functionality that need exposing. Then you can expose just the -functionality that you want. +L traits to define an API that exposes only +necessary pieces of functionality. =head2 Always call C in the most specific subclass diff --git a/lib/Moose/Manual/MooseX.pod b/lib/Moose/Manual/MooseX.pod index cd8a7d9..4535a71 100644 --- a/lib/Moose/Manual/MooseX.pod +++ b/lib/Moose/Manual/MooseX.pod @@ -23,31 +23,8 @@ This document covers a few of the ones we like best. =head1 L -If you only look at one extension, it should be this one. It provides -the equivalent of delegation for all of Perl's native data types, such -as array reference, hash references, numbers, strings, etc. - -This lets you create I cleaner and fluent APIs. - - package User; - - use Moose; - use MooseX::AttributeHelpers; - - has '_orders' => ( - metaclass => 'Collection::Array', - is => 'ro', - isa => 'ArrayRef', - default => sub { [] }, - provides => { - push => 'add_order', - shift => 'next_order', - elements => 'orders', - }, - ); - -Instead of directly exposing an array reference, we have three -well-named, easy to use methods. +The functionality of this MooseX module has been moved into Moose core. +See L. =head1 L