<div dir="ltr">1. The <a href="https://metacpan.org/pod/release/XSAWYERX/Dancer2-0.08/lib/Dancer2/Cookbook.pod#From-a-separate-script" target="_blank">script from the Cookbook</a>:<div><div class="gmail-line gmail-number1 gmail-index0 gmail-alt2" style="text-align:left;font-family:Menlo,Monaco,"DejaVu Sans Mono",Consolas,"Bitstream Vera Sans Mono",Courier,"Courier New",monospace;font-weight:normal;font-style:normal;font-size:12px;white-space:pre;color:rgb(51,51,51);font-variant-caps:normal;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration:none;box-sizing:content-box;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;padding:0px 1em 0px 0em;vertical-align:baseline;width:auto;min-height:auto"><code class="gmail-perl gmail-comments" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:rgb(0,130,0);border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto"># bin/<a href="http://script2.pl">script2.pl</a></code></div><div class="gmail-line gmail-number2 gmail-index1 gmail-alt1" style="text-align:left;font-family:Menlo,Monaco,"DejaVu Sans Mono",Consolas,"Bitstream Vera Sans Mono",Courier,"Courier New",monospace;font-weight:normal;font-style:normal;font-size:12px;white-space:pre;color:rgb(51,51,51);font-variant-caps:normal;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration:none;box-sizing:content-box;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;padding:0px 1em 0px 0em;vertical-align:baseline;width:auto;min-height:auto"><code class="gmail-perl gmail-keyword" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:rgb(0,102,153);border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:bold;font-style:normal;min-height:auto">use</code> <code class="gmail-perl gmail-plain" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:black;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto"><a href="https://metacpan.org/pod/FindBin" style="text-decoration:underline;box-sizing:content-box;background-image:none;color:black;border-radius:0px;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;padding:0px;text-align:left;vertical-align:baseline;width:auto;font-family:inherit;font-weight:normal;font-style:normal;font-size:1em;min-height:auto">FindBin</a>;</code></div><div class="gmail-line gmail-number3 gmail-index2 gmail-alt2" style="text-align:left;font-family:Menlo,Monaco,"DejaVu Sans Mono",Consolas,"Bitstream Vera Sans Mono",Courier,"Courier New",monospace;font-weight:normal;font-style:normal;font-size:12px;white-space:pre;color:rgb(51,51,51);font-variant-caps:normal;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration:none;box-sizing:content-box;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;padding:0px 1em 0px 0em;vertical-align:baseline;width:auto;min-height:auto"><code class="gmail-perl gmail-keyword" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:rgb(0,102,153);border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:bold;font-style:normal;min-height:auto">use</code> <code class="gmail-perl gmail-plain" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:black;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto"><a href="https://metacpan.org/pod/Cwd" style="text-decoration:underline;box-sizing:content-box;background-image:none;color:black;border-radius:0px;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;padding:0px;text-align:left;vertical-align:baseline;width:auto;font-family:inherit;font-weight:normal;font-style:normal;font-size:1em;min-height:auto">Cwd</a> </code><code class="gmail-perl gmail-string" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:blue;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">qw/realpath/</code><code class="gmail-perl gmail-plain" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:black;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">;</code></div><div class="gmail-line gmail-number4 gmail-index3 gmail-alt1" style="text-align:left;font-family:Menlo,Monaco,"DejaVu Sans Mono",Consolas,"Bitstream Vera Sans Mono",Courier,"Courier New",monospace;font-weight:normal;font-style:normal;font-size:12px;white-space:pre;color:rgb(51,51,51);font-variant-caps:normal;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration:none;box-sizing:content-box;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;padding:0px 1em 0px 0em;vertical-align:baseline;width:auto;min-height:auto"><code class="gmail-perl gmail-keyword" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:rgb(0,102,153);border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:bold;font-style:normal;min-height:auto">use</code> <code class="gmail-perl gmail-plain" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:black;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto"><a href="https://metacpan.org/pod/Dancer2" style="text-decoration:underline;box-sizing:content-box;background-image:none;color:black;border-radius:0px;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;padding:0px;text-align:left;vertical-align:baseline;width:auto;font-family:inherit;font-weight:normal;font-style:normal;font-size:1em;min-height:auto">Dancer2</a>;</code></div><div class="gmail-line gmail-number5 gmail-index4 gmail-alt2" style="text-align:left;font-family:Menlo,Monaco,"DejaVu Sans Mono",Consolas,"Bitstream Vera Sans Mono",Courier,"Courier New",monospace;font-weight:normal;font-style:normal;font-size:12px;white-space:pre;color:rgb(51,51,51);font-variant-caps:normal;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration:none;box-sizing:content-box;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;padding:0px 1em 0px 0em;vertical-align:baseline;width:auto;min-height:auto"> </div><div class="gmail-line gmail-number6 gmail-index5 gmail-alt1" style="text-align:left;font-family:Menlo,Monaco,"DejaVu Sans Mono",Consolas,"Bitstream Vera Sans Mono",Courier,"Courier New",monospace;font-weight:normal;font-style:normal;font-size:12px;white-space:pre;color:rgb(51,51,51);font-variant-caps:normal;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration:none;box-sizing:content-box;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;padding:0px 1em 0px 0em;vertical-align:baseline;width:auto;min-height:auto"><code class="gmail-perl gmail-comments" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:rgb(0,130,0);border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">#tell the Dancer2 where the app lives</code></div><div class="gmail-line gmail-number7 gmail-index6 gmail-alt2" style="text-align:left;font-family:Menlo,Monaco,"DejaVu Sans Mono",Consolas,"Bitstream Vera Sans Mono",Courier,"Courier New",monospace;font-weight:normal;font-style:normal;font-size:12px;white-space:pre;color:rgb(51,51,51);font-variant-caps:normal;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration:none;box-sizing:content-box;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;padding:0px 1em 0px 0em;vertical-align:baseline;width:auto;min-height:auto"><code class="gmail-perl gmail-keyword" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:rgb(0,102,153);border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:bold;font-style:normal;min-height:auto">my</code> <code class="gmail-perl gmail-variable" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:rgb(170,119,0);border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">$appdir</code><code class="gmail-perl gmail-plain" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:black;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">=realpath( </code><code class="gmail-perl gmail-string" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:blue;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">"$FindBin::Bin/.."</code><code class="gmail-perl gmail-plain" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:black;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">);</code></div><div class="gmail-line gmail-number8 gmail-index7 gmail-alt1" style="text-align:left;font-family:Menlo,Monaco,"DejaVu Sans Mono",Consolas,"Bitstream Vera Sans Mono",Courier,"Courier New",monospace;font-weight:normal;font-style:normal;font-size:12px;white-space:pre;color:rgb(51,51,51);font-variant-caps:normal;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration:none;box-sizing:content-box;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;padding:0px 1em 0px 0em;vertical-align:baseline;width:auto;min-height:auto"> </div><div class="gmail-line gmail-number9 gmail-index8 gmail-alt2" style="text-align:left;font-family:Menlo,Monaco,"DejaVu Sans Mono",Consolas,"Bitstream Vera Sans Mono",Courier,"Courier New",monospace;font-weight:normal;font-style:normal;font-size:12px;white-space:pre;color:rgb(51,51,51);font-variant-caps:normal;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration:none;box-sizing:content-box;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;padding:0px 1em 0px 0em;vertical-align:baseline;width:auto;min-height:auto"><code class="gmail-perl gmail-plain" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:black;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">Dancer2::Config::setting(</code><code class="gmail-perl gmail-string" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:blue;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">'appdir'</code><code class="gmail-perl gmail-plain" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:black;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">,</code><code class="gmail-perl gmail-variable" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:rgb(170,119,0);border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">$appdir</code><code class="gmail-perl gmail-plain" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:black;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">);</code></div><div class="gmail-line gmail-number10 gmail-index9 gmail-alt1" style="text-align:left;font-family:Menlo,Monaco,"DejaVu Sans Mono",Consolas,"Bitstream Vera Sans Mono",Courier,"Courier New",monospace;font-weight:normal;font-style:normal;font-size:12px;white-space:pre;color:rgb(51,51,51);font-variant-caps:normal;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration:none;box-sizing:content-box;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;padding:0px 1em 0px 0em;vertical-align:baseline;width:auto;min-height:auto"><code class="gmail-perl gmail-plain" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:black;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">Dancer2::Config::load();</code></div><div class="gmail-line gmail-number11 gmail-index10 gmail-alt2" style="text-align:left;font-family:Menlo,Monaco,"DejaVu Sans Mono",Consolas,"Bitstream Vera Sans Mono",Courier,"Courier New",monospace;font-weight:normal;font-style:normal;font-size:12px;white-space:pre;color:rgb(51,51,51);font-variant-caps:normal;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration:none;box-sizing:content-box;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;padding:0px 1em 0px 0em;vertical-align:baseline;width:auto;min-height:auto"> </div><div class="gmail-line gmail-number12 gmail-index11 gmail-alt1" style="text-align:left;font-family:Menlo,Monaco,"DejaVu Sans Mono",Consolas,"Bitstream Vera Sans Mono",Courier,"Courier New",monospace;font-weight:normal;font-style:normal;font-size:12px;white-space:pre;color:rgb(51,51,51);font-variant-caps:normal;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration:none;box-sizing:content-box;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;padding:0px 1em 0px 0em;vertical-align:baseline;width:auto;min-height:auto"><code class="gmail-perl gmail-comments" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:rgb(0,130,0);border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">#getter</code></div><div class="gmail-line gmail-number13 gmail-index12 gmail-alt2" style="text-align:left;font-family:Menlo,Monaco,"DejaVu Sans Mono",Consolas,"Bitstream Vera Sans Mono",Courier,"Courier New",monospace;font-weight:normal;font-style:normal;font-size:12px;white-space:pre;color:rgb(51,51,51);font-variant-caps:normal;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration:none;box-sizing:content-box;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;padding:0px 1em 0px 0em;vertical-align:baseline;width:auto;min-height:auto"><code class="gmail-perl gmail-functions" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:rgb(255,20,147);border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">print</code> <code class="gmail-perl gmail-string" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:blue;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">"environment:"</code><code class="gmail-perl gmail-plain" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:black;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">.config->{environment}.</code><code class="gmail-perl gmail-string" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:blue;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">"\n"</code><code class="gmail-perl gmail-plain" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:black;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">; </code><code class="gmail-perl gmail-comments" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:rgb(0,130,0);border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">#development</code></div><div class="gmail-line gmail-number14 gmail-index13 gmail-alt1" style="text-align:left;font-family:Menlo,Monaco,"DejaVu Sans Mono",Consolas,"Bitstream Vera Sans Mono",Courier,"Courier New",monospace;font-weight:normal;font-style:normal;font-size:12px;white-space:pre;color:rgb(51,51,51);font-variant-caps:normal;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration:none;box-sizing:content-box;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;padding:0px 1em 0px 0em;vertical-align:baseline;width:auto;min-height:auto"><code class="gmail-perl gmail-functions" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:rgb(255,20,147);border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">print</code> <code class="gmail-perl gmail-string" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:blue;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">"log:"</code><code class="gmail-perl gmail-plain" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:black;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">.config->{</code><code class="gmail-perl gmail-functions" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:rgb(255,20,147);border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">log</code><code class="gmail-perl gmail-plain" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:black;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">}.</code><code class="gmail-perl gmail-string" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:blue;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">"\n"</code><code class="gmail-perl gmail-plain" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:black;border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">; </code><code class="gmail-perl gmail-comments" style="white-space:pre;box-sizing:content-box;font-family:inherit;font-size:1em;padding:0px;color:rgb(0,130,0);border-radius:0px;background-image:none;border:0px;float:none;height:auto;line-height:normal;margin:0px;outline:0px;overflow:visible;text-align:left;vertical-align:baseline;width:auto;font-weight:normal;font-style:normal;min-height:auto">#value from development environment</code></div><br></div><div>fails with:</div><div><div><font face="monospace, monospace" color="#ff0000">Undefined subroutine &Dancer2::Config::setting called at <a href="http://script2.pl">script2.pl</a> line 9.</font></div></div><div><br></div><div>Although I can see a setting function in Dancer2::Core::Role::ConfigReader?</div><div><br></div><div>2. What's the best way for my perl modules to access settings?</div><div><br></div><div>eg. if Main.pm says:</div><div><font face="monospace, monospace">my $foo = myApp::FooMaker->new();</font></div><div><br></div><div>FooMaker.pm can get config settings via:</div><div> a) Using an approach similar to the above</div><div> b) Having all config or specific parts of config passed in</div><div>since FooMaker is Dancer2 unaware.</div><div><br></div><div>Does adding:</div><div><font face="monospace, monospace">use Dancer2;</font></div><div>to FooMaker make it Dancer2 aware? (ie. give it access to all the Dancer environment?)</div><div>and if so, what kind of Dancer2 environment does one need to make for unit tests of FooMaker functions/methods?</div><div><br></div><div>thanks,</div><div>Nathan</div><div><br></div></div>