in reply to Running a program off a CD

Another, and better than previous, idea come into my mind.

I propose you to start your script with "loading" all your modules and shared libraries that your script can use.

You have a set of files that are perl modules, or bootstrap files, or shared libraries. Then at the very beginning of your script you call some subroutines from each of those modules. For example, create hidden Entry, fire some events that will be processed by your script (keystrokes, mouse movements, and so on). Then create listbox, do something with it, and so on. After that destroy those widgets without even showing them.

Once your shared libraries will be loaded from CD-ROM into memory, system will not read them second time, so your problem will be solved.

Courage, the Cowardly Dog
things, I do for love to perl...

Replies are listed 'Best First'.
Re: Re: Running a program off a CD
by metlhed_ (Beadle) on Aug 14, 2002 at 16:33 UTC

    The modules are not the only thing that need to be loaded into memory. The program itself is a couple thousand lines and there is a directory structure on the CD that is required for another part of it.

    A ramdisk seems to be a good way to go, if I can find out how to do it.

      Okay, (I just shared my experience)...

      But creating a RAM drive is very OS-dependant thing, and most OSes do not allow that... I can't imagine how ramdrive could be created on any of Win32 systems. (Yes, I imagine it is possible for Win95 after some fight with config.sys and rebooting, but this is way harder than creating just temporary directory via standard modules).

      OTOH initially you asked how to load your program into memory - I can share my vision on this. If your program needs something more (what is it, namely?) then there should be another way to cache that data (or part of it) into memory, using similar approaches.

      Courage, the Cowardly Dog
      things, I do for love to perl...