Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: changing source code in run time

by dHarry (Abbot)
on Jun 20, 2011 at 11:31 UTC ( #910554=note: print w/replies, xml ) Need Help??


in reply to changing source code in run time

You can use the eval function to run perl code on-the-fly. I mean, supply some perl code to a running script, and from that script run the supplied code with the eval function. Whether or not that's a good idea is another matter. But is does sound a bit like a X-Y problem. Why do you think you need this feature, e.g. what are you trying to achieve?

Cheers

Harry

Replies are listed 'Best First'.
Re^2: changing source code in run time
by BigJoe (Curate) on Jun 20, 2011 at 22:42 UTC
    I've used what Harry noted here to pull code from a Database and later a version control system. I built it so that if the eval fails it will try the next older version. This way the developers don't ever need access to the production servers and they have to load the code into version control to get it into production. Plus I built some nice "Change Management" around it. :)


    --BigJoe

    Learn patience, you must.
    Young PerlMonk, craves Not these things.
    Use the source Luke.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://910554]
help
Chatterbox?
[1nickt]: ... if I involved my wife (or myself) in an altercation over a slogan.
[1nickt]: I will not convince anyone who disagrees with me, with a sticker. And I don;t need to advertise my thoughts, really.
[Discipulus]: ++1nickt but what about: "out immigrants! just redskins!"
[1nickt]: I know what I believe and whether I have integrity. My actions will speak more.
[karlgoethebier]: choroba Nothing unclever in my sig. And remember: Beeing too clever is a bad mistake ;-)
[1nickt]: This is not to suggest that Karl should remove his slogan. Just thoughts of mine... Trust me I believe I am very much more radical than most, and if I had a slogan for every gross injustice in my sig, there would be no more bytes!
Discipulus redskins .. well native american..
[1nickt]: So if I was to offer any editorial advice it would be to (1) make it endure time passing (2) make it positive (3) make it about you and your beliefs
[1nickt]: (Disicpulus The new best choice is maybe "First People"
[karlgoethebier]: Discipulus: This is called "Volksverhetzung" in German which means

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (12)
As of 2017-06-22 12:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (519 votes). Check out past polls.