When set to logical false, the EvalReader (#=(...)) is disabled in the
read/load in the thread-local binding.
Example: (binding [*read-eval* false] (read-string "#=(eval (def x 3))"))

Defaults to true

1 Example top

  • ;;just from the doc
    (binding [*read-eval* false] (read-string "#=(eval (def x 3))"))
    => EvalReader not allowed when *read-eval* is false.
      [Thrown class java.lang.RuntimeException]
    ;;remove the anonymous function:
    (binding [*read-eval* false] (read-string "(def x 3)"))
    => (def x 3)
    ;;which is evaluable
    (eval (binding [*read-eval* false] (read-string "(def x 3)")))
    => #'user/x
Log in to add / edit an example.

See Also top

Log in to add a see also.

Comments top

No comments for *read-eval*. Log in to add a comment.