summaryrefslogtreecommitdiff
path: root/t/bugs/create_anon_recursion.t
blob: 436048a4727880eddac0f1c6e84db7cfb8a2a048 (plain)
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
29
use strict;
use warnings;

use Test::More;
use Test::Fatal;

BEGIN {
    plan skip_all => "preloading things makes this test meaningless"
        if exists $INC{'Moose.pm'};
}

use Moose::Meta::Class;

$SIG{__WARN__} = sub { die if shift =~ /recurs/ };

TODO:
{
    local $TODO
        = 'Loading Moose::Meta::Class without loading Moose.pm causes weird problems';

    my $meta;
    is( exception {
        $meta = Moose::Meta::Class->create_anon_class(
            superclasses => [ 'Moose::Object', ],
        );
    }, undef, 'Class is created successfully' );
}

done_testing;