With Perl being interpreted; is there any way to replace module X, with an updated module X1, in a running Perl process?

In a former life, I learned C++ from James Coplien's "Advanced C++" book, and a training course he gave. One technique he presented was how AT&T was updating software in their switches "on-the-fly". The running process would do a dynamic load, and switch pointers in a v-table to start using the new code, on the next object instantiation; without bringing down the process.

Obviously, this isn't for a linear start-to-stop program. But for long-running daemons, that do , say, network inspection; and a new (example only) BGP decoder is ready to be used. Can that be inserted into an existing monitor without disrupting state or the on-going monitor process.

I am familiar with the "save state, shutdown, patch, restart, restore, run" methodology; But each of those steps is a coding/testing/documenting effort, and it can't be done in the time between 2 packets on the wire(for example).

Thoughts...


In reply to On-the-fly module replacements : On topic - really by Wiggins

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.