Dave Rolsky > SmokeRunner-Multi-0.16 > SmokeRunner::Multi::Config

Download:
SmokeRunner-Multi-0.16.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source   Latest Release: SmokeRunner-Multi-0.19

NAME ^

SmokeRunner::Multi::Config - Config information for a Smokerunner::Multi setup

SYNOPSIS ^

  use SmokeRunner::Multi::Config;

  my $config = SmokeRunner::Multi::Config->instance();

  print $config->root_dir();

DESCRIPTION ^

This class reads the config file for SmokeRunner::Multi, and provides access to the data in it. It is a singleton, so the config will only be read when the object is first created.

METHODS ^

This class provides the following methods:

SmokeRunner::Multi::Config->instance()

Returns the instance of the config object. The first time this is called, it will read the config file.

The config file should be in YAML format.

Finding the config file

This class will look for the config file in several locations.

First, if the SMOKERUNNER_CONFIG variable is set, it checks this location.

Next, if the the current user has a home directory, it will look in [home]/.smokerunner/smokerunner.conf. Finally it looks in /etc/smokerunner/smokerunner.conf.

If it cannot find a file it will die.

$config->root_dir()

The root directory for the smokerunner. This should contain the test sets, and it will be used for storing data on the filesystem, so it needs to be writeable by the smoke runner process.

$config->runner()

The SmokeRunner::Multi::Runner subclass to use. This can be a full class name, or just the unique part of the subclass ("Prove" or "Smolder").

$config->reporter()

The SmokeRunner::Multi::Reporter subclass to use. This can be a full class name, or just the unique part of the subclass ("Smolder").

$config->smolder()

Returns a hash reference of Smolder configuration data.

CONFIGURATION ^

The configuration file is expected to be in YAML. There are three required config keys:

TODO ^

This class doesn't lend itself well to supporting config info for new types of runner or reporter classes. That should be fixed ;)

AUTHOR ^

Dave Rolsky, <autarch@urth.org>

BUGS ^

Please report any bugs or feature requests to bug-smokerunner-multi@rt.cpan.org, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

COPYRIGHT & LICENSE ^

Copyright 2007 LiveText, Inc., All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

syntax highlighting: