On Fri, Dec 20, 2002 at 08:17:16AM -0500, darren chamberlain wrote: > * Barrie Slaymaker <[EMAIL PROTECTED]> [2002-12-20 04:05]: > > Part of QA is defining best practices. I've been encoding a few > > operations I use a lot when writing new perl module distributions in > > to script form to make my code and POD more consistent. > > This is great. I keep meaning to do something like this myself, get > about halfway there, and then end up doing something else. Good work.
Me too. I finally got snorked at it and pushed it over the top. > I'd use something like _skeleton.pm and _skeleton.t for > [the template files] Good point. >>TODO Probably "default.pm.template" or something. I specifically resisted the urge to use TT2, it's a cheesy s/<%...%>// thing, but I'd like to make the templating system pluggable so folks can use their own, in which case the final extension can be used to select it: default.pm.tt2 apache.pm.mason or something. > - the ability to choose different Template.pm Good idea >>TODO. I also want to be able to load a template and have it declare (implicitly or explicitly) options so you could take the same template and make it insert extra code, like default.pm would normally instantiate a simple module, but could be cajoled in to instantiating as a class (ie with new() and some POD for methods, perhaps an @ISA chunk or whatever): $ newpm Foo::Bar --class --isa=Camel::Jockey I've kludged code to peer in to TT2 templates to get at [%META%] declarations (it does not allow this by default AFAICS, surprisingly, I had to grovel through the template object's guts for meta info), and this has proven to be a useful way to let a template declare features or request certain preprocessing functions, like options parsing :). > Overall, it looks very good. When's the release party? :) This is it, bub ;). The URI I gave was to a real, live tarball. I'll at least fold in your ideas before it leaves alpha status. Probably over the holidays. - Barrie