Showing posts with label perl. Show all posts
Showing posts with label perl. Show all posts

Sunday, January 30, 2011

how to install perl modules

One of the simplest ways to install Perl Modules, with ActiveState Perl Package Manager.

If you're lucky enough to host your Perl apps in a server without firewall and proxy constraints...
Just launch DOS and run ppm!
e.g.
c:\>ppm
ppm>install PAR-Packer
bla bla bla....
ppm>exit

If your server is residing behind a firewall or is using proxy, the most common problem you will see is "Could not locate a PPD file for package xxxX".
A simpler alternative (than consulting the network admin and setting proxy env vars) would be to:
Search for PPM packages at http://ppm4.activestate.com/ or numerous other repositories such as http://www.bribes.org/perl/ppmdir.html
Download the Perl module archive (tar.gz) and the .ppd file, and place them in a local directory. Make sure the path does not contain spaces.
Launch ppm from command line and set the repository to your local directory.
e.g.
c:\>ppm
ppm>set rep Local c:\perl\addon
ppm>set
ppm>install PAR-Packer

Thursday, January 27, 2011

How to create exe from Perl files

Option 1: Use a Perl package such as PAR or PAR-Packer.
Assuming you have installed ActiveState ActivePerl, just go to command prompt and run the following:
ppm (launch perl package manager)
search (confirm the package available for download)
install

More info:
PAR-Packer: http://search.cpan.org/~rschupp/PAR-Packer-1.008/lib/pp.pm
example: pp -o packed.exe source.pl

Option 2: Use Perl2Exe.
http://www.indigostar.com/perl2exe.php
Download the version compatible with your Perl Installation and unzip the contents. Refer to the readme for more info.
Basically the command should just be perl2exe yourscriptname.pl

Option 3:
Use perlcc built-in command. I 'm not sure whether this works for Windows though.
Related Posts Plugin for WordPress, Blogger...