wchristian/Template-AutoFilter — pull request #2 by Gimpson (2013-10-08 21:55:41+00:00)
Title: Add the "none" filter via define_filter.

This pull request is more speculative, no offense at all if you don't think this is what Template::AutoFilter should do.

Currently if you pass a filter provider via the LOAD_FILTERS parameter to new, the "none" filter being added in Template::AutoFilter doesn't end up existing, because FILTERS is only used if no LOAD_FILTERS parameter was passed. I could certainly see the argument that if a user passed in their own LOAD_FILTERS provider they don't necessarily want it messed with. Also, if a user passes their own filter provider and it doesn't support "store", creation of a Template object will now fail. (I think maybe that's the best thing... It gives the caller a way to keep the "none" filter from being created if they really care about that for some reason.)

I could also implement this by appending another filter provider to any passed "LOAD_FILTERS" providers in the case that LOAD_FILTERS is passed, or adding to FILTERS if it is not. Or feel free to reject this entirely if you think the behavior is best as it is currently.