CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
How to make a EXE of a PL with included refrences.


New User

Apr 8, 2010, 9:13 PM

Post #1 of 2 (650 views)
How to make a EXE of a PL with included refrences. Can't Post

Hello Gurus,

Here is a intresting scenario. Scripts named,



Driver.Pl contains,

do '';

do '';

'some code here

Func1 and Func2 contain,

use switch;

use Data::Dumper;

use XMLParser::Simple;

'some code here.

My case,

There is a situation where i need to execute the perl script on machines which do not have perl installed. In broader terms lets say there is a request from a business team or analysts who simply work on marketing/product deployments to explain much to the client.Under these circumstances wherein the person is pretty apprehensive to install perl because he thinks it may upset something else. Now, we can argue endlessly on this convincing him to install but there is no point. So, I felt we should give just the exe and that should do the required tasks.

I searched, researched over the web only to find Perl2Exe. However that throws a error when i try to execute the driver.exe. It says "Undefined Subroutine &main:XML::Parser" and so forth. I tried all that they said, by inculding #Perl2exe_include..blah blah blah...but it still does not work.

I looked at PAR, PP, but i am unable to understand how to use it. Can anyone help me ?

Would also appreciate suggestions or any other methods available to achieve the above task.

thanks much,


Veteran / Moderator

Apr 9, 2010, 5:27 AM

Post #2 of 2 (641 views)
Re: [basanth] How to make a EXE of a PL with included refrences. [In reply to] Can't Post

These 2 lines are going to be a problem.

do ''; 

do '';

The best approach would be to make those into modules that are loaded with 'use' statements rather than 'do' statements. If the contents of those scripts are as their names imply, then a functional/procedural module style that exports the subs (as apposed to an OO module) would be the obvious approach.

Once you do that, then use the pp utility to make the .exe file.

pp -o driver.exe


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives