Don't ask to ask, just ask | |
PerlMonks |
Re^3: How to call a perl function without its context?by marinersk (Priest) |
on Jul 30, 2015 at 16:53 UTC ( [id://1136893]=note: print w/replies, xml ) | Need Help?? |
I'll need to check out Safeand its family, as they may have addressed the problem. My current thought would be to develop each function (presuming this is synonymous with a Perl subroutine in this context) initially as a stand-alone file, with use strict;and use warnings;at the top and a calling routine built in. If it compiles without errors, there are no external references. Then a quick process to extract only the subroutine into your main code and you're off to the races. The weakness is that if one bypasses the build procedure, one can violate the constraint.
In Section
Seekers of Perl Wisdom
|
|