use Test::Moose 'does_ok';
BEGIN {
- use_ok('MooseX::AttributeHelpers');
+ use_ok('Moose::AttributeHelpers');
}
{
use Moose;
has 'counter' => (
- traits => [qw/MooseX::AttributeHelpers::Trait::Counter/],
+ traits => [qw/Counter/],
is => 'ro',
isa => 'Int',
default => sub { 0 },
# check the meta ..
my $counter = $page->meta->get_attribute('counter');
-does_ok($counter, 'MooseX::AttributeHelpers::Trait::Counter');
+does_ok($counter, 'Moose::AttributeHelpers::Trait::Counter');
is($counter->helper_type, 'Num', '... got the expected helper type');
use Test::Moose 'does_ok';
BEGIN {
- use_ok('MooseX::AttributeHelpers');
+ use_ok('Moose::AttributeHelpers');
}
{
use Moose;
has 'options' => (
- traits => [qw/MooseX::AttributeHelpers::Trait::Collection::Array/],
+ traits => [qw/Collection::Array/],
is => 'ro',
isa => 'ArrayRef[Str]',
default => sub { [] },
## test the meta
my $options = $stuff->meta->get_attribute('options');
-does_ok($options, 'MooseX::AttributeHelpers::Trait::Collection::Array');
+does_ok($options, 'Moose::AttributeHelpers::Trait::Collection::Array');
is_deeply($options->handles,
'add_options' => 'push',
use Test::Moose 'does_ok';
BEGIN {
- use_ok('MooseX::AttributeHelpers');
+ use_ok('Moose::AttributeHelpers');
}
{
package Stuff;
use Moose;
- use MooseX::AttributeHelpers;
+ use Moose::AttributeHelpers;
has 'options' => (
- traits => [qw/MooseX::AttributeHelpers::Trait::Collection::Hash/],
+ traits => [qw/Collection::Hash/],
is => 'ro',
isa => 'HashRef[Str]',
default => sub { {} },
## test the meta
my $options = $stuff->meta->get_attribute('options');
-does_ok($options, 'MooseX::AttributeHelpers::Trait::Collection::Hash');
+does_ok($options, 'Moose::AttributeHelpers::Trait::Collection::Hash');
is_deeply($options->handles, {
'add_options' => 'push',
use Test::Moose;
BEGIN {
- use_ok('MooseX::AttributeHelpers');
+ use_ok('Moose::AttributeHelpers');
}
{
use Moose;
has 'integer' => (
- traits => [qw/MooseX::AttributeHelpers::Trait::Number/],
+ traits => [qw/Number/],
is => 'ro',
isa => 'Int',
default => sub { 5 },
## test the meta
my $attr = $real->meta->get_attribute('integer');
-does_ok($attr, 'MooseX::AttributeHelpers::Trait::Number');
+does_ok($attr, 'Moose::AttributeHelpers::Trait::Number');
is_deeply($attr->handles, {
set => 'set',
use Test::Moose 'does_ok';
BEGIN {
- use_ok('MooseX::AttributeHelpers');
+ use_ok('Moose::AttributeHelpers');
}
{
use Moose;
has '_options' => (
- traits => [qw/MooseX::AttributeHelpers::Trait::Collection::List/],
+ traits => [qw/Collection::List/],
is => 'ro',
isa => 'ArrayRef[Int]',
init_arg => 'options',
## test the meta
my $options = $stuff->meta->get_attribute('_options');
-does_ok($options, 'MooseX::AttributeHelpers::Trait::Collection::List');
+does_ok($options, 'Moose::AttributeHelpers::Trait::Collection::List');
is_deeply($options->handles, {
'num_options' => 'count',
use Test::Moose 'does_ok';
BEGIN {
- use_ok('MooseX::AttributeHelpers');
+ use_ok('Moose::AttributeHelpers');
}
{
package Stuff;
use Moose;
- use MooseX::AttributeHelpers;
+ use Moose::AttributeHelpers;
has 'word_histogram' => (
- traits => [qw/MooseX::AttributeHelpers::Trait::Collection::Bag/],
+ traits => [qw/Collection::Bag/],
is => 'ro',
handles => {
'add_word' => 'add',
## test the meta
my $words = $stuff->meta->get_attribute('word_histogram');
-does_ok($words, 'MooseX::AttributeHelpers::Trait::Collection::Bag');
+does_ok($words, 'Moose::AttributeHelpers::Trait::Collection::Bag');
is_deeply($words->handles, {
'add_word' => 'add',
use Test::Moose 'does_ok';
BEGIN {
- use_ok('MooseX::AttributeHelpers');
+ use_ok('Moose::AttributeHelpers');
}
{
use Moose;
has 'string' => (
- traits => [qw/MooseX::AttributeHelpers::Trait::String/],
+ traits => [qw/String/],
is => 'rw',
isa => 'Str',
default => sub { '' },
# check the meta ..
my $string = $page->meta->get_attribute('string');
-does_ok($string, 'MooseX::AttributeHelpers::Trait::String');
+does_ok($string, 'Moose::AttributeHelpers::Trait::String');
is($string->helper_type, 'Str', '... got the expected helper type');
use warnings;
use Test::More tests => 8;
-use MooseX::AttributeHelpers;
+use Moose::AttributeHelpers;
{
package Room;
use Moose;
has 'is_lit' => (
- traits => ['MooseX::AttributeHelpers::Trait::Bool'],
+ traits => ['Bool'],
is => 'rw',
isa => 'Bool',
default => sub { 0 },