Subject: | Re: Problem with ReadKey.pm |
From: | Jonathan Stowe <jns [...] gellyfish.com> |
To: | Tania Dasgupta <dtania [...] gmail.com> |
CC: | bugs-TermReadKey [...] rt.cpan.org |
Date: | Wed, 28 Dec 2005 09:47:10 +0000 |
On Mon, 2005-12-26 at 10:43, Tania Dasgupta wrote:
Show quoted text
> Hi Jonathan
>
> I am facing a compilation issue when trying to use ReadKey on Windows.
>
> I am trying to use the GetTerminalSize method of ReadKey.pm for one of
> the scripts that I am developing. I downloaded the following package
> from CPAN:
>
> http://cpan.org/modules/by-module/Term/TermReadKey-2.30
>
> I extracted it to C:\Perl\lib\TermReadKey.
It won't work like that, the module has an XS component that requires a
C compiler to build. There is a PPM package for the module for
ActivePerl that you should just be able to install via PPM like:
C:\> ppm install TermReadKey
The modules package name is Term::ReadKey but it is packaged as
TermReadKey for historical reasons.
So once you have installed the module via PPM then you want to refer to
it as Term::ReadKey in your code.
/J\
Show quoted text>
> Now, the perl file that I am using is the following:
>
> #!/usr/bin/perl
>
> use TermReadKey::ReadKey;
>
> my @arrat = GetTerminalSize();
> print "@arrat\n";
>
> When I run this, I get the following error:
>
> Can't locate loadable object for module Term::ReadKey in @INC (@INC
> contains: C:/Perl/lib C:/Perl/site/lib .) at test.pl line
> 3
> Compilation failed in require at test.pl line 3.
> BEGIN failed--compilation aborted at test.pl line 3.
>
> I have ActivePerl installed on my machine. I cant understand why its
> looking for Term::ReadKey and not TermReadKey::ReadKey.
>
> Also, when I tried to install it on WIndows by using
> perl MakeFile.PL , make , then the make is failing. I ran the command
> perl -v:Make and it gave me:
>
> C:\Perl\lib\TermReadKey>perl -V:make
> make='nmake';
>
> but both gave me the same error:
>
> 'nmake' is not recognized as an internal or external command,
> operable program or batch file.
>
> When I put the ReadKey.pm in Term, then also it did not work.
> The installation worked on Unix though
>
> Can you please help me out in this ?
>
> --Thanks,
> Tania
--
This e-mail is sponsored by http://www.integration-house.com/