#!/usr/bin/perl -w
use
strict;
my
$warnings
;
BEGIN {
$SIG
{__WARN__} =
sub
{
$warnings
=
join
''
,
@_
};
}
{
}
{
}
::like
$warnings
,
'/^Bar is inheriting from Foo but already has its own fields!/'
,
'Inheriting from a base with protected fields warns'
;