4 # respect the configfile value passed into the constructor.
6 use Test::Requires 'MooseX::SimpleConfig'; # skip all if not installed
7 use Test::More tests => 3;
8 use Test::NoWarnings 1.04 ':early';
11 # avoid warning if all we have installed is YAML or YAML::Syck - the user will
12 # see this eventually when he actually uses MooseX::SimpleConfig in his own
14 use Config::Any::YAML;
15 $Config::Any::YAML::NO_YAML_XS_WARNING = 1;
20 with 'MooseX::Getopt', 'MooseX::SimpleConfig';
23 is => 'ro', isa => 'Str',
24 default => 'foo default',
29 my $configfile = path(qw(t 112_configfile_constructor_arg.yml))->stringify;
31 my $obj = Foo->new_with_options(configfile => $configfile);
34 path($obj->configfile),
36 'configfile value is used from the constructor',
41 'value is read in from the config file',