in reply to Dancer2: Why is bundled 'lib/' required?
If you look in bin/app.psgi generated by your referenced document, you will note:
So the line, use lib "$FindBin::Bin/../lib"; is the answer to your question. So you would want to replace that to ensure that the right path is in @INC. But if you can help it, get off the Apache plantation pronto. If it's getting invoked by Apache "as is", who the heck knows what the is going to translate into.#!/usr/bin/perl use strict; use warnings; use FindBin; use lib "$FindBin::Bin/../lib"; # use this block if you don't need middleware, and only have a single +target Dancer app to run here use Dancr2; Dancr2->to_app;
And I imagine Dancer2 does care that views, public, etc are next to whatever lib you use to to_app. The initial use lib ... line just gets to the module that has the use Dancer2; line and defines the handlers. So YMMV.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Dancer2: Why is bundled 'lib/' required?
by Anonymous Monk on Feb 04, 2022 at 14:04 UTC | |
by perlfan (Parson) on Feb 05, 2022 at 22:58 UTC | |
by Anonymous Monk on Feb 07, 2022 at 18:09 UTC |