projects
/
gitmo/MooseX-UndefTolerant.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
aa8680a92db4e113fd61d7931c36465e88c87c25
[gitmo/MooseX-UndefTolerant.git]
/
t
/
defaults.t
1
#!/usr/bin/perl
2
3
use Test::More;
4
5
package Foo;
6
7
use Moose;
8
use MooseX::UndefTolerant::Attribute;
9
10
has bar => (
11
is => 'rw',
12
traits => ['MooseX::UndefTolerant::Attribute'],
13
default => 'baz'
14
);
15
16
1;
17
18
package main;
19
20
my $foo = Foo->new( bar => undef );
21
is ( $foo->bar, 'baz', 'does the default value get set when passing undef in the constructor' );
22
23
done_testing;