hoelzro / inline-lua

Perl extension for embedding Lua scripts into Perl code
4 stars 5 forks source link

exporting variables #15

Closed unhandyandy closed 9 years ago

unhandyandy commented 9 years ago

Am I correct in thinking that while functions are automatically exported from Inline Lua to Perl, variables are not? It seems the only way to make a variable defined in Lua available to Perl is to return it from a function.

If that's correct, what are your favorite workarounds?

If not, what am I probably doing wrong.

hoelzro commented 9 years ago

@unhandyandy I believe that is correct; I would just make a function that returns the variable in question.

unhandyandy commented 9 years ago

OK, thanks, I can deal with it.