summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/dist/base/t/isa.t
blob: bd5ee7fc3c653041703b68746229453d7d5ad1f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/perl -w

# Regression test some quirky behavior of base.pm.

use strict;
use Test::More tests => 1;

{
    package Parent;

    sub foo { 42 }

    package Middle;

    use base qw(Parent);

    package Child;

    base->import(qw(Middle Parent));
}

is_deeply [@Child::ISA], [qw(Middle)],
          'base.pm will not add to @ISA if you already are-a';