use Moose;
-use Moose::AttributeHelpers::Trait::Bool;
-use Moose::AttributeHelpers::Trait::Counter;
-use Moose::AttributeHelpers::Trait::Number;
-use Moose::AttributeHelpers::Trait::String;
-use Moose::AttributeHelpers::Trait::Collection::List;
-use Moose::AttributeHelpers::Trait::Collection::Array;
-use Moose::AttributeHelpers::Trait::Collection::Hash;
-use Moose::AttributeHelpers::Trait::Collection::ImmutableHash;
+use Moose::Meta::Attribute::Trait::Native::Bool;
+use Moose::Meta::Attribute::Trait::Native::Counter;
+use Moose::Meta::Attribute::Trait::Native::Number;
+use Moose::Meta::Attribute::Trait::Native::String;
+use Moose::Meta::Attribute::Trait::Native::List;
+use Moose::Meta::Attribute::Trait::Native::Array;
+use Moose::Meta::Attribute::Trait::Native::Hash;
+use Moose::Meta::Attribute::Trait::Native::ImmutableHash;
1;
use Moose::AttributeHelpers;
has 'mapping' => (
- traits => [ 'Collection::Hash' ],
+ traits => [ 'Hash' ],
is => 'rw',
isa => 'HashRef[Str]',
default => sub { {} },
=over
-=item L<Number|Moose::AttributeHelpers::Trait::Number>
+=item L<Number|Moose::Meta::Attribute::Trait::Native::Number>
Common numerical operations.
-=item L<String|Moose::AttributeHelpers::Trait::String>
+=item L<String|Moose::Meta::Attribute::Trait::Native::String>
Common methods for string operations.
-=item L<Counter|Moose::AttributeHelpers::Trait::Counter>
+=item L<Counter|Moose::Meta::Attribute::Trait::Native::Counter>
Methods for incrementing and decrementing a counter attribute.
-=item L<Bool|Moose::AttributeHelpers::Trait::Bool>
+=item L<Bool|Moose::Meta::Attribute::Trait::Native::Bool>
Common methods for boolean values.
-=item L<Collection::Hash|Moose::AttributeHelpers::Trait::Collection::Hash>
+=item L<Hash|Moose::Meta::Attribute::Trait::Native::Hash>
Common methods for hash references.
-=item L<Collection::ImmutableHash|Moose::AttributeHelpers::Trait::Collection::ImmutableHash>
+=item L<ImmutableHash|Moose::Meta::Attribute::Trait::Native::ImmutableHash>
Common methods for inspecting hash references.
-=item L<Collection::Array|Moose::AttributeHelpers::Trait::Collection::Array>
+=item L<Array|Moose::Meta::Attribute::Trait::Native::Array>
Common methods for array references.
-=item L<Collection::List|Moose::AttributeHelpers::Trait::Collection::List>
+=item L<List|Moose::Meta::Attribute::Trait::Native::List>
Common list methods for array references.
When declaring an attribute, you can declare a metaclass or a set of
traits for the attribute:
- use MooseX::AttributeHelpers;
+ use Moose::AttributeHelpers;
has 'mapping' => (
- metaclass => 'Collection::Hash',
+ metaclass => 'Hash',
is => 'ro',
default => sub { {} },
);
-In this case, the metaclass C<Collection::Hash> really refers to
-L<MooseX::AttributeHelpers::Collection::Hash>.
+In this case, the metaclass C<Hash> really refers to
+L<Moose::Meta::Attribute::Trait::Native::Hash>.
You can also apply one or more traits to an attribute:
-package Moose::AttributeHelpers::Trait::Collection::Array;
+package Moose::Meta::Attribute::Trait::Native::Array;
use Moose::Role;
our $VERSION = '0.87';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
-use Moose::AttributeHelpers::MethodProvider::Array;
+use Moose::Meta::Attribute::Trait::Native::MethodProvider::Array;
-with 'Moose::AttributeHelpers::Trait::Collection';
+with 'Moose::Meta::Attribute::Trait::Native::Collection';
has 'method_provider' => (
is => 'ro',
isa => 'ClassName',
predicate => 'has_method_provider',
- default => 'Moose::AttributeHelpers::MethodProvider::Array'
+ default => 'Moose::Meta::Attribute::Trait::Native::MethodProvider::Array'
);
sub _helper_type { 'ArrayRef' }
no Moose::Role;
package # hide me from search.cpan.org
- Moose::Meta::Attribute::Custom::Trait::Collection::Array;
+ Moose::Meta::Attribute::Custom::Trait::Array;
sub register_implementation {
- 'Moose::AttributeHelpers::Trait::Collection::Array'
+ 'Moose::Meta::Attribute::Trait::Native::Array'
}
=head1 NAME
-Moose::AttributeHelpers::Collection::Array
+Moose::Meta::Attribute::Trait::Native::Array
=head1 SYNOPSIS
use Moose::AttributeHelpers;
has 'options' => (
- metaclass => 'Collection::Array',
+ metaclass => 'Array',
is => 'ro',
isa => 'ArrayRef[Int]',
default => sub { [] },
=head1 DESCRIPTION
This module provides an Array attribute which provides a number of
-array operations. See L<Moose::AttributeHelpers::MethodProvider::Array>
+array operations. See L<Moose::Meta::Attribute::Trait::Native::MethodProvider::Array>
for more details.
=head1 METHODS
-package Moose::AttributeHelpers::Trait::Base;
+package Moose::Meta::Attribute::Trait::Native::Base;
use Moose::Role;
use Moose::Util::TypeConstraints;
=head1 NAME
-Moose::AttributeHelpers::Trait::Base - base role for helpers
+Moose::Meta::Attribute::Trait::Native::Base - base role for helpers
=head1 BUGS
-package Moose::AttributeHelpers::Trait::Bool;
+package Moose::Meta::Attribute::Trait::Native::Bool;
use Moose::Role;
-use Moose::AttributeHelpers::MethodProvider::Bool;
+use Moose::Meta::Attribute::Trait::Native::MethodProvider::Bool;
our $VERSION = '0.87';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
-with 'Moose::AttributeHelpers::Trait::Base';
+with 'Moose::Meta::Attribute::Trait::Native::Base';
sub _default_is { 'rw' }
sub _helper_type { 'Bool' }
is => 'ro',
isa => 'ClassName',
predicate => 'has_method_provider',
- default => 'Moose::AttributeHelpers::MethodProvider::Bool'
+ default => 'Moose::Meta::Attribute::Trait::Native::MethodProvider::Bool'
);
no Moose::Role;
package # hide me from search.cpan.org
Moose::Meta::Attribute::Custom::Trait::Bool;
-sub register_implementation { 'Moose::AttributeHelpers::Trait::Bool' }
+sub register_implementation { 'Moose::Meta::Attribute::Trait::Native::Bool' }
1;
=head1 NAME
-Moose::AttributeHelpers::Bool
+Moose::Meta::Attribute::Trait::Native::Bool
=head1 SYNOPSIS
-package Moose::AttributeHelpers::Trait::Collection;
+package Moose::Meta::Attribute::Trait::Native::Collection;
use Moose::Role;
our $VERSION = '0.87';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
-with 'Moose::AttributeHelpers::Trait::Base';
+with 'Moose::Meta::Attribute::Trait::Native::Base';
no Moose::Role;
=head1 NAME
-Moose::AttributeHelpers::Collection - Base class for all collection type helpers
+Moose::Meta::Attribute::Trait::Native::Collection - Base class for all collection type helpers
=head1 DESCRIPTION
-package Moose::AttributeHelpers::Trait::Counter;
+package Moose::Meta::Attribute::Trait::Native::Counter;
use Moose::Role;
our $VERSION = '0.87';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
-use Moose::AttributeHelpers::MethodProvider::Counter;
+use Moose::Meta::Attribute::Trait::Native::MethodProvider::Counter;
-with 'Moose::AttributeHelpers::Trait::Base';
+with 'Moose::Meta::Attribute::Trait::Native::Base';
has 'method_provider' => (
is => 'ro',
isa => 'ClassName',
predicate => 'has_method_provider',
- default => 'Moose::AttributeHelpers::MethodProvider::Counter',
+ default => 'Moose::Meta::Attribute::Trait::Native::MethodProvider::Counter',
);
sub _default_default { 0 }
package # hide me from search.cpan.org
Moose::Meta::Attribute::Custom::Trait::Counter;
-sub register_implementation { 'Moose::AttributeHelpers::Trait::Counter' }
+sub register_implementation { 'Moose::Meta::Attribute::Trait::Native::Counter' }
1;
=head1 NAME
-Moose::AttributeHelpers::Counter
+Moose::Meta::Attribute::Trait::Native::Counter
=head1 SYNOPSIS
-package Moose::AttributeHelpers::Trait::Collection::Hash;
+package Moose::Meta::Attribute::Trait::Native::Hash;
use Moose::Role;
our $VERSION = '0.87';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
-use Moose::AttributeHelpers::MethodProvider::Hash;
+use Moose::Meta::Attribute::Trait::Native::MethodProvider::Hash;
-with 'Moose::AttributeHelpers::Trait::Collection';
+with 'Moose::Meta::Attribute::Trait::Native::Collection';
has 'method_provider' => (
is => 'ro',
isa => 'ClassName',
predicate => 'has_method_provider',
- default => 'Moose::AttributeHelpers::MethodProvider::Hash'
+ default => 'Moose::Meta::Attribute::Trait::Native::MethodProvider::Hash'
);
sub _helper_type { 'HashRef' }
no Moose::Role;
package # hide me from search.cpan.org
- Moose::Meta::Attribute::Custom::Trait::Collection::Hash;
+ Moose::Meta::Attribute::Custom::Trait::Hash;
sub register_implementation {
- 'Moose::AttributeHelpers::Trait::Collection::Hash'
+ 'Moose::Meta::Attribute::Trait::Native::Hash'
}
=head1 NAME
-Moose::AttributeHelpers::Collection::Hash
+Moose::Meta::Attribute::Trait::Native::Hash
=head1 SYNOPSIS
use Moose::AttributeHelpers;
has 'options' => (
- metaclass => 'Collection::Hash',
+ metaclass => 'Hash',
is => 'ro',
isa => 'HashRef[Str]',
default => sub { {} },
=head1 DESCRIPTION
This module provides a Hash attribute which provides a number of
-hash-like operations. See L<Moose::AttributeHelpers::MethodProvider::Hash>
+hash-like operations. See L<Moose::Meta::Attribute::Trait::Native::MethodProvider::Hash>
for more details.
=head1 METHODS
-package Moose::AttributeHelpers::Trait::Collection::ImmutableHash;
+package Moose::Meta::Attribute::Trait::Native::ImmutableHash;
use Moose::Role;
our $VERSION = '0.87';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
-use Moose::AttributeHelpers::MethodProvider::ImmutableHash;
+use Moose::Meta::Attribute::Trait::Native::MethodProvider::ImmutableHash;
-with 'Moose::AttributeHelpers::Trait::Collection';
+with 'Moose::Meta::Attribute::Trait::Native::Collection';
has 'method_provider' => (
is => 'ro',
isa => 'ClassName',
predicate => 'has_method_provider',
- default => 'Moose::AttributeHelpers::MethodProvider::ImmutableHash'
+ default => 'Moose::Meta::Attribute::Trait::Native::MethodProvider::ImmutableHash'
);
sub _helper_type { 'HashRef' }
no Moose::Role;
package # hide me from search.cpan.org
- Moose::Meta::Attribute::Custom::Trait::Collection::ImmutableHash;
+ Moose::Meta::Attribute::Custom::Trait::ImmutableHash;
sub register_implementation {
- 'Moose::AttributeHelpers::Trait::Collection::ImmutableHash'
+ 'Moose::Meta::Attribute::Trait::Native::ImmutableHash'
}
=head1 NAME
-Moose::AttributeHelpers::Collection::ImmutableHash
+Moose::Meta::Attribute::Trait::Native::ImmutableHash
=head1 SYNOPSIS
use Moose::AttributeHelpers;
has 'options' => (
- metaclass => 'Collection::ImmutableHash',
+ metaclass => 'ImmutableHash',
is => 'ro',
isa => 'HashRef[Str]',
default => sub { {} },
=head1 DESCRIPTION
This module provides a immutable HashRef attribute which provides a number of
-hash-line operations. See L<Moose::AttributeHelpers::MethodProvider::ImmutableHash>
+hash-line operations. See L<Moose::Meta::Attribute::Trait::Native::MethodProvider::ImmutableHash>
for more details.
=head1 METHODS
-package Moose::AttributeHelpers::Trait::Collection::List;
+package Moose::Meta::Attribute::Trait::Native::List;
use Moose::Role;
our $VERSION = '0.87';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
-use Moose::AttributeHelpers::MethodProvider::List;
+use Moose::Meta::Attribute::Trait::Native::MethodProvider::List;
-with 'Moose::AttributeHelpers::Trait::Collection';
+with 'Moose::Meta::Attribute::Trait::Native::Collection';
has 'method_provider' => (
is => 'ro',
isa => 'ClassName',
predicate => 'has_method_provider',
- default => 'Moose::AttributeHelpers::MethodProvider::List'
+ default => 'Moose::Meta::Attribute::Trait::Native::MethodProvider::List'
);
sub _helper_type { 'ArrayRef' }
no Moose::Role;
package # hide me from search.cpan.org
- Moose::Meta::Attribute::Custom::Trait::Collection::List;
+ Moose::Meta::Attribute::Custom::Trait::List;
sub register_implementation {
- 'Moose::AttributeHelpers::Trait::Collection::List'
+ 'Moose::Meta::Attribute::Trait::Native::List'
}
=head1 NAME
-Moose::AttributeHelpers::Collection::List
+Moose::Meta::Attribute::Trait::Native::List
=head1 SYNOPSIS
use Moose::AttributeHelpers;
has 'options' => (
- metaclass => 'Collection::List',
+ metaclass => 'List',
is => 'ro',
isa => 'ArrayRef[Int]',
default => sub { [] },
=head1 DESCRIPTION
This module provides an List attribute which provides a number of
-list operations. See L<Moose::AttributeHelpers::MethodProvider::List>
+list operations. See L<Moose::Meta::Attribute::Trait::Native::MethodProvider::List>
for more details.
=head1 METHODS
-package Moose::AttributeHelpers::MethodProvider::Array;
+package Moose::Meta::Attribute::Trait::Native::MethodProvider::Array;
use Moose::Role;
our $VERSION = '0.87';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
-with 'Moose::AttributeHelpers::MethodProvider::List';
+with 'Moose::Meta::Attribute::Trait::Native::MethodProvider::List';
sub push : method {
my ( $attr, $reader, $writer ) = @_;
=head1 NAME
-Moose::AttributeHelpers::MethodProvider::Array
+Moose::Meta::Attribute::Trait::Native::MethodProvider::Array
=head1 DESCRIPTION
This is a role which provides the method generators for
-L<Moose::AttributeHelpers::Collection::Array>.
+L<Moose::Meta::Attribute::Trait::Native::Array>.
=head1 METHODS
-package Moose::AttributeHelpers::MethodProvider::Bool;
+package Moose::Meta::Attribute::Trait::Native::MethodProvider::Bool;
use Moose::Role;
our $VERSION = '0.87';
=head1 NAME
-Moose::AttributeHelpers::MethodProvider::Bool
+Moose::Meta::Attribute::Trait::Native::MethodProvider::Bool
=head1 DESCRIPTION
This is a role which provides the method generators for
-L<Moose::AttributeHelpers::Bool>.
+L<Moose::Meta::Attribute::Trait::Native::Bool>.
=head1 METHODS
-package Moose::AttributeHelpers::MethodProvider::Counter;
+package Moose::Meta::Attribute::Trait::Native::MethodProvider::Counter;
use Moose::Role;
our $VERSION = '0.87';
=head1 NAME
-Moose::AttributeHelpers::MethodProvider::Counter
+Moose::Meta::Attribute::Trait::Native::MethodProvider::Counter
=head1 DESCRIPTION
This is a role which provides the method generators for
-L<Moose::AttributeHelpers::Counter>.
+L<Moose::Meta::Attribute::Trait::Native::Counter>.
=head1 METHODS
-package Moose::AttributeHelpers::MethodProvider::Hash;
+package Moose::Meta::Attribute::Trait::Native::MethodProvider::Hash;
use Moose::Role;
our $VERSION = '0.87';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
-with 'Moose::AttributeHelpers::MethodProvider::ImmutableHash';
+with 'Moose::Meta::Attribute::Trait::Native::MethodProvider::ImmutableHash';
sub set : method {
my ( $attr, $reader, $writer ) = @_;
=head1 NAME
-Moose::AttributeHelpers::MethodProvider::Hash
+Moose::Meta::Attribute::Trait::Native::MethodProvider::Hash
=head1 DESCRIPTION
This is a role which provides the method generators for
-L<Moose::AttributeHelpers::Collection::Hash>.
+L<Moose::Meta::Attribute::Trait::Native::Hash>.
This role is composed from the
-L<Moose::AttributeHelpers::Collection::ImmutableHash> role.
+L<Moose::Meta::Attribute::Trait::Native::ImmutableHash> role.
=head1 METHODS
-package Moose::AttributeHelpers::MethodProvider::ImmutableHash;
+package Moose::Meta::Attribute::Trait::Native::MethodProvider::ImmutableHash;
use Moose::Role;
our $VERSION = '0.87';
=head1 NAME
-Moose::AttributeHelpers::MethodProvider::ImmutableHash
+Moose::Meta::Attribute::Trait::Native::MethodProvider::ImmutableHash
=head1 DESCRIPTION
This is a role which provides the method generators for
-L<Moose::AttributeHelpers::Collection::ImmutableHash>.
+L<Moose::Meta::Attribute::Trait::Native::ImmutableHash>.
=head1 METHODS
-package Moose::AttributeHelpers::MethodProvider::List;
+package Moose::Meta::Attribute::Trait::Native::MethodProvider::List;
use Moose::Role;
our $VERSION = '0.87';
=head1 NAME
-Moose::AttributeHelpers::MethodProvider::List
+Moose::Meta::Attribute::Trait::Native::MethodProvider::List
=head1 SYNOPSIS
use Moose::AttributeHelpers;
has 'options' => (
- metaclass => 'Collection::List',
+ metaclass => 'List',
is => 'rw',
isa => 'ArrayRef[Str]',
default => sub { [] },
=head1 DESCRIPTION
This is a role which provides the method generators for
-L<Moose::AttributeHelpers::Collection::List>.
+L<Moose::Meta::Attribute::Trait::Native::List>.
=head1 METHODS
-package Moose::AttributeHelpers::MethodProvider::String;
+package Moose::Meta::Attribute::Trait::Native::MethodProvider::String;
use Moose::Role;
our $VERSION = '0.87';
=head1 NAME
-Moose::AttributeHelpers::MethodProvider::String
+Moose::Meta::Attribute::Trait::Native::MethodProvider::String
=head1 DESCRIPTION
This is a role which provides the method generators for
-L<Moose::AttributeHelpers::String>.
+L<Moose::Meta::Attribute::Trait::Native::String>.
=head1 METHODS
-package Moose::AttributeHelpers::Trait::Number;
+package Moose::Meta::Attribute::Trait::Native::Number;
use Moose::Role;
our $VERSION = '0.87';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
-with 'Moose::AttributeHelpers::Trait::Base';
+with 'Moose::Meta::Attribute::Trait::Native::Base';
sub _helper_type { 'Num' }
package # hide me from search.cpan.org
Moose::Meta::Attribute::Custom::Trait::Number;
-sub register_implementation { 'Moose::AttributeHelpers::Trait::Number' }
+sub register_implementation { 'Moose::Meta::Attribute::Trait::Native::Number' }
1;
=head1 NAME
-Moose::AttributeHelpers::Number
+Moose::Meta::Attribute::Trait::Native::Number
=head1 SYNOPSIS
-package Moose::AttributeHelpers::Trait::String;
+package Moose::Meta::Attribute::Trait::Native::String;
use Moose::Role;
our $VERSION = '0.87';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
-use Moose::AttributeHelpers::MethodProvider::String;
+use Moose::Meta::Attribute::Trait::Native::MethodProvider::String;
-with 'Moose::AttributeHelpers::Trait::Base';
+with 'Moose::Meta::Attribute::Trait::Native::Base';
has 'method_provider' => (
is => 'ro',
isa => 'ClassName',
predicate => 'has_method_provider',
- default => 'Moose::AttributeHelpers::MethodProvider::String',
+ default => 'Moose::Meta::Attribute::Trait::Native::MethodProvider::String',
);
sub _default_default { q{} }
package # hide me from search.cpan.org
Moose::Meta::Attribute::Custom::Trait::String;
-sub register_implementation { 'Moose::AttributeHelpers::Trait::String' }
+sub register_implementation { 'Moose::Meta::Attribute::Trait::Native::String' }
1;
=head1 NAME
-Moose::AttributeHelpers::String
+Moose::Meta::Attribute::Trait::Native::String
=head1 SYNOPSIS
#####################################################################
#
# has 'roles' => (
-# metaclass => 'Collection::Array',
+# metaclass => 'Array',
# reader => 'get_roles',
# isa => 'ArrayRef[Moose::Meta::Role]',
# default => sub { [] },
# );
#
# has 'excluded_roles_map' => (
-# metaclass => 'Collection::Hash',
+# metaclass => 'Hash',
# reader => 'get_excluded_roles_map',
# isa => 'HashRef[Str]',
# provides => {
# );
#
# has 'attribute_map' => (
-# metaclass => 'Collection::Hash',
+# metaclass => 'Hash',
# reader => 'get_attribute_map',
# isa => 'HashRef[Str]',
# provides => {
# );
#
# has 'required_methods' => (
-# metaclass => 'Collection::Hash',
+# metaclass => 'Hash',
# reader => 'get_required_methods_map',
# isa => 'HashRef[Moose::Meta::Role::Method::Required]',
# provides => {
# # CODE refs to apply in that order
#
# has 'before_method_modifiers' => (
-# metaclass => 'Collection::Hash',
+# metaclass => 'Hash',
# reader => 'get_before_method_modifiers_map',
# isa => 'HashRef[ArrayRef[CodeRef]]',
# provides => {
# );
#
# has 'after_method_modifiers' => (
-# metaclass => 'Collection::Hash',
+# metaclass => 'Hash',
# reader =>'get_after_method_modifiers_map',
# isa => 'HashRef[ArrayRef[CodeRef]]',
# provides => {
# );
#
# has 'around_method_modifiers' => (
-# metaclass => 'Collection::Hash',
+# metaclass => 'Hash',
# reader =>'get_around_method_modifiers_map',
# isa => 'HashRef[ArrayRef[CodeRef]]',
# provides => {
# # but instead just a single name->code mapping
#
# has 'override_method_modifiers' => (
-# metaclass => 'Collection::Hash',
+# metaclass => 'Hash',
# reader =>'get_override_method_modifiers_map',
# isa => 'HashRef[CodeRef]',
# provides => {
use Moose::AttributeHelpers;
has 'options' => (
- traits => ['Collection::Array'],
+ traits => ['Array'],
is => 'ro',
isa => 'ArrayRef[Foo]',
);
use Moose::AttributeHelpers;
has 'stuff' => (
- traits => ['Collection::Array'],
+ traits => ['Array'],
is => 'ro',
isa => 'ArrayRef',
handles => {
# check the meta ..
my $counter = $page->meta->get_attribute('counter');
-does_ok( $counter, 'Moose::AttributeHelpers::Trait::Counter' );
+does_ok( $counter, 'Moose::Meta::Attribute::Trait::Native::Counter' );
is( $counter->type_constraint->name, 'Num',
'... got the expected default type constraint' );
use Moose::AttributeHelpers;
has observers => (
- traits => ['Collection::Array'],
+ traits => ['Array'],
is => 'ro',
isa => 'ArrayRef[Observer]',
auto_deref => 1,
# check the meta ..
my $counter = $page->meta->get_attribute('counter');
-does_ok( $counter, 'Moose::AttributeHelpers::Trait::Counter' );
+does_ok( $counter, 'Moose::Meta::Attribute::Trait::Native::Counter' );
is( $counter->type_constraint->name, 'Int',
'... got the expected type constraint' );
use Moose::AttributeHelpers;
has 'options' => (
- traits => ['Collection::Array'],
+ traits => ['Array'],
is => 'ro',
isa => 'ArrayRef[Str]',
default => sub { [] },
## test the meta
my $options = $stuff->meta->get_attribute('options');
-does_ok( $options, 'Moose::AttributeHelpers::Trait::Collection::Array' );
+does_ok( $options, 'Moose::Meta::Attribute::Trait::Native::Array' );
is_deeply(
$options->handles,
use Moose::AttributeHelpers;
has 'options' => (
- traits => ['Collection::Hash'],
+ traits => ['Hash'],
is => 'ro',
isa => 'HashRef[Str]',
default => sub { {} },
## test the meta
my $options = $stuff->meta->get_attribute('options');
-does_ok( $options, 'Moose::AttributeHelpers::Trait::Collection::Hash' );
+does_ok( $options, 'Moose::Meta::Attribute::Trait::Native::Hash' );
is_deeply(
$options->handles,
## test the meta
my $attr = $real->meta->get_attribute('integer');
-does_ok( $attr, 'Moose::AttributeHelpers::Trait::Number' );
+does_ok( $attr, 'Moose::Meta::Attribute::Trait::Native::Number' );
is_deeply(
$attr->handles,
use Moose::AttributeHelpers;
has '_options' => (
- traits => ['Collection::List'],
+ traits => ['List'],
is => 'ro',
isa => 'ArrayRef[Int]',
init_arg => 'options',
## test the meta
my $options = $stuff->meta->get_attribute('_options');
-does_ok( $options, 'Moose::AttributeHelpers::Trait::Collection::List' );
+does_ok( $options, 'Moose::Meta::Attribute::Trait::Native::List' );
is_deeply(
$options->handles,
# check the meta ..
my $string = $page->meta->get_attribute('string');
-does_ok( $string, 'Moose::AttributeHelpers::Trait::String' );
+does_ok( $string, 'Moose::Meta::Attribute::Trait::Native::String' );
is(
$string->type_constraint->name, 'Str',