On 05/25/2016 09:49 AM, Jochen Schnuerle wrote:
Stefan,
Stefan Hornburg (Racke) wrote:
On 05/24/2016 05:50 PM, Warren Young wrote:
On May 24, 2016, at 7:50 AM, Jochen Schnuerle <js@betabox.de> wrote:
But I don't unterstand. I pointed you right at the code implementing the feature you’re trying to use. It’s quite straightforward Perl. If you don’t understand my prose description of what it does, you should certainly understand the Perl code.
I just want to move my config.yml in the sub dir /etc. The feature you’re trying to use doesn’t allow that. You will either have to structure your project directory differently, or change Dancer to behave the way you prefer. I suggest to look at the environment variables, which Dancer 2 uses:
https://metacpan.org/pod/distribution/Dancer2/lib/Dancer2/Config.pod#Environ...
Especially DANCER_CONFDIR and DANCER_ENVDIR.
Regards Racke That worked great!
After configure the env vars:
export DANCER_CONFDIR="/opt/fsi/portal/etc" export DANCER_ENVDIR="/opt/fsi/portal/etc"
Dancer2 search for the "views" dir in
/opt/fsi/portal/etc/views
So I add to the config.yml of my Dancer2 source:
views: "/opt/fsi/portal/views"
and remove the source lines in my fsi.pm:
#set config_location => $dirs . '../etc'; #set environments_location => $dirs . '../etc'; #set 'environment' => 'development';
and all works great, like I have it in my Dancer1 source/tree.
Thank you very much!
Regards
Jochen
You are welcome, we now better add that to the migration documentation. Regards Racke -- Please visit our 3rd Perl Dancer Conference 2016 in Vienna: https://www.perl.dance/.