home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / perl5 / lib.z / lib
Encoding:
Text File  |  1998-10-30  |  3.8 KB  |  133 lines

  1.  
  2.  
  3.  
  4. lllliiiibbbb((((3333))))                                                                  lllliiiibbbb((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      lib - manipulate @INC at compile time
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.          use lib LIST;
  13.  
  14.          no lib LIST;
  15.  
  16.  
  17. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      This is a small simple module which simplifies the manipulation of @INC
  19.      at compile time.
  20.  
  21.      It is typically used to add extra directories to perl's search path so
  22.      that later use or require statements will find modules which are not
  23.      located on perl's default search path.
  24.  
  25.      AAAADDDDDDDDIIIINNNNGGGG DDDDIIIIRRRREEEECCCCTTTTOOOORRRRIIIIEEEESSSS TTTTOOOO @@@@IIIINNNNCCCC
  26.  
  27.      The parameters to use lib are added to the start of the perl search path.
  28.      Saying
  29.  
  30.          use lib LIST;
  31.  
  32.      is _a_l_m_o_s_t the same as saying
  33.  
  34.          BEGIN { unshift(@INC, LIST) }
  35.  
  36.      For each directory in LIST (called $dir here) the lib module also checks
  37.      to see if a directory called $dir/$archname/auto exists.  If so the
  38.      $dir/$archname directory is assumed to be a corresponding architecture
  39.      specific directory and is added to @INC in front of $dir.
  40.  
  41.      If LIST includes both $dir and $dir/$archname then $dir/$archname will be
  42.      added to @INC twice (if $dir/$archname/auto exists).
  43.  
  44.      DDDDEEEELLLLEEEETTTTIIIINNNNGGGG DDDDIIIIRRRREEEECCCCTTTTOOOORRRRIIIIEEEESSSS FFFFRRRROOOOMMMM @@@@IIIINNNNCCCC
  45.  
  46.      You should normally only add directories to @INC.  If you need to delete
  47.      directories from @INC take care to only delete those which you added
  48.      yourself or which you are certain are not needed by other modules in your
  49.      script.  Other modules may have added directories which they need for
  50.      correct operation.
  51.  
  52.      By default the no lib statement deletes the _f_i_r_s_t instance of each named
  53.      directory from @INC.  To delete multiple instances of the same name from
  54.      @INC you can specify the name multiple times.
  55.  
  56.      To delete _a_l_l instances of _a_l_l the specified names from @INC you can
  57.      specify ':ALL' as the first parameter of no lib. For example:
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. lllliiiibbbb((((3333))))                                                                  lllliiiibbbb((((3333))))
  71.  
  72.  
  73.  
  74.          no lib qw(:ALL .);
  75.  
  76.      For each directory in LIST (called $dir here) the lib module also checks
  77.      to see if a directory called $dir/$archname/auto exists.  If so the
  78.      $dir/$archname directory is assumed to be a corresponding architecture
  79.      specific directory and is also deleted from @INC.
  80.  
  81.      If LIST includes both $dir and $dir/$archname then $dir/$archname will be
  82.      deleted from @INC twice (if $dir/$archname/auto exists).
  83.  
  84.      RRRREEEESSSSTTTTOOOORRRRIIIINNNNGGGG OOOORRRRIIIIGGGGIIIINNNNAAAALLLL @@@@IIIINNNNCCCC
  85.  
  86.      When the lib module is first loaded it records the current value of @INC
  87.      in an array @lib::ORIG_INC. To restore @INC to that value you can say
  88.  
  89.          @INC = @lib::ORIG_INC;
  90.  
  91.  
  92. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  93.      FindBin - optional module which deals with paths relative to the source
  94.      file.
  95.  
  96. AAAAUUUUTTTTHHHHOOOORRRR
  97.      Tim Bunce, 2nd June 1995.
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.