in reply to How to best "use lib" relative to a web site root?
See FindBin. Its POD's SYNOPSIS should be enough to get you going.
Update: Also, if you generate an "app" with Mojolicious, you'll see that the app executable starts with this:
use FindBin; BEGIN { unshift @INC, "$FindBin::Bin/../lib" }
...which is similar to the FindBin SYNOPSIS, but avoids the use of the lib pragma (not sure why).
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to best "use lib" relative to a web site root?
by taint (Chaplain) on Nov 27, 2013 at 21:48 UTC | |
by davido (Cardinal) on Nov 28, 2013 at 02:10 UTC | |
by Anonymous Monk on Nov 28, 2013 at 02:55 UTC |