# include and eval for baremodule

**URL:** <https://discourse.julialang.org/t/include-and-eval-for-baremodule/17245>\
**Category:** General Usage\
**Tags:** question\
**Created:** [November 7, 2018, 10:09am UTC](https://discourse.julialang.org/t/include-and-eval-for-baremodule/17245 "2018-11-07T10:09:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![schlichtanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/schlichtanders/32/32145_2.png) [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Post date:** [November 7, 2018, 10:09am UTC](https://discourse.julialang.org/t/include-and-eval-for-baremodule/17245/1 "2018-11-07T10:09:56Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![y4lu](https://avatars.discourse-cdn.com/v4/letter/y/47e85d/32.png) [@y4lu](https://discourse.julialang.org/u/y4lu)\
**Post date:** [November 7, 2018, 10:26am UTC](https://discourse.julialang.org/t/include-and-eval-for-baremodule/17245/2 "2018-11-07T10:26:16Z")

</div>

This seems ok

```julia
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")

```

---

<div class="post-metadata">

**Author:** ![schlichtanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/schlichtanders/32/32145_2.png) [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Post date:** [November 8, 2018, 1:31pm UTC](https://discourse.julialang.org/t/include-and-eval-for-baremodule/17245/3 "2018-11-08T13:31:20Z")

</div>

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!!
