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

Dennis Daupert ddaupert@csc.com
Wed, 29 Jan 2003 08:26:01 -0600


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');
    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