.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Module::Starter::Plugin 3pm" .TH Module::Starter::Plugin 3pm "2022-10-16" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Module::Starter::Plugin \-\- how Module::Starter plugins work .SH "VERSION" .IX Header "VERSION" version 1.77 .SH "DESCRIPTION" .IX Header "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. .ie n .SS """Module::Starter\->import""" .el .SS "\f(CWModule::Starter\->import\fP" .IX Subsection "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. .PP By default, the given modules are required and arranged in an \fIis-a\fR 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 \f(CW\*(C`load_plugins\*(C'\fR method, however, the remaining plugins to be loaded are passed to that method, which is responsible for loading the rest of the plugins. .PP This architecture suggests two kinds of plugins: .SS "engine plugins" .IX Subsection "engine plugins" An engine is a plugin that stands alone, implementing the public \&\f(CW\*(C`create_distro\*(C'\fR 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. .SS "plain old plugins" .IX Subsection "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.) .PP 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 \s-1API\s0 provided by Module::Starter::Plugin::Template will be available on the \s-1CPAN.\s0 .SH "AUTHOR" .IX Header "AUTHOR" Ricardo \s-1SIGNES\s0 \f(CW\*(C`\*(C'\fR .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 2005, Ricardo \s-1SIGNES.\s0 All Rights Reserved. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.