Originally introduced by
b6cd6478, the dep is used *very* rarely. Relegate
it to optdep state instead, thus removing a Module::Pluggable entry from the
depchain (evicted from core in 5.20)
- Work around rare test deadlock under heavy parallelism (RT#108390)
- Stop using bare $] throughout - protects the codebase from issues
similar (but likely not limited to) P5#72210
+ - Config::Any is no longer a core dep, but instead is migrated to a new
+ optdep group 'config_file_reader'
0.082820 2015-03-20 20:35 (UTC)
* Fixes
'Class::Accessor::Grouped' => '0.10012',
'Class::C3::Componentised' => '1.0009',
'Class::Inspector' => '1.24',
- 'Config::Any' => '0.20',
'Context::Preserve' => '0.01',
'Data::Dumper::Concise' => '2.020',
'Data::Page' => '2.00',
use MooseX::Types::JSON qw(JSON);
use MooseX::Types::Path::Class qw(Dir File);
use MooseX::Types::LoadableClass qw(LoadableClass);
-use Try::Tiny;
use namespace::clean;
=head1 NAME
sub _build_config {
my ($self) = @_;
- try { require Config::Any }
- catch { die ("Config::Any is required to parse the config file.\n") };
-
my $cfg = Config::Any->load_files ( {files => [$self->config_file], use_ext =>1, flatten_to_hash=>1});
# just grab the config from the config file
},
},
+ config_file_reader => {
+ pod => {
+ title => 'Generic config reader',
+ desc => 'Modules required for generic config file parsing, currently Config::Any (rarely used at runtime)',
+ },
+ req => {
+ 'Config::Any' => '0.20',
+ },
+ },
+
admin => {
- include => '_json_any',
+ include => [qw( _json_any config_file_reader )],
req => {
%$moose_basic,
'MooseX::Types::Path::Class' => '0.05',
my @pp_args;
if ($profile =~ /^\.?\//) {
- require Config::Any;
+
+ if ( my $missing = DBIx::Class::Optional::Dependencies->req_missing_for ('config_file_reader') ) {
+ $self->throw_exception("Unable to parse TRACE_PROFILE config file '$profile' without $missing");
+ }
my $cfg = try {
Config::Any->load_files({ files => [$profile], use_ext => 1 });
is($schema->storage->debugobj->_sqlat->indent_string, ' ', 'indent string set correctly from console profile');
}
-{
+SKIP:{
+ DBIx::Class::Optional::Dependencies->skip_without('config_file_reader' );
+
local $ENV{DBIC_TRACE_PROFILE} = './t/lib/awesome.json';
my $schema = DBICTest->init_schema;