in reply to How to call a perl function without its context?

This is Perl we are talking about? Not JavaScript? If you have come from a JavaScript background you have a bunch of stuff about scope and lifetime to unlearn.

If you don't have JavaScript baggage you need to tell us more about what your concerns are. Show us some code and tell us more about why this "protection" is important to you.

Premature optimization is the root of all job security
  • Comment on Re: How to call a perl function without its context?

Replies are listed 'Best First'.
Re^2: How to call a perl function without its context?
by kitomer (Novice) on Jul 28, 2015 at 11:46 UTC
    I do not have any code to show at the moment because I am just "thinking about the problem" right now. I want to automatically create testsuites for functions that create random inputs to detect any errors or misbehaviours. But in order to make sure a function is actually pure (not grabbing anything from global namespace or closure-scope) I would like to run it some kind of "sandbox".