Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Install updated version of script such that running instances cannot use an inconsistent state

by tobyink (Abbot)
on Jan 28, 2013 at 21:19 UTC ( #1015761=note: print w/ replies, xml ) Need Help??


in reply to Install updated version of script such that running instances cannot use an inconsistent state

Write your installation script so that it does things in the following order:

  1. Deletes the existing CGI scripts
  2. Pause for one second
  3. Deletes the existing modules
  4. Installs replacement modules
  5. Installs replacement CGI scripts
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name


Comment on Re: Install updated version of script such that running instances cannot use an inconsistent state
Re^2: Install updated version of script such that running instances cannot use an inconsistent state
by ambrus (Abbot) on Jan 28, 2013 at 21:28 UTC

    How do you know that one second is enough? A CGI script could run for longer than that sometimes.

      True, but I'd generally expect it to have at least finished compiling.

      package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2014-08-20 14:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (116 votes), past polls