This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: [perl #46217] (resent) Typeglobs vs. SUPER:: (Hook::LexWrap failure)
[perl5.git] / t / mro / basic_04_dfs.t
1 #!./perl
2
3 use strict;
4 use warnings;
5
6 require q(./test.pl); plan(tests => 1);
7
8 =pod 
9
10 From the parrot test t/pmc/object-meths.t
11
12  A   B A   E
13   \ /   \ /
14    C     D
15     \   /
16      \ /
17       F
18
19 =cut
20
21 {
22     package t::lib::A; use mro 'dfs';
23     package t::lib::B; use mro 'dfs';
24     package t::lib::E; use mro 'dfs';
25     package t::lib::C; use mro 'dfs'; use base ('t::lib::A', 't::lib::B');
26     package t::lib::D; use mro 'dfs'; use base ('t::lib::A', 't::lib::E');
27     package t::lib::F; use mro 'dfs'; use base ('t::lib::C', 't::lib::D');
28 }
29
30 ok(eq_array(
31     mro::get_linear_isa('t::lib::F'),
32     [ qw(t::lib::F t::lib::C t::lib::A t::lib::B t::lib::D t::lib::E) ]
33 ), '... got the right MRO for t::lib::F');  
34