Apache::TestConfig -- Test Configuration setup module

- NAME
- SYNOPSIS
- DESCRIPTION
- FUNCTIONS
- AUTHOR
- SEE ALSO

# NAME

Apache::TestConfig -- Test Configuration setup module

# SYNOPSIS

      use Apache::TestConfig;

      my $cfg = Apache::TestConfig->new(%args)
      my $fh = $cfg->genfile($file);
      $cfg->writefile($file, $content);
      $cfg->gendir($dir);
      ...

# DESCRIPTION

`Apache::TestConfig` is used in creating the `Apache::Test` configuration files.

# FUNCTIONS

`genwarning()`

        my $warn = $cfg->genwarning($filename)

  `genwarning()` returns a warning string as a comment, saying that the file was autogenerated and that it's not a good idea to modify this file. After the warning a perl trace of calls to this this function is appended. This trace is useful for finding what code has created the file.

  `genwarning()` automatically recognizes the comment type based on the file extension. If the extension is not recognized, the default `#` style is used.

  Currently it support `<!-- -->`, `/* ... */` and `#` styles.

`genfile()`

        my $fh = $cfg->genfile($file);

  `genfile()` creates a new file `$file` for writing and returns a file handle.

  A comment with a warning and calls trace is added to the top of this file. See `genwarning()` for more info about this comment.

  If parent directories of `$file` don't exist they will be automagically created.

  The file `$file` and any created parent directories (if found empty) will be automatically removed on cleanup.

`writefile()`

        $cfg->writefile($file, $content, [$nowarning]);

  `writefile()` creates a new file `$file` with the content of `$content`.

  A comment with a warning and calls trace is added to the top of this file unless `$nowarnings` is passed and set to a true value. See `genwarning()` for more info about this comment.

  If parent directories of `$file` don't exist they will be automagically created.

  The file `$file` and any created parent directories (if found empty) will be automatically removed on cleanup.

`write_perlscript()`

        $cfg->write_perlscript($filename, @lines);

  Similar to `writefile()` but creates an executable Perl script with correctly set shebang line.

`gendir()`

        $cfg->gendir($dir);

  `gendir()` creates a new directory `$dir`.

  If parent directories of `$dir` don't exist they will be automagically created.

  The directory `$dir` and any created parent directories will be automatically removed on cleanup if found empty.

# AUTHOR

# SEE ALSO

perl(1), Apache::Test(3)

Apache::TestConfig -- Test Configuration setup module