NAME
Module::Install::TestVars - Setting and Passing test variables.
SYNOPSIS
In your Makefile.PL,
use
inc::Module::Install;
test_vars
TEST_DBI_DSN
=> +{
default
=>
'dbi:mysql:dbname=test'
,
prompt
=>
'input DBI DSN param'
},
TEST_DBI_USER
=> +{
default
=>
'root'
,
prompt
=>
'input DBI USER param'
, },
TEST_DBI_PASSWORD
=> +{
default
=>
''
,
prompt
=>
'input DBI PASSWORD param'
, };
Running Makefile.PL, asking values and passing variables to tests.
In your test,
diag(
$ENV
{TEST_DBI_DSN});
# 'dbi:mysql:dbname=test'
diag(
$ENV
{TEST_DBI_USER});
# 'root'
diag(
$ENV
{TEST_DBI_PASSWORD});
# ''
ok(1);
DESCRIPTION
Module::Install::TestVars is module asking and setting test variable. Please see unit tests for usage details.
METHODS
test_vars %vars
key-setting.
AUTHOR
Toru Yamaguchi <zigorou@cpan.org>
SEE ALSO
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.