Use methods for HTML/CSS so it's easier to subclass.#693
Use methods for HTML/CSS so it's easier to subclass.#693davorg wants to merge 1 commit intoplack:masterfrom
Conversation
|
Do you actually need to subclass for other reasons? Because we can change it to a sub callback then you could supply your custom attributes without creating a subclass. |
|
Well, I'm currently using doing stuff with a subclass (https://github.com/davorg/plack-app-directoryindex) which adds support for index.html to Plack::App::Directory. But I wouldn't need to use that subclass if you merged #654 :-) |
|
Oh wait. Looks like my previous PR has got somewhat corrupted. Let me clean it up and resubmit it. |
|
Well yeah that's orthogonal :) For Plack app/middleware I generally prefer setting these things via callback attributes rather than requiring to subclass it. |
|
Ok. Do you have a good example of how you've used callback attributes elsewhere? I'll crib off that and submit a new PR. |
|
Replaced by #695 |
I wanted to change the HTML/CSS in a subclass of this class, but using lexical variables makes it too hard. I worked around it, but a change like this would make it easier in the future.