On Mon, 2005-01-03 at 14:13 -0500, Arshavir Grigorian wrote: > I have a package subroutine that requires an Apache request object and > will return a list of privileges (based on a session id stored in > pnotes). So I am wondering whether I should be using TT's Plugin > interface to make this subroutine accessible from within a template > (make it a class), or whether there is a better way for doing this.
I would just get the list of privileges before running the template and pass them in as data. > If the Plugin is the way to go, would I have to initialize the Template > object to contain a reference to the Apache request object, then use it > from within the template that includes the plugin? If you need a request object in a plugin, just get it by calling Apache->request(). That will work fine unless you're using threads. - Perrin _______________________________________________ templates mailing list [email protected] http://lists.template-toolkit.org/mailman/listinfo/templates
