It's possible, using @INC and the PLUGIN_BASE parameter to
Template->new().
 
e.g., to make a My::Plugin::Foo
 
1) Put the plugin in /private_dir/My/Plugin/Foo.pm
2) use lib qw(/private_dir);
3) my $t = Template->new(PLUGIN_BASE => "My::Plugin");
4) [% USE plugin = Foo %] [% Foo.draw_something %]

Look for PLUGIN_BASE here:
http://www.template-toolkit.org/docs/red/Manual/Config.html


Hth,
Philip



________________________________

        From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mark
Schoonover
        Sent: Friday, December 02, 2005 5:23 PM
        To: Templates (E-mail)
        Subject: [Templates] Custom Plugin Directory??
        
        
        I'm going to create my first plugin wrapper, and was wondering
if it's possible to have a custom plugin directory?? I've checked the
Badger book, but I don't see where there's a config setting for another
plugin location.
         
         
        Thanks!
         
        Mark Schoonover
        IS Manager, American Geotechnical - California, Nevada & Arizona
        V - 714-685-3900 | F - 714-685-3909 | C - 858-457-3816
         
        "The number you are trying to dial is imaginary. Please rotate
your phone 90 degrees, and try again. Error 3.14159"


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

Reply via email to