ramesh thangamani wrote:
My requirement is like I need to use both default and
user defined plugins. I initially thought for default
plugins there is no need to specify them in
PLUGIN_BASE, but when I started using plugins i got
the following error: ( both for default and user
defined plugins)

Can't locate xxxx/String.pm in @INC (@INC contains:
.... /usr/local/apache/ /usr/local/apache/lib/perl) at
/xxxx/lib/perl5/site_perl/5.8.6/Template/Plugins.pm
line 201.


This regular expression (Plugins.pm::204 v2.14) should prevent the error you are experiencing:
---------------------------------------------------------------
 $error .= "[EMAIL PROTECTED]"
                unless ($@ =~ /^Can\'t locate $file\.pm/);
---------------------------------------------------------------

Can you check $file and see why it's not matching or give us the plugin base? (Or maybe you can see why that is the case.) Also, if you are using a different version of Template Toolkit than 2.14+, please let us know.




Regarding $STD_PLUGINS, I want to know whether new
version of Plugins.pm is generated whenever new
default plugin gets added?. This looks like some over
head?

I'm not sure what you mean. The Plugins.pm file is never regenerated.

Here is a way for you to modify the standard plugins:
---------------------------------------------------------------
use Template::Plugins;
$Template::Plugins::STD_PLUGINS{cgi} = "MyPlugin::CGI";
$Template::Plugins::STD_PLUGINS{string} = xxx;
delete $Template::Plugins::STD_PLUGINS{unwanted_plugin};
---------------------------------------------------------------

-- Josh

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

Reply via email to