William McKee wrote:
On Fri, May 28, 2004 at 11:43:48PM -0400, Cees Hek wrote:d>>I currently have a Template Toolkit plugin that I have used in a couple
of projects already, and also, an authentication plugin. However, for my authentication stuff to work, I need to be able to execute a bit of code at the cgiapp_prerun stage, which drove me to write this patch.
Would you be willing to share your TT plugin? I don't use TT but would like to see how you implemented your plugin so that I can write one for my preferred template language.
No problem. I was planning to release it eventually if there was enough interest. I just needed to clean some things up. Just like CGI::Application::Session, it is quite simple, and really just a glorified wrapper around the excellent Template Toolkit module. There are still some things that I am not happy with, so there will most likely be more changes to come, but here it is.
http://cees.crtconsulting.ca/perl/modules/CGI-Application-TT-0.01.tar.gz
I have just written the docs for it, so I hope they are clear enough. I also need to do some more error checking in the code...
One thing to note for those who have used my CGI::Application::Session module. I have changed the way in which this new plugin interacts with CGI::Application. CGI::Application::TT falls back to just using inheritance to get things working. This is in part because I was never 100% happy with the way C::A::Session played with namespaces, and in part from the constructive critisism I recieved from Sam Tregar regarding the implementation of C::A::Session. That having been said, I am still not happy having to use inheritance, so I am open to suggestions on how to improve the interaction between CGI::A and CGI::A::TT (using Exporter? Symbol table hacks? maybe a plugin interface built directly into CGI::Application?).
Also note that this module doesn't require the multiple hooks patch to CGI::App we have been discussing. I need that for another module that is still in the works :)
I would appreciate any comments... Please keep in mind that I rushed this out the door, hence it won't be appearing on CPAN until I get some more of the rough edges smoothed out (and some more tests written). I would of course welcome any help in doing that.
Cheers,
Cees
--------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
