Do you fully understand the reason for that warning? Perl is telling you that it may already have in-lined this sub and that your change is no longer guaranteed to actually change the value of FOO. You should only ignore this warning if you are certain that you are NOT changing the value of any constant subroutine.
Comment on Re: Suppressing "Constant Subroutine Redeifined" Error
Yes, I understand. The change is being done at BEGIN time, which happens before any inlineing occurs. Further, it's only done for our test scripts, not the production environment.
---- I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
: () { :|:& };:
Note: All code is untested, unless otherwise stated