On Thu, Mar 26, 2009 at 09:05:24AM +0100, Bram wrote:
> The subject of the patch ('mandatory warning') suggests that it is
> intended that the warning can't be disabled. (Which agrees with perldiag
> because of the lack of (W redefine))
If I were to hazard a guess, I'd say it's because const sub uses are
in-lined at compile-time; therefore changing the sub definition later is
likely to surprise the user:
sub FOO() { 1 };
*FOO = sub() {2};
print FOO, FOO(), &FOO(), "\n";
which prints
112
--
Never work with children, animals, or actors.
Thread Previous
|
Thread Next