in reply to Re^2: Call subroutine of main namespace from package in Plack
in thread Call subroutine of main namespace from package in Plack
Perl is an incredibly flexible language that gives the power to execute bad designs. Yours is quite bad, especially in a PSGI pipeline where responsibilities are well designed and compartmentalized; and I encourage you to abandon it immediately.
You should not feel bad, though. It's one of the early "intuitive" things a lot of us, especially self-taught programmers, try to do. The other that is almost a rite of passage is using variables as variable names. Working with raw PSGI is quite ambitious. It's not designed to be for direct webwork but for package authors to use as a platform for their higher level kits which are then in turn used for webwork.
If you break down your project into small bites and present them as questions here, you'll probably get terrific advice and code snippets directly on point. Right now you're mostly getting expert advice on how to do things no one but experts even knows how to do because, like wheelies in traffic, it RFC:SHOULDN'T be done. :P
Update: fixed a grammar booger that was bothering me.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Call subroutine of main namespace from package in Plack
by stevieb (Canon) on Apr 11, 2018 at 21:56 UTC |