diff --git a/src/lib/Hydra.pm b/src/lib/Hydra.pm index 3ce87bb5..6d85f3a9 100644 --- a/src/lib/Hydra.pm +++ b/src/lib/Hydra.pm @@ -6,7 +6,6 @@ use parent 'Catalyst'; use Moose; use Hydra::Plugin; use Hydra::Model::DB; -use Hydra::Config; use Catalyst::Runtime '5.70'; use Catalyst qw/ConfigLoader Unicode::Encoding @@ -51,7 +50,7 @@ __PACKAGE__->config( }, 'Plugin::ConfigLoader' => { driver => { - 'General' => \%configGeneralOpts + 'General' => \%Hydra::Config::configGeneralOpts } }, 'Plugin::PrometheusTiny' => { diff --git a/src/lib/Hydra/Config.pm b/src/lib/Hydra/Config.pm index 8110c2ba..a681f1c0 100644 --- a/src/lib/Hydra/Config.pm +++ b/src/lib/Hydra/Config.pm @@ -1,11 +1,5 @@ package Hydra::Config; -use strict; -use Exporter; - -our @ISA = qw(Exporter); -our @EXPORT = qw(%configGeneralOpts); - -my %configGeneralOpts = (-UseApacheInclude => 1, -IncludeAgain => 1); +our %configGeneralOpts = (-UseApacheInclude => 1, -IncludeAgain => 1, -IncludeRelative => 1); 1; diff --git a/src/lib/Hydra/Helper/Nix.pm b/src/lib/Hydra/Helper/Nix.pm index 6c0c0497..f5fff2a9 100644 --- a/src/lib/Hydra/Helper/Nix.pm +++ b/src/lib/Hydra/Helper/Nix.pm @@ -42,14 +42,14 @@ my $hydraConfig; sub getHydraConfig { return $hydraConfig if defined $hydraConfig; my $conf = $ENV{"HYDRA_CONFIG"} || (Hydra::Model::DB::getHydraPath . "/hydra.conf"); + my %opts = (%Hydra::Config::configGeneralOpts, -ConfigFile => $conf); if (-f $conf) { # Please keep these options in sync with corresponding # `Catalyst::Plugin::ConfigLoader` configuration in `Hydra.pm` # This is necessary in order to maintain consistent interpretation # of the config by the various hydra components. - my %h = new Config::General( -ConfigFile => $conf - , %configGeneralOpts )->getall; + my %h = new Config::General(%opts)->getall; $hydraConfig = \%h; } else {