projects
/
gitmo/Moose.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Improve documentation on Moose::Util::TypConstraints "role_type" and "class_type"
[gitmo/Moose.git]
/
t
/
attributes
/
lazy_no_default.t
1
#!/usr/bin/perl
2
3
use strict;
4
use warnings;
5
6
use Test::More;
7
use Test::Fatal;
8
9
{
10
package Foo;
11
use Moose;
12
13
::like(
14
::exception{ has foo => (
15
is => 'ro',
16
lazy => 1,
17
);
18
},
19
qr/\QYou cannot have a lazy attribute (foo) without specifying a default value for it/,
20
'lazy without a default or builder throws an error'
21
);
22
}
23
24
done_testing;