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

Dear Monks, I am using Ubuntu Linux system.I already installed Tk::Table module.But when i use ( either require Tk::Table or use Tk::Table)it gives Can't locate Tk/table.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) Error. So i again used install command to Tk::Table.It updated successfully.but it gives same error when i run again.. please help me to override already installed Tk::Table module.

Replies are listed 'Best First'.
Re: Override The Modules
by jethro (Monsignor) on May 11, 2011 at 11:37 UTC
    Case is significant. Use "Tk::Table" in your script instead of "Tk::table"
Re: Override The Modules
by Anonymous Monk on May 11, 2011 at 11:36 UTC
    Perl is case sensitive, Tk::Table is not Tk::table
Re: Override The Modules
by locked_user sundialsvc4 (Abbot) on May 11, 2011 at 13:33 UTC

    In addition to the comment about case-sensitivity, Perl looks for modules by walking down the @INC list, selecting (only) the first one that it finds.   There are several things which control the contents of this list, including:

    • The use lib statement.
    • The PERL5LIB environment variable.
    • The initial list which is compiled-in to Perl.
    • Manual manipulation of this (quite ordinary...) list variable.

    When you install something ... and as usual, there are several ways to do it ... you need to control where the modules are installed, and then you need to be sure that these are on @INC at runtime.   It is, in fact, quite common to set up “custom” library-paths, e.g. to override the stock installations that might come with your system, or to give virtual-hosts their own predictable and unique environments that won’t change with their surroundings.