Exfiltrator.jl
Exfiltrator.jl copied to clipboard
THIS PACKAGE IS NOT MAINTAINED
Similar functionality has been implemented in Infiltrator.jl. Please use that package instead of Exfiltrator.jl.
Exfiltrator
Exfiltrator is the reverse of Infiltrator.jl. It allows you to "exfiltrate" local variables from a function into the global scope.
using Exfiltrator
julia> function f(x)
@exfiltrate
end
f (generic function with 1 method)
julia> f(2)
julia> x
2
Also supported are @exfiltrate VAR
, which exfiltrates the local variables to the global variable VAR
as a named tuple, @exfiltrate VAR x
, which exfiltrates only x
, and the @exfiltrate_push! ARR
and @exfiltrate_push! ARR x
which push the exfiltrated variables to a global array.
You can avoid typing using Exfiltrator
by using
it at the REPL and then using Main.@exfiltrate
in your code.