Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to Re^2: How to call a perl function without its context?
in thread How to call a perl function without its context?

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1136893]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-24 06:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found