Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Perl don't seem to be able to find my module

27 views
Skip to first unread message

T

unread,
Jul 27, 2015, 11:00:45 PM7/27/15
to
Hi All,

Perl does not seem to be able to find a module
that instmodsh does show being there:

$ instmodsh

Available commands are:
cmd? l
Installed modules are:
Term::ReadKey


This line (5)
use Term::ReadKey::GetTerminalSize;

triggers this response:
Can't locate Term/ReadKey/GetTerminalSize.pm in @INC (@INC
contains: /usr/local/lib64/perl5 /usr/local/share/perl5
/usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl
/usr/lib64/perl5 /usr/share/perl5 .) at ./ScreenSize.pl
line 5.

Searching for the guys give me:
# find /usr -iname \*ReadKey\*
/usr/local/lib64/perl5/auto/Term/ReadKey
/usr/local/lib64/perl5/auto/Term/ReadKey/ReadKey.so
/usr/local/lib64/perl5/Term/ReadKey.pm
/usr/local/share/man/man3/Term::ReadKey.3pm
/usr/local/share/perl5/x86_64-linux-thread-multi/.meta/TermReadKey-2.33
/usr/lib64/perl5/vendor_perl/auto/Term/ReadKey
/usr/share/doc/perl-TermReadKey-2.30
/usr/share/man/man3/Term::ReadKey.3pm.gz

So it is indeed there.

Now what am I doing wrong?

Many thanks,
-T

shar...@hotmail.com

unread,
Jul 27, 2015, 11:37:58 PM7/27/15
to
On Tuesday, 28 July 2015 08:30:45 UTC+5:30, T wrote:

>
> This line (5)
> use Term::ReadKey::GetTerminalSize;
>
> triggers this response:
> Can't locate Term/ReadKey/GetTerminalSize.pm in @INC (@INC

>
> Now what am I doing wrong?
>
> Many thanks,
> -T

When you say "use Term::ReadKey::GetTerminalSize;"
then perl goes around looking for a module by the name of GetTerminalSize.pm
in the {@INC}/Term/ReadKey/ directories.

What you really need is ReadKey.pm module in which GetTerminalSize() is a func.

So modify the use statement to
use Term::ReadKey; # import all symbols in @EXPORT of ReadKey.pm
or:
use Term::ReadKey qw( GetTerminalSize ); # import only GetTerminalSize
0 new messages