man Apache::TestConfig () - Configuration file for Apache::Test

NAME

Apache::TestConfigData - Configuration file for Apache::Test

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

CWApache::TestConfig is used in creating the CWApache::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.
  my $warn = $cfg->genwarning($filename, $from_filename)
If CW$from_filename is specified it'll be used in the warning to tell which file it was generated from. genwarning() automatically recognizes the comment type based on the file extension. If the extension is not recognized, the default CW# style is used. Currently it support CW<!-- -->, CW/* ... */ and CW# styles.
genfile()
  my $fh = $cfg->genfile($file);
genfile() creates a new file CW$file for writing and returns a file handle. If parent directories of CW$file don't exist they will be automagically created. The file CW$file and any created parent directories (if found empty) will be automatically removed on cleanup. A comment with a warning and calls trace is added to the top of this file. See genwarning() for more info about this comment.
  my $fh = $cfg->genfile($file, $from_file);
If CW$from_filename is specified it'll be used in the warning to tell which file it was generated from.
  my $fh = $cfg->genfile($file, $from_file, $nowarning);
If CW$nowarning is true, the warning won't be added. If using this optional argument and there is no CW$from_file you must pass undef as in:
  my $fh = $cfg->genfile($file, undef, $nowarning);
writefile()
  $cfg->writefile($file, $content, [$nowarning]);
writefile() creates a new file CW$file with the content of CW$content. A comment with a warning and calls trace is added to the top of this file unless CW$nowarnings is passed and set to a true value. See genwarning() for more info about this comment. If parent directories of CW$file don't exist they will be automagically created. The file CW$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 CW$dir. If parent directories of CW$dir don't exist they will be automagically created. The directory CW$dir and any created parent directories will be automatically removed on cleanup if found empty.

Environment Variables

The following environment variables affect the configuration and the run-time of the CWApache::Test framework:

APACHE_TEST_COLOR

To aid visual control over the configuration process and the run-time phase, CWApache::Test uses coloured fonts when the environment variable CWAPACHE_TEST_COLOR is set to a true value.

APACHE_TEST_LIVE_DEV

When using CWApache::Test during the project development phase, it's often convenient to have the project/lib (live) directory appearing first in CW@INC so any changes to the Perl modules, residing in it, immediately affect the server, without a need to rerun CWmake to update blib/lib. When the environment variable CWAPACHE_TEST_LIVE_DEV is set to a true value during the configuration phase (CWt/TEST -config, CWApache::Test will automatically unshift the project/lib directory into CW@INC, via the autogenerated t/conf/modperl_inc.pl file.

APACHE_TEST_INTERACTIVE_PROMPT_OK

Normally interactive prompts aren't run when STDIN is not attached to a tty. But sometimes there is a program that can answer the prompts (e.g. when testing A-T itself). If this variable is true the interactive config won't be skipped (if needed).

AUTHOR

SEE ALSO