| 1 | #!/usr/bin/env perl |
| 2 | use Test::More tests => 2; |
| 3 | use autobox::Core; |
| 4 | |
| 5 | my %hash = ( 1 => 'foo', 3 => 'bar' ); |
| 6 | my $f; |
| 7 | |
| 8 | is_deeply( $f = %hash->flip, { foo => 1, bar => 3 } ); |
| 9 | |
| 10 | my %f = %hash->flip; |
| 11 | |
| 12 | is_deeply( \%f, { foo => 1, bar => 3 }, "Returns hash in list context" ); |
| 13 | |
| 14 | my %nested = ( 1 => { foo => 'bar' }, 2 => 'bar' ); |