As a general practice it's good to avoid using ``eval`` unless absolutely necessary.  I think this same purpose here can be fulfilled by inspecting the globals() dictionary, and pulling out the objects needed.  When that fails, there will be much more meaningful error messages than when ``eval`` fails.