Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

perl2exe

Status
Not open for further replies.

SSG1

Programmer
Jan 17, 2002
48
US
Hi,
I have used perl2exe to convert all my perl scripts to exe's. I have a script1.pl(converted to exe script1.exe) which in turn calls
system(script2.exe) ###original script2.pl

script2.pl has a call to script3.exe.

When i run this on my machine script1 runs fine. However if I run it on another machine where no perl modules exist, I get an error complaining about a perl module missing.
When I converted the perl scripts to exe, I was under the assumption that i would not need to have the PERl modules exist in another machine to run the exe there. Is my assumption wrong ? What am I doing wrong here ? Any suggestions ?

Thanks.
 
Hi,

I have never used perl2exe, but I seem to remember that It compiles the perl scripts and packages the perl interpreter with the scipt. This eliminates the need for the target system to have perl installed. I'm not sure whether perl2exe would automatically include any perl modules called by your script. If it included them all, you application would suffer bloat. You might ask the folks that developed perl2exe about this.
Leland F. Jackson, CPA
Software - Master (TM)
Nothing Runs Like the Fox
 
Is the error something like: "Can't locate somemodule.pm in @INC at myscript.pl line 1"?

You can force the missing module to be compiled into the exe by adding a line like one of the following to your script:

use somemodule;

Or if the message is "Can't locate Foo/Bar.pm in ...":

use Foo::Bar;

hope this helps
When in doubt, deny all terms and defnitions.
 
Yes, the error is :
"Can't locate somemodule.pm in @INC at myscript.pl line 1"?

Do I need to include use somemodule in all my scripts that have been converted to exe's ?

Thanks.
 
SSG1

It is only one line of code, so I would definately add it to your scripts just to ensure they work on systems without the modules. I think it is actually trial and error that you would learn which ones execute properly without. this will cause file bloat depending on what modules you are using. When in doubt, deny all terms and defnitions.
 
that still doesn't answer the chaining question.

a few of possibilities that you can test by changing .exe locations on the target machine.
1) needs same path structure to find children,
2) children must be in same directory, or
3) children must be in path
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top