xdg has asked for the wisdom of the Perl Monks concerning the following question:
Hello fellow monks. I'm requesting comments on the namespace and features of a new module I've written. My working name is "ExtUtils::ModuleMaker::TT". It extends ModuleMaker to use the Template Toolkit, allowing user-customizable templates. I've considered alternative names such as "ExtUtils::ModuleMaker::Template" or "::WithTemplates" but "::TT" seemed evocative and mostly, just short. It is accompanied by a front-end script, called "makeperlmod" to read/write configuration defaults, create templates for customization as well as create module distributions.
The module is written, but not yet released. An excerpt of the pod follows
ExtUtils::ModuleMaker::TT - Makes skeleton modules with Template Toolkit templatesSYNOPSIS
use ExtUtils::ModuleMaker::TT; my $mmtt = ExtUtils::ModuleMaker::TT->new ( NAME => 'My::New::Module', TEMPLATE_DIR => '~/.perltemplates' ); $mmtt->complete_build();DESCRIPTION
This module extends ExtUtils::ModuleMaker to use Template Toolkit 2 (TT2) to build skeleton files for a new module. Templates may either be default templates supplied within the module or user-customized templates in a directory specified with the *TEMPLATE_DIR* parameter.Summary of Features/Enhancements:
Notable changes from ExtUtils::ModuleMaker:
- Supports building full module skeletons with all the functionality of ExtUtils::ModuleMaker
- Supports adding a single .pm file (and corresponding .t file) to an existing module distribution tree.
- Supports creating skeleton text for a single method (generally to be called via a script from within your favorite editor)
- Can create a template directory containing the default templates for subsequent user customization
- Templates can access any parameter in the creating object (e.g. $mmtt, above). This supports transparent, user-extensible template variables for use in custom templates
- Included script *makeperlmod* provides a command line user interface for module creation. Supports reading default configuration settings from a file and will create a default config file if requested. Can create full distributions, single modules, single methods, or default template directories
- *complete_build* now takes arguments that are added to or overwrite the current configuration
- Default templates are generally simpler and more compact
- Also creates a MANIFEST.SKIP file with reasonable default contents
- Tests are named after their corresponding .pm files rather than being sequentially numbered. This change supports the "single .pm" mode more consistently. E.g., for "Sample::Module", a test file "Sample_Module.t" is created
- Supports both 'Module::Build and Proxy' and 'Module::Build and proxy Makefile.PL' as *BUILD_SYSTEM* synonyms to cover discrepancy between ExtUtils::ModuleMaker code and pod
The full pod for the module and the script can be found here: ExtUtils::ModuleMaker::TT and makeperlmod.
I'd appreciate any comments/feedback on the suggested namespace (module and script name) as well as on the features and functionality of the module itself. Thank you all very much.
-xdg
update (broquaint): tidied up the formatting and added a <readmore>
update (xdg): changed links to point to cpan now that it's released
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: RFC: namespace and features for ExtUtils::ModuleMaker::TT
by xdg (Monsignor) on Mar 08, 2004 at 16:15 UTC |