MooX-LazierAttributes

 view release on metacpan or  search on metacpan

t/11-construct_attribute.t  view on Meta::CPAN

    name => '_construct_attributes a ro attribute that is required',
);

run_test_isa( 
    args => ['ro', Str, { default => sub { 'Hello World' } } ],
    expected => 'Hello World',
    name => '_construct_attributes with a Type::Tiny Isa',
);

run_test_isa( 
    args => ['ro', HashRef, ],
    expected => 'Hello World',
    name => '_construct_attributes with a Type::Tiny Isa',
);

run_test_isa( 
    args => ['ro', [qw/one two three/], { isa => ArrayRef }],
    expected => 'Hello World',
    name => '_construct_attributes with a Type::Tiny Isa',
);

sub run_test {
    my %test = @_;
    return is_deeply( {&MooX::LazierAttributes::_construct_attribute(@{ $test{args} })}, $test{expected}, "$test{name}");
}

sub run_test_default {



( run in 0.614 second using v1.01-cache-2.11-cpan-5f2e87ce722 )