lestrrat-p5 / Catalyst-View-Xslate

Text::Xslate View Class
Other
10 stars 8 forks source link

suffix and template extension #10

Open xenoterracide opened 12 years ago

xenoterracide commented 12 years ago

follow up for RT #68799 and to resummarize here (sorry, just hating on RT)

suffix is not provided per docs in CVX::Helper in 0.12.

patch was added in the latest git.

The project I had been working on was killed / or moved to dancer; so I apologize for not getting back to you.

It looks like the test now passes if suffix is defined.

However, I I'm not sure I understand the difference between suffix and template_extension. It seems that the former is for Text::Xslate and the latter is for Catalyst. However, why would I want both? it would seem that perhaps they should simply be an alias? DWIM principle.

lestrrat commented 12 years ago

https://github.com/lestrrat/Catalyst-View-Xslate/blob/master/lib/Catalyst/View/Xslate.pm#L250

Was it still confusing after reading this?

xenoterracide commented 12 years ago

well like I said, template_extensions seems to be for catalyst route handling while suffix is for xslate (right?) from reading that. But I don't see why I would want both, it would seem to me that I would always want them both set to the same thing.

wreis commented 12 years ago

Agreed. I fail to see an use case where you'd want to set 'suffix' and 'template_extension' to different values. If my templates are named using '.foo' suffix, then I'd configure Text::Xslate's 'suffix' option to '.foo' and I wouldn't expect the C::View::Xslate to try and look for a template called 'action_name.tt' (as per default value) or using whatever other suffix that might be in 'template_extension' option.