Andy Wardley wrote:
=item PLUGINS_USE_LOWERCASE
I think we can safely make this the default behaviour. All the
standard plugins use lower case names, and all the examples show
PLUGINS being specified in lower case. So I've made it standard
behaviour to search for
$PLUGINS->{ $name } || $PLUGINS->{ lc $name }
Instead of just:
$PLUGINS->{ $name }
So for standard plugins and those you add via PLUGINS, you can specify
them in any case and they should always match the lower case equivalent
(if they're defined in lower case, which they always are for standard
plugins).
Note that this doesn't change the behaviour of the PLUGIN_BASE which is
always case sensitive.
=item ADD_DEFAULT_PLUGIN_BASE
This is also a useful addition that I've been meaning to look at for
ages. However, I think we can streamline it somewhat by defining the
'Template::Plugin' default in a package variable which the user can
override/clear to change the default search path.
$Template::Plugins::PLUGIN_BASE = '';
Now 'Template::Plugin' doesn't get added to the PLUGIN_BASE.
If you don't want any plugins then you need to do this:
$Template::Plugins::STD_PLUGINS = { };
$Template::Plugins::PLUGIN_BASE = '';
Will that do?
Changes, docs and tests are in CVS.
All sounds great to me, and gets the exact functionality I was looking for.
Thanks! Even if my docs/tests weren't used, because of the changes, it's
probably good I learned how to change that stuff anyhow for any future patches.
You've got a pretty slick system going there.
I'll checkout the cvs version sometime later (within next week hopefully) and
check the changes as well. Is there any way we could maybe get cvsweb or
equivalent up and running? (Even if only on a opt-in basis, or Apache
authenticated.) That in addition to emailing certain addresses of all patches
would be good. (Or if you already have that enabled, then maybe a way to add an
address.)
-- Josh
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates