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 / AutoSplit.z / AutoSplit
Encoding:
Text File  |  1998-10-30  |  4.7 KB  |  133 lines

  1.  
  2.  
  3.  
  4. AAAAuuuuttttooooSSSSpppplllliiiitttt((((3333))))                                                      AAAAuuuuttttooooSSSSpppplllliiiitttt((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      AutoSplit - split a package for autoloading
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.       perl -e 'use AutoSplit; autosplit_lib_modules(@ARGV)' ...
  13.  
  14.       use AutoSplit; autosplit($file, $dir, $keep, $check, $modtime);
  15.  
  16.      for perl versions 5.002 and later:
  17.  
  18.       perl -MAutoSplit -e 'autosplit($ARGV[0], $ARGV[1], $k, $chk, $modtime)' ...
  19.  
  20.  
  21. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  22.      This function will split up your program into files that the AutoLoader
  23.      module can handle. It is used by both the standard perl libraries and by
  24.      the MakeMaker utility, to automatically configure libraries for
  25.      autoloading.
  26.  
  27.      The autosplit interface splits the specified file into a hierarchy rooted
  28.      at the directory $dir. It creates directories as needed to reflect class
  29.      hierarchy, and creates the file _a_u_t_o_s_p_l_i_t._i_x. This file acts as both
  30.      forward declaration of all package routines, and as timestamp for the
  31.      last update of the hierarchy.
  32.  
  33.      The remaining three arguments to autosplit govern other options to the
  34.      autosplitter. If the third argument, $_k_e_e_p, is false, then any pre-
  35.      existing *.al files in the autoload directory are removed if they are no
  36.      longer part of the module (obsoleted functions). The fourth argument,
  37.      $_c_h_e_c_k, instructs autosplit to check the module currently being split to
  38.      ensure that it does include a use specification for the AutoLoader
  39.      module, and skips the module if AutoLoader is not detected. Lastly, the
  40.      $_m_o_d_t_i_m_e argument specifies that autosplit is to check the modification
  41.      time of the module against that of the autosplit.ix file, and only split
  42.      the module if it is newer.
  43.  
  44.      Typical use of AutoSplit in the perl MakeMaker utility is via the
  45.      command-line with:
  46.  
  47.       perl -e 'use AutoSplit; autosplit($ARGV[0], $ARGV[1], 0, 1, 1)'
  48.  
  49.      Defined as a Make macro, it is invoked with file and directory arguments;
  50.      autosplit will split the specified file into the specified directory and
  51.      delete obsolete .al files, after checking first that the module does use
  52.      the AutoLoader, and ensuring that the module is not already currently
  53.      split in its current form (the modtime test).
  54.  
  55.      The autosplit_lib_modules form is used in the building of perl. It takes
  56.      as input a list of files (modules) that are assumed to reside in a
  57.      directory lllliiiibbbb relative to the current directory. Each file is sent to the
  58.      autosplitter one at a time, to be split into the directory lllliiiibbbb////aaaauuuuttttoooo.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. AAAAuuuuttttooooSSSSpppplllliiiitttt((((3333))))                                                      AAAAuuuuttttooooSSSSpppplllliiiitttt((((3333))))
  71.  
  72.  
  73.  
  74.      In both usages of the autosplitter, only subroutines defined following
  75.      the perl special marker ___E_N_D__ are split out into separate files. Some
  76.      routines may be placed prior to this marker to force their immediate
  77.      loading and parsing.
  78.  
  79. CCCCAAAAVVVVEEEEAAAATTTTSSSS
  80.      Currently, AutoSplit cannot handle multiple package specifications within
  81.      one file.
  82.  
  83. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  84.      AutoSplit will inform the user if it is necessary to create the top-level
  85.      directory specified in the invocation. It is preferred that the script or
  86.      installation process that invokes AutoSplit have created the full
  87.      directory path ahead of time. This warning may indicate that the module
  88.      is being split into an incorrect path.
  89.  
  90.      AutoSplit will warn the user of all subroutines whose name causes
  91.      potential file naming conflicts on machines with drastically limited (8
  92.      characters or less) file name length. Since the subroutine name is used
  93.      as the file name, these warnings can aid in portability to such systems.
  94.  
  95.      Warnings are issued and the file skipped if AutoSplit cannot locate
  96.      either the ___E_N_D__ marker or a "package Name;"-style specification.
  97.  
  98.      AutoSplit will also emit general diagnostics for inability to create
  99.      directories or files.
  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.