From: Dave Rolsky Date: Fri, 26 Jun 2009 22:09:55 +0000 (-0500) Subject: comment cleanup in AH code X-Git-Tag: 0.89_02~99 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a65d84556cc433d87500f6b7da6ef08321aad9e4;p=gitmo%2FMoose.git comment cleanup in AH code --- diff --git a/lib/Moose/AttributeHelpers/Trait/Base.pm b/lib/Moose/AttributeHelpers/Trait/Base.pm index caace47..07f19c1 100644 --- a/lib/Moose/AttributeHelpers/Trait/Base.pm +++ b/lib/Moose/AttributeHelpers/Trait/Base.pm @@ -9,17 +9,14 @@ our $AUTHORITY = 'cpan:STEVAN'; requires '_helper_type'; -# these next two are the possible methods -# you can use in the 'handles' map. +# these next two are the possible methods you can use in the 'handles' +# map. -# provide a Class or Role which we can -# collect the method providers from +# provide a Class or Role which we can collect the method providers +# from -# requires_attr 'method_provider' - -# or you can provide a HASH ref of anon subs -# yourself. This will also collect and store -# the methods from a method_provider as well +# or you can provide a HASH ref of anon subs yourself. This will also +# collect and store the methods from a method_provider as well has 'method_constructors' => ( is => 'ro', isa => 'HashRef', @@ -37,12 +34,10 @@ has 'method_constructors' => ( }, ); -# extend the parents stuff to make sure -# certain bits are now required ... has '+default' => ( required => 1 ); has '+type_constraint' => ( required => 1 ); -## Methods called prior to instantiation +# methods called prior to instantiation before '_process_options' => sub { my ( $self, $name, $options ) = @_; @@ -91,7 +86,7 @@ around '_canonicalize_handles' => sub { } keys %$handles; }; -## methods called after instantiation +# methods called after instantiation before 'install_accessors' => sub { (shift)->_check_handles_values }; diff --git a/lib/Moose/AttributeHelpers/Trait/Bool.pm b/lib/Moose/AttributeHelpers/Trait/Bool.pm index 17d0f74..05bbc81 100644 --- a/lib/Moose/AttributeHelpers/Trait/Bool.pm +++ b/lib/Moose/AttributeHelpers/Trait/Bool.pm @@ -11,11 +11,8 @@ with 'Moose::AttributeHelpers::Trait::Base'; sub _default_is { 'rw' } sub _helper_type { 'Bool' } -# NOTE: -# we don't use the method provider for this -# module since many of the names of the provied -# methods would conflict with keywords -# - SL +# NOTE: we don't use the method provider for this module since many of +# the names of the provided methods would conflict with keywords - SL has 'method_provider' => ( is => 'ro', @@ -26,7 +23,6 @@ has 'method_provider' => ( no Moose::Role; -# register the alias ... package # hide me from search.cpan.org Moose::Meta::Attribute::Custom::Trait::Bool; sub register_implementation { 'Moose::AttributeHelpers::Trait::Bool' } diff --git a/lib/Moose/AttributeHelpers/Trait/Collection/Array.pm b/lib/Moose/AttributeHelpers/Trait/Collection/Array.pm index 6dbd305..5642ba4 100644 --- a/lib/Moose/AttributeHelpers/Trait/Collection/Array.pm +++ b/lib/Moose/AttributeHelpers/Trait/Collection/Array.pm @@ -21,7 +21,6 @@ sub _helper_type { 'ArrayRef' } no Moose::Role; -# register the alias ... package # hide me from search.cpan.org Moose::Meta::Attribute::Custom::Trait::Collection::Array; sub register_implementation { diff --git a/lib/Moose/AttributeHelpers/Trait/Collection/Bag.pm b/lib/Moose/AttributeHelpers/Trait/Collection/Bag.pm index d6adc43..9c697e3 100644 --- a/lib/Moose/AttributeHelpers/Trait/Collection/Bag.pm +++ b/lib/Moose/AttributeHelpers/Trait/Collection/Bag.pm @@ -27,7 +27,6 @@ sub _default_default { sub { {} } } no Moose::Role; no Moose::Util::TypeConstraints; -# register the alias ... package # hide me from search.cpan.org Moose::Meta::Attribute::Custom::Trait::Collection::Bag; sub register_implementation { diff --git a/lib/Moose/AttributeHelpers/Trait/Collection/Hash.pm b/lib/Moose/AttributeHelpers/Trait/Collection/Hash.pm index 3928523..215169e 100644 --- a/lib/Moose/AttributeHelpers/Trait/Collection/Hash.pm +++ b/lib/Moose/AttributeHelpers/Trait/Collection/Hash.pm @@ -21,7 +21,6 @@ sub _helper_type { 'HashRef' } no Moose::Role; -# register the alias ... package # hide me from search.cpan.org Moose::Meta::Attribute::Custom::Trait::Collection::Hash; sub register_implementation { diff --git a/lib/Moose/AttributeHelpers/Trait/Collection/ImmutableHash.pm b/lib/Moose/AttributeHelpers/Trait/Collection/ImmutableHash.pm index 62c952e..bc5daf2 100644 --- a/lib/Moose/AttributeHelpers/Trait/Collection/ImmutableHash.pm +++ b/lib/Moose/AttributeHelpers/Trait/Collection/ImmutableHash.pm @@ -21,7 +21,6 @@ sub _helper_type { 'HashRef' } no Moose::Role; -# register the alias ... package # hide me from search.cpan.org Moose::Meta::Attribute::Custom::Trait::Collection::ImmutableHash; sub register_implementation { diff --git a/lib/Moose/AttributeHelpers/Trait/Collection/List.pm b/lib/Moose/AttributeHelpers/Trait/Collection/List.pm index 780794c..a3e1713 100644 --- a/lib/Moose/AttributeHelpers/Trait/Collection/List.pm +++ b/lib/Moose/AttributeHelpers/Trait/Collection/List.pm @@ -21,7 +21,6 @@ sub _helper_type { 'ArrayRef' } no Moose::Role; -# register the alias ... package # hide me from search.cpan.org Moose::Meta::Attribute::Custom::Trait::Collection::List; sub register_implementation { diff --git a/lib/Moose/AttributeHelpers/Trait/Counter.pm b/lib/Moose/AttributeHelpers/Trait/Counter.pm index 6244a8a..118cd9f 100644 --- a/lib/Moose/AttributeHelpers/Trait/Counter.pm +++ b/lib/Moose/AttributeHelpers/Trait/Counter.pm @@ -39,7 +39,6 @@ after '_check_handles_values' => sub { no Moose::Role; -# register the alias ... package # hide me from search.cpan.org Moose::Meta::Attribute::Custom::Trait::Counter; sub register_implementation { 'Moose::AttributeHelpers::Trait::Counter' } diff --git a/lib/Moose/AttributeHelpers/Trait/Number.pm b/lib/Moose/AttributeHelpers/Trait/Number.pm index 7636655..7225b94 100644 --- a/lib/Moose/AttributeHelpers/Trait/Number.pm +++ b/lib/Moose/AttributeHelpers/Trait/Number.pm @@ -9,11 +9,8 @@ with 'Moose::AttributeHelpers::Trait::Base'; sub _helper_type { 'Num' } -# NOTE: -# we don't use the method provider for this -# module since many of the names of the provied -# methods would conflict with keywords -# - SL +# NOTE: we don't use the method provider for this module since many of +# the names of the provided methods would conflict with keywords - SL has 'method_constructors' => ( is => 'ro', @@ -55,7 +52,6 @@ has 'method_constructors' => ( no Moose::Role; -# register the alias ... package # hide me from search.cpan.org Moose::Meta::Attribute::Custom::Trait::Number; sub register_implementation { 'Moose::AttributeHelpers::Trait::Number' } diff --git a/lib/Moose/AttributeHelpers/Trait/String.pm b/lib/Moose/AttributeHelpers/Trait/String.pm index e3e4564..fc9e0b0 100644 --- a/lib/Moose/AttributeHelpers/Trait/String.pm +++ b/lib/Moose/AttributeHelpers/Trait/String.pm @@ -37,7 +37,6 @@ after '_check_handles_values' => sub { no Moose::Role; -# register the alias ... package # hide me from search.cpan.org Moose::Meta::Attribute::Custom::Trait::String; sub register_implementation { 'Moose::AttributeHelpers::Trait::String' }