Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

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?



Comment on Re: changing source code in run time
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. :)


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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (16)
As of 2015-11-24 22:34 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (664 votes), past polls