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

Replies are listed 'Best First'.
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