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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl files

Status
Not open for further replies.

Cybershmuck

Technical User
Jan 21, 2005
21
Hi,

I'm creating a simple gui which exceutes a perl script. At the moment the application is packaged into a zip file comtaining the gui.exe file and the perl script plus all the Perl library files.

I'm wondering if there is a way to compress all these libray files into a few files so that the application can be more compact.
What I mean is there a similar way like how Visual C++ compacts all the library files into a simple object file when you do the Build command.

Thanks in advance.

Stanley.
 
You can use the PAR module to bundle Perl files together. It contains a utility called `pp' that can compile your programs if you prefer.
 
The other choise you have is to compile the *.pl and lib files it uses into an *exe file. And call the perlfile.exe form your gui app.


``The wise man doesn't give the right answers,
he poses the right questions.''
TIMTOWTDI
 
PAR's pp can bundle all the parts together into a single .exe that runs, including other files, but it wouldn't really compress down to a smaller filesize. Unless your luck with perlcc is better than mine, you're stuck bundling an interpreter with the program, which always takes up a chunk of space.

________________________________________
Andrew

I work for a gift card company!
 
Thanks for thwe replies.

I tried typing in:

pp -o executable perlfile

but I got the error :
'pp' is not recognized as an internal or external command,
operable program or batch file.

I then tried:

perlcc -o abagen.exe abagen.pl

and got the error:

pcciOxlg.c(2379) : warning C4101: 'targ' : unreferenced local variable
pcciOxlg.c(6707) : warning C4101: 'targ' : unreferenced local variable

What am I doing wrong?

Thanks in advance :)
 
Have you installed the PAR module? pp is a utility thrown in your bin directory by the module/distribution PAR. Check your local cpan or ppm mirror.

________________________________________
Andrew

I work for a gift card company!
 
Sorry to sound dumb but how do I do that?

Cheers,

stan
 
Easiest to consult the Tek-Tips FAQ section: faq219-1687

________________________________________
Andrew

I work for a gift card company!
 
Ok now I've managed to install the PAR module and create and executable file.
The problem is that the original file needed some command line arguments.
I'm not sure how to parse these arguments to the executable file...
 
Does it not work the same? eg,

perl program.pl arg1 arg2
program.exe arg1 arg2

________________________________________
Andrew

I work for a gift card company!
 
Oops, I forgot to drop off the "perl" command when running the executable

Cheers mate :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top