diff options
author | Michael G. Schwern <schwern@pobox.com> | 2007-09-18 17:39:40 -0700 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-09-19 07:52:40 +0000 |
commit | 00ed247ad44f2548d0ea02a06b0a1bb418a1c315 (patch) | |
tree | ebe12135974cc0826833ff5d895cb81cbac9a6a7 /lib/base | |
parent | 7fa653d884dcfb46cd756ee6975e6ee5b536f7ec (diff) | |
download | perl-00ed247ad44f2548d0ea02a06b0a1bb418a1c315.tar.gz |
Re: [PATCH] Re: Unintentional base.pm behavior change
Message-ID: <46F0D23C.6020105@pobox.com>
p4raw-id: //depot/perl@31895
Diffstat (limited to 'lib/base')
-rw-r--r-- | lib/base/t/isa.t | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/base/t/isa.t b/lib/base/t/isa.t new file mode 100644 index 0000000000..efe3386272 --- /dev/null +++ b/lib/base/t/isa.t @@ -0,0 +1,30 @@ +#!/usr/bin/perl -w + +# Regression test some quirky behavior of base.pm. + +BEGIN { + if( $ENV{PERL_CORE} ) { + chdir 't' if -d 't'; + @INC = qw(../lib); + } +} + +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';
\ No newline at end of file |