Scarborough has asked for the wisdom of the Perl Monks concerning the following question:

I have a lot (600+) scripts which are saved as modules with one sub routine in them. I then have some scheduling code which works out which of these scripts is required today and loads them dinamically and runs them .
Like this
#find the next program and assign to $program_file #Get the sub name which is file name minus .pm eval{ require $program_file; no strict; &$sub_name(\$params); }
This is working fine on our development boxs but a request has been made to move this to a box without PERL so I need to compile the code.

Does anyone know if this will still work if I compile my 600+ scripts as DLL's or executebles? Any feed back gratefully recieved.

Replies are listed 'Best First'.
Re: Requires behaviour when PERL is compiled
by davidrw (Prior) on Jul 09, 2005 at 11:20 UTC
    This should work for you using PAR ... Since the $program_file seems to be determined at runtime, it probably can't figure out the full dependency list, but you can explicitly add modules with pp's <c>-<M/c> switch.
Re: Requires behaviour when PERL is compiled
by Tanktalus (Canon) on Jul 09, 2005 at 14:39 UTC

    This always strikes me as odd. "I want you to install MS Office on this machine, but without DLLs." That's basically what the requestor is asking for. Or maybe, "I want to see all those animations on the web, but on a machine without Flash or Java installed." Or even, "I want to run Excel on my toaster oven." The proper answer should be something along the lines of laughing at the requestor for a few minutes before calming down and asking, "You're kidding, right?" Feel free to adapt to your own personality - my personality is somewhat snarky, so it may not be in line with who you are. Under no circumstances should the answer be, "Uh, ok."

    With our off-the-shelf software, we have some Java-based programs. We install Java with our software. Another of our products (not my department) use perl for some of their command-line tools. They install perl with their software. (Boy do I wish my department would go along with that ;-})

    I'd suggest something along the lines of, "Oh, it doesn't have perl? Let's fix that, and then my scripts will work wonderfully." If they insist on not installing perl, then explain that you use perl like a DLL - and in the same way that Word wouldn't work without its DLLs, your scripts won't work without perl.

    Way safer than introducing yet another item in the mix - an item you haven't been testing with for months.