# Extend methods from another module while calling the original method within the extended method

**URL:** <https://discourse.julialang.org/t/extend-methods-from-another-module-while-calling-the-original-method-within-the-extended-method/62791>\
**Category:** New to Julia\
**Tags:** package\
**Created:** [June 12, 2021, 12:49pm UTC](https://discourse.julialang.org/t/extend-methods-from-another-module-while-calling-the-original-method-within-the-extended-method/62791 "2021-06-12T12:49:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![hendri54](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hendri54/32/9621_2.png) [@hendri54](https://discourse.julialang.org/u/hendri54)\
**Post date:** [June 12, 2021, 7:09pm UTC](https://discourse.julialang.org/t/extend-methods-from-another-module-while-calling-the-original-method-within-the-extended-method/62791/2 "2021-06-12T19:09:17Z")

</div>

One option:

```julia
julia> module Foo
         myfunc(x) = println("Foo original");
         end
Main.Foo

julia> import .Foo.myfunc as foo_func

julia> foo_func(1)
Foo original

julia> myfunc(x) = println("Extended", foo_func(1))
myfunc (generic function with 1 method)

julia> myfunc(1)
Foo original
Extended

```

---

_[View the full topic](https://discourse.julialang.org/t/extend-methods-from-another-module-while-calling-the-original-method-within-the-extended-method/62791)._
