in reply to does a script run via plackup knows where it is?
Maybe, probably–
# app.psgi, cp or mv it around and plackitup. :P use Path::Tiny; my $location = path(__FILE__)->absolute; sub { [ 200, [], ["OHAI $location!"] ] }
Update: I actually think a command line argument or plackup wrapper might be a better choice here. Multiple copies of code is code smell.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: does a script run via plackup knows where it is?
by morgon (Priest) on May 14, 2018 at 16:33 UTC | |
by Your Mother (Archbishop) on May 14, 2018 at 16:59 UTC |