home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_perl.idb / usr / freeware / catman / p_man / cat3 / File::CheckTree.Z / File::CheckTree
Encoding:
Text File  |  1998-10-28  |  1.9 KB  |  67 lines

  1.  
  2.  
  3.  
  4.      FFFFiiiilllleeee::::::::CCCChhhheeeecccckkkkTTTTrrrreeeeeeee((((3333))))22223333////JJJJuuuullll////99998888    ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222FFFF))))iiiilllleeee::::::::CCCChhhheeeecccckkkkTTTTrrrreeeeeeee((((3333))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       validate - run many filetest checks on a tree
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           use File::CheckTree;
  13.  
  14.           $warnings    += validate( q{
  15.           /vmunix          -e ||    die
  16.           /boot              -e ||    die
  17.           /bin              cd
  18.               csh          -ex
  19.               csh          !-ug
  20.               sh          -ex
  21.               sh          !-ug
  22.           /usr              -d ||    warn "What happened to $file?\n"
  23.           });
  24.  
  25.  
  26.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  27.       The _v_a_l_i_d_a_t_e() routine takes a single    multiline string
  28.       consisting of    lines containing a filename plus a file    test
  29.       to try on it.     (The file test    may also be a "cd", causing
  30.       subsequent relative filenames    to be interpreted relative to
  31.       that directory.)  After the file test    you may    put || die to
  32.       make it a fatal error    if the file test fails.     The default
  33.       is ||    warn.  The file    test may optionally have a "!'
  34.       prepended to test for    the opposite condition.     If you    do a
  35.       cd and then list some    relative filenames, you    may want to
  36.       indent them slightly for readability.     If you    supply your
  37.       own _d_i_e() or _w_a_r_n() message, you can use $file to
  38.       interpolate the filename.
  39.  
  40.       Filetests may    be bunched:  "-rwx" tests for all of -r, -w,
  41.       and -x.  Only    the first failed test of the bunch will
  42.       produce a warning.
  43.  
  44.       The routine returns the number of warnings issued.
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 10/23/98)
  64.  
  65.  
  66.  
  67.