Module path

Path to module

The default path to look for a module is @INC.

To print this use:

  print @INC

If your module is placed under one of the path in @INC, you can refer to your module using relative path. For example, if @INC contains /usr/my/lib, and your Module.pm is located in /usr/my/lib/Module.pm, you can refer to your module by:

  use Module.pm

If your Module.pm is located in /usr/my/lib/Mymod/Seq/Module.pm, then write:

  use Mymod::Seq::Module

If your module is not placed inside @INC, i.e. /some/dir/Module.pm, then:

  use lib “/some/dir”;   --- this adds the path to the beginning of @INC
  use Mod;

Table of Contents.
Previous | Next.