#!/usr/local/perl # $HopeName: MMQA_harness!script:commands:help(trunk.4) $ # # provide help on QA functions # if (@ARGV) { foreach (@ARGV) { &printhelp($_); } } else { opendir(DIR, $script_dir."/help"); print "Help topics:\n"; foreach (readdir(DIR)) { unless (/^\./) { &summhelp($_); } } print "For help on a topic, type 'qa help '.\n\n"; print "For general instructions on how to run tests, see guide.mmqa in\n"; print "the MM Information database.\n"; closedir(DIR); } sub summhelp { local ($infile, $sumline) = @_; unless(open(IN, $script_dir."/help/".$infile)) { die "File ".$infile." unexpectedly not found.\n"; } $sumline = ; close(IN); write STDOUT; } sub printhelp { local ($infile) = @_; unless(open(IN, $script_dir."/help/".$infile)) { print "No help available on $infile.\n"; } else { ; while () { print $_; } } } format STDOUT = @<<<<<<<<<<<@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $infile, $sumline .