1Module::Starter::PluginU(s3e)r Contributed Perl DocumentaMtoidounle::Starter::Plugin(3)
2
3
4
6 Module::Starter::Plugin -- how Module::Starter plugins work
7
9 version 1.77
10
12 This document is a guide to writing plugins for Module::Starter.
13 Currently, as is evident, it isn't very comprehensive. It should
14 provide enough information for writing effective plugins, though.
15 After all, Module::Starter's guts are nice and simple.
16
17 "Module::Starter->import"
18 Module::Starter provides an import method, the arguments to which are
19 plugins, in the order in which they should be loaded. If no plugins
20 are given, Module::Starter::Simple (and only Module::Starter::Simple)
21 is loaded.
22
23 By default, the given modules are required and arranged in an is-a
24 chain. That is, Module::Starter subclasses the last plugin given,
25 which subclasses the second-to-last, up to the first plugin given,
26 which is the base class. If a plugin provides a "load_plugins" method,
27 however, the remaining plugins to be loaded are passed to that method,
28 which is responsible for loading the rest of the plugins.
29
30 This architecture suggests two kinds of plugins:
31
32 engine plugins
33 An engine is a plugin that stands alone, implementing the public
34 "create_distro" method and all the functionality required to carry out
35 that implementation. The only engine included with Module::Starter is
36 Module::Starter::Simple, and I'm not sure any more will be seen in the
37 wild any time soon.
38
39 plain old plugins
40 Other plugins are designed to subclass an engine and alter its
41 behavior, just as a normal subclass alters its parent class's. These
42 plugins may add features to Module::Starter engines, or may just
43 provide general APIs for other plugins to exploit (like
44 Module::Starter::Plugin::Template.)
45
46 The template plugin is a simple example of a plugin that alters an
47 engine to accept further plugins. Other plugins like template will
48 probably be written in the near future, and plugins that exploit the
49 API provided by Module::Starter::Plugin::Template will be available on
50 the CPAN.
51
53 Ricardo SIGNES "<rjbs at cpan.org>"
54
56 Copyright 2005, Ricardo SIGNES. All Rights Reserved.
57
58 This program is free software; you can redistribute it and/or modify it
59 under the same terms as Perl itself.
60
61
62
63perl v5.32.1 2021-01-27 Module::Starter::Plugin(3)