NAME

Test::WriteVariants::Context - representation of test context

DESCRIPTION

Contexts are used to abstract e.g. ambience or relations between opportunities and and their application.

METHODS

new

A Context is an ordered list of various kinds of named values (such as environment variables, our vars) possibly including other Context objects.

Values can be looked up by name. The first match will be returned.

new_composite

see Test::WriteVariants::Context::BaseItem

push_var

add a var to an existing config

new_env_var

instantiates new context using an environment variable

new_our_var

instantiates new context using a global variable

new_module_use

instantiates new context using a module

new_meta_info

instantiates new context used to convey information between plugins

get_code

collects code from members

get_var

search backwards through list of settings, stop at first match

get_env_var

search backwards through list of settings, stop at first match (implies EnvVar)

get_our_var

search backwards through list of settings, stop at first match (implies OurVar)

get_module_use

search backwards through list of settings, stop at first match (implies ModuleUse)

get_meta_info

search backwards through list of settings, stop at first match (implies MetaInfo)

ACKNOWLEDGEMENTS

This module has been created to support DBI::Test in design and separation of concerns.

COPYRIGHT

Copyright 2014-2017 Tim Bunce and Perl5 DBI Team.

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of either:

a) the GNU General Public License as published by the Free
Software Foundation; either version 1, or (at your option) any
later version, or

b) the "Artistic License" which comes with this Kit.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the Artistic License for more details.