Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

dancer helper script generates a misleading config entry #768

Closed
antoxz opened this Issue Mar 31, 2012 · 2 comments

Comments

Projects
None yet
3 participants

antoxz commented Mar 31, 2012

Helper script ("dancer", v1.3094, at line 920) outputs to "config.yml" an entry:

encoding: 'utf8'

which has no possible effect, because neither "Dancer::Template::TemplateToolkit::init", nor "TemplateToolkit" (v2.22) itself respect it. ("init" looks at "charset" setting, "TemplateTookit" understands "ENCODING" in uppercase). "Dancer::Cookbook" has an example with uppercase variant, "Dancer::Template::TemplateToolkit" implies that options are passed as is. However autogenerated config file made me suspect that either "Dancer" would do case translation, or "TemplateToolkit" changed to accept lowercase there ("TemplateToolkit" v2.24 seems to have no changes there - I did not test it, just looked at the code, so I might as well be wrong).

bigpresh added a commit that referenced this issue Nov 28, 2012

Don't add meaningless 'encoding' to TT config.
When scaffolding an app, don't add a meaningless 'encoding' setting to the
example T::T config - it won't do anything, and is misleading.

The actual setting is 'ENCODING', and that gets automatically added based on the
'charset' setting.

Fixes Issue #768
Owner

bigpresh commented Nov 28, 2012

Thanks for reporting this, and sorry it took so long to deal with this one - an 8 month wait isn't really acceptable!

@bigpresh bigpresh closed this Nov 28, 2012

knutov commented Nov 28, 2012

JFI: D::T::Ctpp2 respect encoding: 'utf8'. May be another template plugins too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment