diff options
author | Ovid <publiustemp-p5p3@yahoo.com> | 2006-10-19 01:47:48 -0700 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-10-23 08:51:02 +0000 |
commit | 9b6f3a2799817e49df9aa5ce0e1223e07b2091a0 (patch) | |
tree | b81166807f3a5aeed5de503b31a666c2bdf33789 /lib/base | |
parent | fd40a117d944c5311ff8dd0bde49755b81f72661 (diff) | |
download | perl-9b6f3a2799817e49df9aa5ce0e1223e07b2091a0.tar.gz |
base.pm
Message-ID: <20061019154748.87433.qmail@web60824.mail.yahoo.com>
p4raw-id: //depot/perl@29090
Diffstat (limited to 'lib/base')
-rw-r--r-- | lib/base/t/base.t | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/base/t/base.t b/lib/base/t/base.t index 0ddd238439..d0e94f8b3c 100644 --- a/lib/base/t/base.t +++ b/lib/base/t/base.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use Test::More tests => 10; +use Test::More tests => 11; use_ok('base'); @@ -55,6 +55,13 @@ like( $@, qr/^Base class package "reallyReAlLyNotexists" is empty./, eval q{use base 'reallyReAlLyNotexists'}; like( $@, qr/^Base class package "reallyReAlLyNotexists" is empty./, ' still empty on 2nd load'); +{ + my $warning; + local $SIG{__WARN__} = sub { $warning = shift }; + eval q{package HomoGenous; use base 'HomoGenous';}; + like($warning, qr/^Class 'HomoGenous' tried to inherit from itself/, + ' self-inheriting'); +} BEGIN { $Has::Version_0::VERSION = 0 } |