First I'm sorry if this question seems vague, because I'm new to Julia and I'm mostly just wondering in Julia if there's an easy way to modify a native function of a package while simply using all its dependencies in general, or there has to be a package-specific solution.
For example, foo is a function from the package LibraryA, and it can be simply called and used as follows without problem:
using LibraryA
foo(args)
However, if I want a slightly modified version of foo(), say bar(), whose source code (mostly copy of the foo() function) is in a separate file bar.jl and uses a lot of dependencies from LibraryA, the lines
using LibraryA
include("bar.jl")
bar(args)
will not work as lots of loaderrors occur:
LoadError: UndefVarError: vars not defined
where vars are the variables defined in the package LibraryA