Skip to content
This repository
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 28 lines (23 sloc) 0.528 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
use Test::More qw(no_plan);
use strict;
use warnings;

use autobox::Core;

my %struct = (
    ARRAY => [ 'foo' ],
    HASH => { 'foo' => 1 },
    CODE => sub { 'foo' },
);

foreach my $reftype ( keys %struct ) {
    is $struct{$reftype}->ref, $reftype;
}

TODO: {
    todo_skip "Make it work for Regexp, Scalar and Glob", 3;
    my %todo = (
        Regexp => qr/foo/,
        SCALAR => \'foo',
        GLOB => \*STDIN,
    );

    foreach my $reftype ( keys %todo ) {
        is $todo{$reftype}->ref, $reftype;
    }
}
Something went wrong with that request. Please try again.