|
NAMEHTML::Template::Pluggable - Extends HTML::Template with plugin supportSYNOPSISJust use this module instead of HTML::Template, then use any plugins, and go on with life.use HTML::Template::Pluggable; use HTML::Template::Plugin::Dot; # Everything works the same, except for functionality that plugins add. my $t = HTML::Template::Pluggable->new(); THE GOALIdeally we'd like to see this functionality merged into HTML::Template, and turn this into a null sub-class.STATUSThe design of the plugin system is still in progress. Right now we have just two triggers, in param and output. The name and function of this may change, and we would like to add triggers in new() and other methods when the need arises.All we promise for now is to keep HTML::Template::Plugin::Dot compatible. Please get in touch if you have suggestions with feedback on designing the plugin system if you would like to contribute. WRITING PLUGINSHTML::Template offers a plugin system which allows developers to extend the functionality in significant ways without creating a creating a sub-class, which might be impossible to use in combination with another sub-class extension.Currently, two triggers have been made available to alter how the values of TMPL_VARs are set. If more hooks are needed to implement your own plugin idea, it may be feasible to add them-- check the FAQ then ask about it on the list. Class::Trigger is used to provide plugins. Basically, you can just: HTML::Template->add_trigger('middle_param', \&trigger); A good place to add one is in your plugin's "import" subroutine: package HTML::Template::Plugin::MyPlugin; use base 'Exporter'; sub import { HTML::Template->add_trigger('middle_param', \&dot_notation); goto &Exporter::import; } TRIGGER LOCATIONS
SEE ALSO
AUTHORMark Stosberg, "<mark@summersault.com>"BUGSPlease report any bugs or feature requests to "bug-html-template-pluggable@rt.cpan.org", or through the web interface at <http://rt.cpan.org>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.Copyright & LicenseCopyright 2006 Mark Stosberg, All Rights Reserved.This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Visit the GSP FreeBSD Man Page Interface. |