6 use Test::More tests => 6;
11 use_ok('MooseX::Storage');
20 with Storage(base => 'WithChecksum');
22 has 'number' => ( is => 'ro', isa => 'Int' );
23 has 'string' => ( is => 'ro', isa => 'Str' );
24 has 'float' => ( is => 'ro', isa => 'Num' );
25 has 'array' => ( is => 'ro', isa => 'ArrayRef' );
26 has 'hash' => ( is => 'ro', isa => 'HashRef' );
27 has 'object' => ( is => 'ro', isa => 'Foo' );
36 hash => { map { $_ => undef } ( 1 .. 10 ) },
37 object => Foo->new( number => 2 ),
39 isa_ok( $foo, 'Foo' );
41 my $packed = $foo->pack;
47 checksum => re('[0-9a-f]+'),
52 hash => { map { $_ => undef } ( 1 .. 10 ) },
55 checksum => re('[0-9a-f]+'),
59 '... got the right frozen class'
64 $foo2 = Foo->unpack($packed);
65 } '... unpacked okay';
72 checksum => re('[0-9a-f]+'),
77 hash => { map { $_ => undef } ( 1 .. 10 ) },
80 checksum => re('[0-9a-f]+'),
84 '... got the right frozen class'