12 use open qw( :utf8 :std );
16 plan(skip_all => "Your system has no SIGALRM") if !exists $SIG{ALRM};
23 These are like the 010_complex_merge_classless test,
24 but an infinite loop has been made in the heirarchy,
25 to test that we can fail cleanly instead of going
30 # initial setup, everything sane
67 # A series of 8 aberations that would cause infinite loops,
68 # each one undoing the work of the previous
70 sub { @ǝ::ISA = qw/f/ },
71 sub { @ǝ::ISA = qw/ᛞ/; @ʗ::ISA = qw/f/ },
72 sub { @ʗ::ISA = qw//; @Ạ::ISA = qw/ƙ/ },
73 sub { @Ạ::ISA = qw//; @ᶨ::ISA = qw/f ƙ/ },
74 sub { @ᶨ::ISA = qw/f/; @ʰ::ISA = qw/ƙ ᶢ/ },
75 sub { @ʰ::ISA = qw/ᶢ/; @B::ISA = qw/B/ },
76 sub { @B::ISA = qw//; @ƙ::ISA = qw/ƙ ᶨ ィ/ },
77 sub { @ƙ::ISA = qw/ᶨ ィ/; @ᛞ::ISA = qw/Ạ ʰ B ʗ/ },
80 foreach my $loopy (@loopies) {
82 local $SIG{ALRM} = sub { die "ALRMTimeout" };
85 mro::get_linear_isa('ƙ', 'c3');
89 if($err =~ /ALRMTimeout/) {
90 ok(0, "Loop terminated by SIGALRM");
92 elsif($err =~ /Recursive inheritance detected/) {
93 ok(1, "Graceful exception thrown");
96 ok(0, "Unrecognized exception: $err");
100 ok(0, "Infinite loop apparently succeeded???");