Hmm, okay so, I tried looking up "constant subroutine" in man perldiag which told me to look at the "Constant Functions" section in man perlsub.
And I think that what that means is that since constants are inlined for efficiency, redefining the constant on the fly, won't update the places it had previously been inlined into at compile-time.
We could silence it in the same way that we silence "Subroutine redefined" in Apache::LiveJournal, but, assuming that what my understanding in the second paragraph is correct, this might result in some strange behavior, until we restart apache.
Another alternative: silence the warnings, but if a constant may have been redefined because its file was reloaded, print out one warning "Constants may have been redefined; restart web server" or something? It only affects dev servers so we can afford to restart servers as much as wanted.
no subject
man perldiag
which told me to look at the "Constant Functions" section inman perlsub
.And I think that what that means is that since constants are inlined for efficiency, redefining the constant on the fly, won't update the places it had previously been inlined into at compile-time.
We could silence it in the same way that we silence "Subroutine redefined" in Apache::LiveJournal, but, assuming that what my understanding in the second paragraph is correct, this might result in some strange behavior, until we restart apache.
Another alternative: silence the warnings, but if a constant may have been redefined because its file was reloaded, print out one warning "Constants may have been redefined; restart web server" or something? It only affects dev servers so we can afford to restart servers as much as wanted.