1Module::Starter::PluginU:s:eTremCpolnattrei(b3u)ted PerlMoDdoucluem:e:nSttaatritoenr::Plugin::Template(3)
2
3
4

NAME

6       Module::Starter::Plugin::Template - module starter with templates
7

VERSION

9       version 1.77
10

SYNOPSIS

12        use Module::Starter qw(
13          Module::Starter::Simple
14          Module::Starter::Plugin::Template
15        );
16
17        Module::Starter->create_distro(%args);
18

DESCRIPTION

20       This plugin is designed to be added to a
21       Module::Starter::Simple-compatible Module::Starter class.  It adds stub
22       methods for template retrieval and rendering, and it replaces all of
23       Simple's _guts methods with methods that will retrieve and render the
24       appropriate templates.
25

CLASS METHODS

27   "new(%args)"
28       This plugin calls the "new" supermethod and then initializes the
29       template store and renderer.  (See "templates" and "renderer" below.)
30

OBJECT METHODS

32   "templates()"
33       This method is used to initialize the template store on the
34       Module::Starter object.  It returns a hash of templates; each key is a
35       filename and each value is the body of the template.  The filename
36       Module.pm is used for the module template.
37
38   "renderer()"
39       This method is used to initialize the template renderer.  Its result is
40       stored in the object's "renderer" entry.  The implementation will
41       determine its use.
42
43   "render($template, \%options)"
44       The "render" method will render the template passed to it, using the
45       data in the Module::Starter object and in the hash of passed
46       parameters.
47
48   _guts methods
49       All of the "FILE_guts" methods from Module::Starter::Simple are
50       subclassed to look something like this:
51
52           sub file_guts {
53               my $self = shift;
54               my %options;
55               @options{qw(first second third)} = @_;
56
57               my $template = $self->{templates}{filename};
58               $self->render($template, \%options);
59           }
60
61       These methods will need to be rewritten when (as is likely)
62       Module::Starter::Simple's _guts methods are refactored into a registry.
63
64       module_guts
65       Makefile_PL_guts
66       MI_Makefile_PL_guts
67       Build_PL_guts
68       Changes_guts
69       README_guts
70       t_guts
71       MANIFEST_guts
72       ignores_guts
73

AUTHOR

75       Ricardo SIGNES, "<rjbs at cpan.org>"
76

Bugs

78       Please report any bugs or feature requests to the bugtracker for this
79       project on GitHub at:
80       <https://github.com/xsawyerx/module-starter/issues>. I will be
81       notified, and then you'll automatically be notified of progress on your
82       bug as I make changes.
83
85       Copyright 2005-2007 Ricardo SIGNES, All Rights Reserved.
86
87       This program is free software; you can redistribute it and/or modify it
88       under the same terms as Perl itself.
89
90
91
92perl v5.32.0                      2020-09-0M7odule::Starter::Plugin::Template(3)
Impressum