Message-Id: <
20020222230107.A15069@rafael>
p4raw-id: //depot/perl@14837
GvENAME((GV*)dstr));
}
}
- cv_ckproto(cv, (GV*)dstr,
- SvPOK(sref) ? SvPVX(sref) : Nullch);
+ if (!intro)
+ cv_ckproto(cv, (GV*)dstr,
+ SvPOK(sref) ? SvPVX(sref) : Nullch);
}
GvCV(dstr) = (CV*)sref;
GvCVGEN(dstr) = 0; /* Switch off cacheness. */
use warnings;
-print "1..44\n";
+print "1..47\n";
# type coersion on assignment
$foo = 'foo';
print $g;
}
+{
+ my $w = '';
+ $SIG{__WARN__} = sub { $w = $_[0] };
+ sub abc1 ();
+ local *abc1 = sub { };
+ print $w eq '' ? "ok 45\n" : "not ok 45\n# $w";
+ sub abc2 ();
+ local *abc2;
+ *abc2 = sub { };
+ print $w eq '' ? "ok 46\n" : "not ok 46\n# $w";
+ sub abc3 ();
+ *abc3 = sub { };
+ print $w =~ /Prototype mismatch/ ? "ok 47\n" : "not ok 47\n# $w";
+}
+
__END__
ok 44