1use Test::More; 2use strict; use warnings FATAL => 'all'; 3 4use List::Objects::WithUtils 'array'; 5 6my $arr = array( foo => 1, bar => 2 ); 7 8my $hash = $arr->inflate; 9 10ok $hash->does('List::Objects::WithUtils::Role::Hash'), 11 'inflate ok'; 12 13ok $hash->get('foo') == 1 && $hash->get('bar') == 2, 14 'inflated hash looks ok'; 15 16 17$hash = array->inflate; 18ok $hash->is_empty, 'empty array inflate ok'; 19 20done_testing; 21