6 use Test::More tests => 5;
9 use_ok('MooseX::Storage');
10 use_ok('MooseX::Storage::Util');
19 hash => { map { $_ => undef } ( 1 .. 10 ) },
26 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"}';
59 is('Foo', MooseX::Storage::Util->peek($packed),
60 '... got the right class name from the packed item');
63 my $classname = eval {
64 MooseX::Storage::Util->peek($json => ('format' => 'JSON'))
66 if ($@ =~ /^Could not load JSON module because/) {
67 skip "No JSON module found", 1;
71 '... got the right class name from the json item');
75 my $classname = eval {
76 MooseX::Storage::Util->peek($yaml => ('format' => 'YAML'))
78 if ($@ =~ /^Could not load YAML module because/
79 or $@ =~ /^Can't locate Best/
81 skip "No YAML module found", 1;
85 '... got the right class name from the yaml item');