Josh Rosenbaum wrote:
This is what I've got outstanding from you:
* IGNORE_PLUGIN_BASE/IGNORE_STD_PLUGINS patch
  http://tt2.org/pipermail/templates/2005-August/007691.html

  I don't like this I'm afraid.  On an aesthetic level, I think options
  should be positive (DO_THIS) rather than negative (DONT_DO_THIS) wherever
  possible.  So it would be better to allow the user to explicitly set
  STD_PLUGINS and/or PLUGIN_BASE to undef.  Also, Template::Provider::Allow
  and T::P::Deny provide a more general mechanism for restricting access
  to resources.

But above all else there's no tests or documentation, so that one doesn't make the grade.
Sorry for the delay in my response Andy. I've been extremely busy lately. I've got a better patch here (attached) and am working on docs. (Already created tests, but will attach later with docs.) Hopefully that will work better. I also am going to get rid of the STD_PLUGINS part of that previous patch as there was no real need for it. I must've been smoking crack at the time, as you can simply override Template::Plugins::STD_PLUGINS. ;) The PLUGIN_BASE deal cannot simply be set to undef, as we still add 'Template::Plugins' no matter what. So I'm adding a config option: 'ADD_DEFAULT_PLUGIN_BASE'. (As can be seen in patch.) I've also included another option "PLUGINS_USE_LOWERCASE" which just says that all keys in STD_PLUGINS and PLUGINS are lowercase, and that we can use those plugins in a case insensitive manner. (ie: [% USE TABLE %])


I offered to enter them into CVS myself back in the day, but never heard back from Andy, so I'm assuming that's a rejection stamp for CVS access. ;)

Sorry Josh, but I don't have any recollection of you asking, so it's not a rejection stamp. However if you want to be a TT maintainer then you do need to convince me that you would be as commited to the documentation and tests as to the codebase.


Ok Andy/guys,

Sorry for quoting so much, but I thought it was all relevant since there have 
been substantial gaps of time between posts. Here is my new and improved 
plugins patch with added documentation and tests. I also got rid of the 
IGNORE_STD_PLUGINS config option in the previous patch, as this can be overrode 
already via $Template::Plugins::STD_PLUGINS = {}; (I've made a note of that in 
the documentation.) I think I've added to the documentation correctly, but feel 
free to critique.

-- Josh

_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to