Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Data Access, Manipulation & Batch Languages > Perl and the DBI > Perl module installation

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-27-07, 07:22
qragamu qragamu is offline
Registered User
 
Join Date: Sep 2007
Posts: 2
Perl module installation

I am trying top install Win32::SerialPort.
I am behind a firewall so I cannot use the automated installation methods such as ppm.

perl Makefile.PL returns this:

C:\Perl\site\lib\SerialPort-0.19>perl Makefile.PL

Creating new t/DefaultPort.pm

Win32::SerialPort and Win32API::CommPort
VERSION 0.19
No 'Makefile' will be created
Test with: perl test.pl
Install with: perl install.pl

Test with nothing connected to COM1
or for different port: perl test.pl PORT
Timeout tests can take up to 30 seconds per test

Creating new test.pl
Creating new install.pl


When I run perl test.pl I get the screen rapidly scrolling due to errors, all reporting the same thing:

C:\Perl\site\lib\SerialPort-0.19>perl test.pl
t/test1....Can't locate Win32/API.pm in @INC (@INC contains: . ./t ./lib ../lib C:/Perl/lib C:/Perl/site/lib
)

So then I attempt to install Win32-API-0.41.tar.gz.

Again Makefile.PL runs fine:

C:\Perl\site\lib\Win32-API-0.41>perl Makefile.PL
Writing Makefile for Win32::API::Callback
Writing Makefile for Win32::API

C:\Perl\site\lib\Win32-API-0.41>


but running nmake test returns:

C:\Perl\site\lib\WIN32-~1.41>nmake test

PKSFX (R) FAST! Self Extract Utility Version 2.04g 02-01-93
Copr. 1989-1993 PKWARE Inc. All Rights Reserved. Shareware version
PKSFX Reg. U.S. Pat. and Tm. Off.

Searching EXE: C:/PERL/SITE/LIB/WIN32-~1.41/NMAKE.EXE

C:\Perl\site\lib\WIN32-~1.41
>

and nmake install returns:

C:\Perl\site\lib\WIN32-~1.41>nmake test

PKSFX (R) FAST! Self Extract Utility Version 2.04g 02-01-93
Copr. 1989-1993 PKWARE Inc. All Rights Reserved. Shareware version
PKSFX Reg. U.S. Pat. and Tm. Off.

Searching EXE: C:/PERL/SITE/LIB/WIN32-~1.41/NMAKE.EXE

C:\Perl\site\lib\WIN32-~1.41>



I have installed many Perl modules in the past and have seen this type of response to nmake test and install before, it always basically brings me to a grinding halt.

So, two questions:

1 Am I doing something wrong with the Win32-API-0.41 installation?

2 Do I have to perform this installation anyway, as I have API.PM already there at C:\perl\site\lib, but the Win32::SerialPort installation just doesn't see it.
Reply With Quote
  #2 (permalink)  
Old 09-27-07, 09:24
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 9,573
I've never seen a firewall interfere with ppm... I suspect that you have some other problem if ppm won't run.

-PatP
Reply With Quote
  #3 (permalink)  
Old 09-27-07, 09:36
qragamu qragamu is offline
Registered User
 
Join Date: Sep 2007
Posts: 2
Ppm

I have made the suggested Activestate http:\\proxy settings changes:

This is what happens with every attempt.

C:\Perl>ppm
PPM interactive shell (2.2.0) - type 'help' for available commands.
PPM> search win32
Error connecting to 'http://ppm.ActiveState.com/cgibin/PPM/ppmserver.pl?urn:/PPM
Server'.
PPM>
Reply With Quote
  #4 (permalink)  
Old 10-06-07, 03:10
sco08y sco08y is offline
Registered User
 
Join Date: Oct 2002
Location: Fort Polk, LA
Posts: 500
You have a firewall blocking HTTP requests? That sucks.

Anyway, if you have it installed you just need to make sure Perl is seeing it.

I don't run perl on Windows much, but try doing perl -V to see what your @INC is set to. You can add extra directories to your @INC stack with either the PERL5LIB environment variable or the lib module.

Another hairy issue: since this is not a pure perl module (it is hitting a DLL) the @INC stack needs to include the machine specific directories. You should see those with perl -V.

If you're confused, try this:

Code:
perl -Mlib=c:\perl\site\lib -MWin32::SerialPort -e 'print "yay"'

If that works, it's installed properly but you need to add it to your environment. Or you could just add the use lib line to your script. It's perl, so there's always ten different ways to accomplish what you're doing.

That code above is the same as running this script:

Code:
use lib 'c:\perl\site\lib'; use Win32::SerialPort; print "yay"

See perldoc perlrun if you don't understand the -M switch, or -V for that matter. See perldoc perlvar and perldoc perllib to learn about @INC and how modules are located.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On