in reply to runtime eval() and constants

s/require/use/g or move the 'require' outside of the eval and you'll get more of what you expected. BAREWORD only turns into a call to the BAREWORD subroutine if the subroutine is defined when the BAREWORD code is compiled. In your examples, the require and BAREWORD statements are compiled first, then the require is run (which finally defines the BAREWORD() subroutine) -- so the subroutine isn't defined when the BAREWORD statement is compiled.

Update: And if you want it to complain about barewords, then you need to use strict.

                - tye
  • Comment on Re: runtime eval() and constants (order)