joyent/node — Issue #2297: Use eval to allow looking into modules from the REPL
Author: thejh
Created: 2011-12-08 22:40:46+00:00
State: open

Hello,
I know, eval is evil and stuff, but this just sounds cool to me: You could look into modules from the REPL (a feature some people on the ML seemed to want a while ago) by passing a flag `--evalize-modules` or so that would ccause the module wrapper to contain something like this:

module.eval = function($$code) { return eval($$code) }

Then, the repl could have a special command like `!module ` to go into module contexts - it's already able to accept any eval-like function if I read the source correctly.