| 1 | use Test::More qw(no_plan); |
| 2 | use strict; |
| 3 | use warnings; |
| 4 | |
| 5 | use autobox::Core; |
| 6 | |
| 7 | my %struct = ( |
| 8 | ARRAY => [ 'foo' ], |
| 9 | HASH => { 'foo' => 1 }, |
| 10 | CODE => sub { 'foo' }, |
| 11 | ); |
| 12 | |
| 13 | foreach my $reftype ( keys %struct ) { |
| 14 | is $struct{$reftype}->ref, $reftype; |
| 15 | } |
| 16 | |
| 17 | TODO: { |
| 18 | todo_skip "Make it work for Regexp, Scalar and Glob", 3; |
| 19 | my %todo = ( |
| 20 | Regexp => qr/foo/, |
| 21 | SCALAR => \'foo', |
| 22 | GLOB => \*STDIN, |
| 23 | ); |
| 24 | |
| 25 | foreach my $reftype ( keys %todo ) { |
| 26 | is $todo{$reftype}->ref, $reftype; |
| 27 | } |
| 28 | } |
| 29 |