Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

Installing ActivePerl modules

Not finding it.

12:30 am on Jan 25, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 15, 2004
votes: 0

Hi. I'm trying out ActivePerl, and I just tried to install the Imager module, but I get an error message saying: cannot locate Imager.pm. I just copied the module and pasted it in /lib. Did I miss something?
6:58 pm on Jan 25, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:July 17, 2004
votes: 0

To install a module you would want to use PPM (Perl Package Manager). If it is something that ActiveState has not ported (which is true for 5.8) then you can still use it by copying the .pm file into where ever your script will be and appending the following to your script just after

use strict;
use warnings;

use Imager;

The script will load the module that way. If you wanted to keep your personal modules in a central place you could create a subdirectory called 'libs' (if this is a web project) off of your docroot and change the above syntax to:

use libs/Imager.pm;

Again, that's assuming the script is in your docroot. Needless to say, you can have module files anywhere as long as the script can find them. I got the file to load but since I hadn't installed the complete package (Imager::Colorer, et al) it failed when I attempted to create a blank image using the sample script on the CPAN page.

Unfortunately there seems to be no Windows port so you would need the Cgwin package (*nix utilities for Windows) and have to download and 'make', 'make install' the Imager package manually. It does look cool though, having used ImageMagick in the past.


4:23 pm on Jan 28, 2005 (gmt 0)

Junior Member

joined:Jan 25, 2004
votes: 0

Any tips installing on XP.

I have apache installed and have ActivePerl- sitting on my machine. Will this build automatically configure the connection with the server?

8:10 pm on Jan 28, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:July 17, 2004
votes: 0

You'll have to enable it in the httpd.conf file thusly:

<Directory />
Options Indexes ExecCGI FollowSymLinks
AllowOverride None

This will enable cgi anywhere on your webserver. You'll also need to add this (search for AddHandler and uncomment it):

AddHandler cgi-script .cgi


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members