[Templates] Why is 'Template::Plugin' empty?

Eric Cholet cholet@logilune.com
Wed, 29 Jan 2003 15:36:44 +0100


--On Wednesday, January 29, 2003 08:26:01 -0600 Dennis Daupert 
<ddaupert@csc.com> wrote:

> I'm trying to build my first plugin. I've adjusted the package
> declaration, PLUGIN_BASE, and 'use lib' according to the docs
> as best I can. On apache startup attempt, I get the error msg:
>
>     Base class package "'Template::Plugin'" is empty. (Perhaps you need
>     to 'use' the module which defines that package first.)
>     at /usr/local/apache/tt2/MyOrg/Template/Plugin/Treenode.pm line 4
>
> In my plugin, I do:
>
>     package MyOrg::Template::Plugin::Treenode;
>     use base qw('Template::Plugin');

I think you don't want those single quotes in there, qw() already
quotes.

>     use Template::Plugin;
>
> In my main handler, I do:
>
>     use lib ('/usr/local/apache/tt2');
>     use MyOrg::Template::Plugin::Treenode;
>
> The directory MyOrg is located under /usr/local/apache/tt2.
>
>     my $template = Template->new({
>        INCLUDE_PATH => '/usr/local/apache/tt2:/usr/local/tt2/templates',
>        VARIABLES => \%globals,
>        PLUGIN_BASE => 'MyOrg::Template::Plugin',
>        });
>
> What am I missing?
>
> /dennis
>
>
>
>
>
>
> _______________________________________________
> templates mailing list
> templates@template-toolkit.org
> http://lists.ourshack.com/mailman/listinfo/templates



--
Eric Cholet