Author: spadkins
Date: Mon Nov 16 05:41:03 2009
New Revision: 13546
Modified:
p5ee/trunk/App-Context/lib/App/Context.pm
Log:
pass %options to App::Conf::File->create({ %options })
Modified: p5ee/trunk/App-Context/lib/App/Context.pm
==============================================================================
--- p5ee/trunk/App-Context/lib/App/Context.pm (original)
+++ p5ee/trunk/App-Context/lib/App/Context.pm Mon Nov 16 05:41:03 2009
@@ -299,7 +299,8 @@
next;
}
if (-r $conf_file) {
- my $aux_conf = $conf_class->create({ conf_file =>
$conf_file });
+ $options{conf_file} = $conf_file;
+ my $aux_conf = $conf_class->create({ %options });
$conf->overlay($aux_conf);
print STDERR "Conf global include: [$cond][$conf_file]
included (overlayed)\n" if ($options{debug_conf});
}
@@ -569,7 +570,8 @@
my $conf_type = $options->{conf_type} || "pl";
my $conf_file = "$prefix/etc/app/$type.$name.$conf_type";
if (!$self->{conf_included}{$conf_file} && -r $conf_file) {
- my $aux_conf = App::Conf::File->create({ conf_file => $conf_file
});
+ $options->{conf_file} = $conf_file;
+ my $aux_conf = App::Conf::File->create({ %$options });
$conf->overlay($aux_conf);
$service_conf = $conf->{$type}{$name};
}
@@ -593,7 +595,8 @@
$conf_file = "$prefix/etc/app/$conf_file" if ($conf_file !~ m!^/!);
next if ($self->{conf_included}{$conf_file});
if (-r $conf_file) {
- my $aux_conf = App::Conf::File->create({ conf_file =>
$conf_file });
+ $options->{conf_file} = $conf_file;
+ my $aux_conf = App::Conf::File->create({ %$options });
$conf->overlay($aux_conf);
}
$self->{conf_included}{$conf_file} = 1;