Error Message

Posted by Curio50 on 2008-06-21 23:18
Forums: PPM | OS: Windows XP Pro

Help! I am trying to run some Perl scripts on my laptop but keep gettng the following message:

"Can't locate (various modules) in @INC ....
Begin failed-compilation aborted"

What gives?


eddyjpn | Sun, 2008-06-22 04:09

Are you using the correct "Use ..." statements?

Curio50 | Mon, 2008-06-23 09:04

I'm a bit new to PERL. HOwever, I installed PERL on my D drive, rather than C. The script I am trying to run is :

#! c:\perl\bin\perl.exe
# Attempt to extract metadata from PDF files
# Usage:
# copyright 2006-2007 H. Carvey
use strict;
use PDF::API2;

my $file = shift || die "You must enter a filename.\n";
if (-e $file) {
my $pdf = PDF::API2->open($file);
if ($pdf) {
my %info = $pdf->info();
foreach (sort keys %info) {
printf "%-15s %-20s\n", $_ ,$info{$_};
else {
die "$file not found.\n";

I am careful to point to the .pdf file that I want to examine. Where would the "use" language be? Could I be having a problem b/c I installed on D drive, rather than C?


eddyjpn | Mon, 2008-06-23 09:14

If you have installed in D: then you want to remove this line:

#! c:\perl\bin\perl.exe

which tells the computer that perl is in C:

Also, on Windows, you don't need this line anyway. (Although it doesn't hurt to add the correct path).

Have you installed the PDF::API2 module properly using PPM? If not, the errors could be from there.

To solve the problem, (as with all debugging) start with a minimum script, see what works, and then add things until you find the line of code causing the problem.

Curio50 | Mon, 2008-06-23 13:52

Yes! I figured that putting the program on my D drive may have been an issue - I can fix that.

However, is the PDF::AP12 module part of the Perl install? i.e where do I get it?

RE the PPM? I'm running winxp and using the Perl program on just one computer at the moment, I don't know much about PPM but isn't it for network use, i.e. if I wanted to make this program available on a network to others? If not, what is the easiest way to enable this on my machine?

Thanks Anthony,

Curio50 | Mon, 2008-06-23 14:49

I see, the PDF::AP12 is an extension, and the PPM is the manager to install the extensions. Q. I don't seem to be able to access PPM from my perl 5.10 install via commandline - what directory is PPM usually in? I also recall during install some text talking about network stuff and administrtor console, but I ignored and proceeded with rest of install b/c I don't intend to network this machine.

Also, can I do some kind of module search (for PDF API3) via PPM if I can locate it and get it running


Curio50 | Mon, 2008-06-23 15:11

I did some research and found that I can get to PPM from command line, but only after a few seconds.. it then shows:

ttk paned deprecated pandedwindow instead

then the PPM windows appears

It seems to work, however I noticed that the package I installed was automatic, i.e it didn't ask me where to install. Again, do you think Ill have a problem b/c the program is on D drive?

Thanks Again for any adice!
MJ DeYoung

eddyjpn | Mon, 2008-06-23 20:16

If you are using ActiveState Perl, then the package will be installed in the right place by PPM, probably under perl/site/lib

Just ignore the message:

ttk paned deprecated pandedwindow instead

It's related to the GUI interface to PPM.

Curio50 | Tue, 2008-06-24 07:20

Hello Anthony,

I really appreciate the time you took to explain some of this stuff - things are going good.

Thanks Again!