include and eval for baremodule

question

#1

what is the preferred way to define include and eval in baremodule?

I just stumbled upon this and was suprised, that the documentation does not say anything about how to restore this functionality. I just wanted to use another default for Base.+ and out of a sudden I am stuck with these missing defaults…


#2

This seems ok

baremodule xbare; 
eval(x) = Base.eval(xbare, x)
include(x) = Base.include(xbare, x)
end;

##from the outside versions
Base.eval(xbare, print("hello xbare"));
Base.include(xbare, "Somefile.jl")

#3

thanks a lot,
yes I found it 2 minutes after I post this question…

of course I wanted to immediately delete the question,
but julia discourse does not let one because questions first go to review and are not visible at all in that phase…

Thank you very much for pointing out the solution!!