Forum Moderators: coopster & phranque

Message Too Old, No Replies

Installing ActivePerl modules

Not finding it.

         

adni18

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

WebmasterWorld Senior Member 10+ Year Member



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?

kalos

6:58 pm on Jan 25, 2005 (gmt 0)

10+ Year Member



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.

-ben

doortodoororganics

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



Any tips installing on XP.

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

kalos

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

10+ Year Member



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

<Directory />
Options Indexes ExecCGI FollowSymLinks
AllowOverride None
</Directory>

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