Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

module::starter::plugin(3pm) [debian man page]

Module::Starter::Plugin(3pm)				User Contributed Perl Documentation			      Module::Starter::Plugin(3pm)

NAME
Module::Starter::Plugin -- how Module::Starter plugins work DESCRIPTION
This document is a guide to writing plugins for Module::Starter. Currently, as is evident, it isn't very comprehensive. It should provide enough information for writing effective plugins, though. After all, Module::Starter's guts are nice and simple. "Module::Starter->import" Module::Starter provides an import method, the arguments to which are plugins, in the order in which they should be loaded. If no plugins are given, Module::Starter::Simple (and only Module::Starter::Simple) is loaded. By default, the given modules are required and arranged in an is-a chain. That is, Module::Starter subclasses the last plugin given, which subclasses the second-to-last, up to the first plugin given, which is the base class. If a plugin provides a "load_plugins" method, however, the remaining plugins to be loaded are passed to that method, which is responsible for loading the rest of the plugins. This architecture suggests two kinds of plugins: engine plugins An engine is a plugin that stands alone, implementing the public "create_distro" method and all the functionality required to carry out that implementation. The only engine included with Module::Starter is Module::Starter::Simple, and I'm not sure any more will be seen in the wild any time soon. plain old plugins Other plugins are designed to subclass an engine and alter its behavior, just as a normal subclass alters its parent class's. These plugins may add features to Module::Starter engines, or may just provide general APIs for other plugins to exploit (like Module::Starter::Plugin::Template.) The template plugin is a simple example of a plugin that alters an engine to accept further plugins. Other plugins like template will probably be written in the near future, and plugins that exploit the API provided by Module::Starter::Plugin::Template will be available on the CPAN. AUTHOR
Ricardo SIGNES "<rjbs at cpan.org>" COPYRIGHT
Copyright 2005, Ricardo SIGNES. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.4 2010-05-28 Module::Starter::Plugin(3pm)

Check Out this Related Man Page

Module::Starter::Plugin::TT2(3pm)			User Contributed Perl Documentation			 Module::Starter::Plugin::TT2(3pm)

NAME
Module::Starter::Plugin::TT2 - TT2 templates for Module::Starter::Template VERSION
version 0.125 SYNOPSIS
use Module::Starter qw( Module::Starter::Simple Module::Starter::Plugin::Template Module::Starter::Plugin::TT2 ... ); Module::Starter->create_distro( ... ); DESCRIPTION
This Module::Starter plugin is intended to be loaded after Module::Starter::Plugin::Template. It implements the "renderer" and "render" methods, required by the Template plugin. The methods are implemented with Template Toolkit. EXAMPLES
This module's distribution includes a directory, "templates/dir", and a file "templates/inline" that contain stock templates for use with the InlineStore and DirStore plugins. On Debian systems these files are installed in "/usr/share/doc/libmodule-starter-plugin-tt2-perl/examples". The module itself contains default templates for the ModuleStore plugin in its data section. USAGE
This module is meant to be used with the template stores in the SimpleStore distribution (although you could certainly write your own template store). If you only want to use the built-in templates, you could have lines like this in your config file ("~/.module-starter/config"): author: Lord Poncemby email: ponce@peerage.eng plugins: Module::Starter::Simple Module::Starter::Plugin::Template Module::Starter::Plugin::ModuleStore Module::Starter::Plugin::TT2 template_module: Module::Starter::Plugin::TT2 (Where the plugins line is one line.) This tells Module::Starter to look for the templates in the data section of Module::Starter::Plugin::TT2, which isn't very interesting, since you'll end up getting the same effect as if you'd just used Module::Starter without plugins. To override this behavior, you'd instruct Module::Starter to look somewhere else, either by changing the "template_module" setting, changing the MODULE_TEMPLATE_MODULE environment variable, or using a different template store altogether (q.v., SimpleStore or other plugins). If you need to send parameters to the Template constructor, put them in the "template_parms" parameter to the "create_distro" method. It must be a hash reference. METHODS
"renderer" As implemented, this method just creates a new Template Toolkit engine and stores it in the Module::Starter object. "render( $template, \%options )" This method passes the given template contents and options to the TT2 renderer and returns the resulting document. AUTHOR
Ricardo SIGNES, "<rjbs@cpan.org>" COPYRIGHT
Copyright 2004-2006 Ricardo SIGNES, All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2010-11-07 Module::Starter::Plugin::TT2(3pm)
Man Page