Commit | Line | Data |
4fa64e86 |
1 | #!/usr/bin/perl |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
6 | use Test::More no_plan => 1; |
7 | use Test::Exception; |
8 | |
9 | BEGIN { |
10 | use_ok('MooseX::Storage'); |
11 | } |
12 | |
13 | { |
14 | package Foo; |
15 | use Moose; |
16 | use MooseX::Storage; |
17 | |
18 | with Storage; |
19 | |
20 | has 'bar' => ( |
21 | metaclass => 'DoNotSerialize', |
22 | is => 'rw', |
23 | default => sub { 'BAR' } |
24 | ); |
25 | |
26 | has 'baz' => ( |
27 | traits => [ 'DoNotSerialize' ], |
28 | is => 'rw', |
29 | default => sub { 'BAZ' } |
30 | ); |
31 | |
32 | has 'gorch' => ( |
33 | is => 'rw', |
34 | default => sub { 'GORCH' } |
35 | ); |
36 | |
37 | 1; |
38 | } |
39 | |
40 | my $foo = Foo->new; |
41 | isa_ok($foo, 'Foo'); |
42 | |
43 | |