Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2007
    Posts
    2

    Unanswered: 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.

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I've never seen a firewall interfere with ppm... I suspect that you have some other problem if ppm won't run.

    -PatP

  3. #3
    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>

  4. #4
    Join Date
    Oct 2002
    Location
    Baghdad, Iraq
    Posts
    697
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •