rbc has asked for the wisdom of the Perl Monks concerning the following question:

I don't know how to install the Tk.pm on my system. (Cygwin on NT)
I downloaded ...

http://cpan/valueclick/authors/id/NI-S/Bundle-Tk-1.00.tar.gz

gunzip'ed it
untarred it
did the perl Makefile.PL && make && make test && make install

Everything seemed fine except when I tried to run a perl script that uses Tk.pm.

I get
Can't locate Tk.pm in @INC
(@INC contains: /usr/lib/perl5/5.6.1/cygwin-multi
/usr/lib/perl5/5.6.1
/usr/lib/perl5/site_perl/5.6.1/cygwin-multi
/usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl .)
at ./tetris.pl line 8.
BEGIN failed--compilation aborted at ./tetris.pl line 8.

What am I doing wrong???

thanks

Replies are listed 'Best First'.
Re: problem installing Tk.pm
by George_Sherston (Vicar) on Dec 18, 2001 at 00:52 UTC
    Is one of the directories listed as being in @INC the directory you put Tk.pm into? If not, then you need to tell Perl where to look, by putting
    use lib your/path;
    before you have
    use Tk;
    (where "your/path" is the directory where you put Tk.pm).

    § George Sherston
Re: problem installing Tk.pm
by strat (Canon) on Dec 18, 2001 at 19:27 UTC
    If you don't want to do so, you can also set the environment-variable PERL5LIB to the Path where you installed Tk...

    Best regards,
    perl -e "print a|r,p|d=>b|p=>chr 3**2 .7=>t and t"

Re: problem installing Tk.pm
by rbc (Curate) on Dec 18, 2001 at 23:07 UTC
    oops!

    I finally realized that I downloaded
    the wrong file!

    I needed to download Tk800.023.
    I hope that will solve my problem.

    Thanks to everyone the responded.

    --
    Its like a dog that can sing and dance.
    It's remarkable because it can do it.
    Not that it can do it well.
Re: problem installing Tk.pm
by rbc (Curate) on Dec 20, 2001 at 06:00 UTC
    Just an update,

    I downloaded Tk800.023 from CPAN.
    Followed the instructions in the README.cygwin file.

    And I had compiler errors
    After hacking the Makefile and moving .h
    files all over the place I was able to compile.
    But ... you guessed it ... I got linker errors.

    I went to the cygwin archieve site and posted my woes.

    The next day I was emailed the solution to my problems
    I needed to download a patch from Cygwin for this
    particular problem.

    Now I am a Perl/Tk manic!

    --
    Its like a dog that can sing and dance.
    It's remarkable because it can do it.
    Not that it can do it well.