Folks, I have a need for a pluralizer plug-in in some templates I am working on.
see http://search.cpan.org/~kvail/Text-Pluralize-1.0/lib/Text/Pluralize.pm for what I mean. Has anybody already done this? I want to write a plug-in and release it to CPAN, but I want to check on the best practice as I've never written a plug-in before. I quite like the idea of subclassing Template::Plugin::String and getting all the functionality of string operators, with a new pluralize function. But I don't know if the overridden stringification will work. I could provide a patch to Template::Plugin::String with a new pluralize function - and a new optional module for TT (Text::Pluralize), but I don't know how readily patches are accepted to the base blugins that come with TT. Or I could just have a standalone pluralizer object that takes a string and a number as parameters, but I like the behaviour of the string plugin better. Thoughts please. Ivor. _______________________________________________ templates mailing list [email protected] http://lists.template-toolkit.org/mailman/listinfo/templates
