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::Template(3pm)			User Contributed Perl Documentation		    Module::Starter::Plugin::Template(3pm)

NAME
Module::Starter::Plugin::Template - module starter with templates VERSION
Version 1.58 SYNOPSIS
use Module::Starter qw( Module::Starter::Simple Module::Starter::Plugin::Template ); Module::Starter->create_distro(%args); DESCRIPTION
This plugin is designed to be added to a Module::Starter::Simple-compatible Module::Starter class. It adds stub methods for template retrieval and rendering, and it replaces all of Simple's _guts methods with methods that will retrieve and render the apropriate templates. CLASS METHODS
"new(%args)" This plugin calls the "new" supermethod and then initializes the template store and renderer. (See "templates" and "renderer" below.) OBJECT METHODS
"templates()" This method is used to initialize the template store on the Module::Starter object. It returns a hash of templates; each key is a filename and each value is the body of the template. The filename Module.pm is used for the module template. "renderer()" This method is used to initialize the template renderer. Its result is stored in the object's "renderer" entry. The implementation will determine its use. "render($template, \%options)" The "render" method will render the template passed to it, using the data in the Module::Starter object and in the hash of passed parameters. _guts methods All of the "FILE_guts" methods from Module::Starter::Simple are subclassed to look something like this: sub file_guts { my $self = shift; my %options; @options{qw(first second third)} = @_; my $template = $self->{templates}{filename}; $self->render($template, \%options); } These methods will need to be rewritten when (as is likely) Module::Starter::Simple's _guts methods are refactored into a registry. module_guts Makefile_PL_guts MI_Makefile_PL_guts Build_PL_guts Changes_guts README_guts t_guts MANIFEST_guts item ignores_guts AUTHOR
Ricardo SIGNES, "<rjbs at cpan.org>" Bugs Please report any bugs or feature requests to "bug-module-starter at 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
Copyright 2005-2007 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 2011-07-02 Module::Starter::Plugin::Template(3pm)
Man Page