Some explanations:
psgi_callback
is the method in WebNano that constructs the anonymous subroutine required by the PSGI standard and here I use the around Moose method modifier for it to add some additional processing there. static_roots
returns a list of directories where to search for the static files - this is our search path - the first file found in these directories is served. In the base class this list contains only 'static'
- if you want to overload the static files in a subclass you need to add your directories before this one, in my example subclass config I have:static_root => [ 'static', '../Nblog/static' ]
(these are relative paths). See also Plack::App::Cascade. All of this would be a bit easier to assemble if the Plack components logged some debug info to STDOUT, like what you can find in the standard Apache logs about files not found, when run in development environment. I am volunteering to write a patch if there is a green light from the core devs.
No comments:
Post a Comment