4 use Test::More tests => 5;
7 use_ok('MooseX::Storage');
8 use_ok('MooseX::Storage::Util');
17 hash => { map { $_ => undef } ( 1 .. 10 ) },
24 my $json = '{"array":[1,2,3,4,5,6,7,8,9,10],"hash":{"6":null,"3":null,"7":null,"9":null,"2":null,"8":null,"1":null,"4":null,"10":null,"5":null},"float":10.5,"object":{"number":2,"__CLASS__":"Foo"},"number":10,"__CLASS__":"Foo","string":"foo"}';
57 is('Foo', MooseX::Storage::Util->peek($packed),
58 '... got the right class name from the packed item');
61 my $classname = eval {
62 MooseX::Storage::Util->peek($json => ('format' => 'JSON'))
64 if ($@ =~ /^Could not load JSON module because/) {
65 skip "No JSON module found", 1;
69 '... got the right class name from the json item');
73 my $classname = eval {
74 MooseX::Storage::Util->peek($yaml => ('format' => 'YAML'))
76 if ($@ =~ /^Could not load YAML module because/
77 or $@ =~ /^Can't locate Best/
79 skip "No YAML module found", 1;
83 '... got the right class name from the yaml item');