1Module::Starter::PluginU:s:eCrGICAopnpt(r3i)buted Perl DMoocduumleen:t:aSttiaornter::Plugin::CGIApp(3)
2
3
4

NAME

6       Module::Starter::Plugin::CGIApp - template based module starter for CGI
7       apps.
8

SYNOPSIS

10           use Module::Starter qw(
11               Module::Starter::Plugin::CGIApp
12           );
13
14           Module::Starter->create_distro(%args);
15

ABSTRACT

17       This is a plugin for Module::Starter that builds you a skeleton
18       CGI::Application module with all the extra files needed to package it
19       for CPAN. You can customize the output using HTML::Template.
20

VERSION

22       This document describes version 0.44
23

DESCRIPTION

25       This module subclasses Module::Starter::Simple and includes
26       functionality similar to Module::Starter::Plugin::Template.  This
27       document only describes the methods which are overridden from those
28       modules or are new.
29
30       Only developers looking to extend this module need to read this. If you
31       just want to use Module::Starter::Plugin::CGIApp, read the docs for
32       cgiapp-starter or titanium-starter instead.
33

METHODS

35   new ( %args )
36       This method calls the "new" supermethod from
37       Module::Starter::Plugin::Simple and then initializes the template
38       store. (See "templates".)
39
40   create_distro ( %args )
41       This method works as advertised in Module::Starter.
42
43   create_LICENSE( )
44       This method creates a "LICENSE" file in the distribution's directory
45       which can hold the distribution's license terms.
46
47   create_MANIFEST_SKIP( )
48       This method creates a "MANIFEST.SKIP" file in the distribution's
49       directory so that unneeded files can be skipped from inclusion in the
50       distribution.
51
52   create_modules( @modules )
53       This method will create a starter module file for each module named in
54       @modules.  It is only subclassed from Module::Starter::Simple here so
55       we can change the rtname tmpl_var to be the distro name instead of the
56       module name.
57
58   create_perlcriticrc( )
59       This method creates a "perlcriticrc" in the distribution's author test
60       directory so that the behavior of "perl-critic.t" can be modified.
61
62   create_server_pl( )
63       This method creates "server.pl" in the distribution's root directory.
64
65   create_t( @modules )
66       This method creates a bunch of *.t files.  @modules is a list of all
67       modules in the distribution.
68
69   create_tmpl( )
70       This method takes all the template files ending in .html (representing
71       HTML::Template's and installs them into a directory under the distro
72       tree.  For instance if the distro was called "Foo-Bar", the templates
73       would be installed in "lib/Foo/Bar/templates".
74
75       Note the files will just be copied over not rendered.
76
77   create_xt( @modules )
78       This method creates a bunch of *.t files for author tests.  @modules is
79       a list of all modules in the distribution.
80
81   render( $template, \%options )
82       This method is given an HTML::Template and options and returns the
83       resulting document.
84
85       Data in the "Module::Starter" object which represents a reference to an
86       array @foo is transformed into an array of hashes with one key called
87       $foo_item in order to make it usable in an HTML::Template "TMPL_LOOP".
88       For example:
89
90           $data = ['a'. 'b', 'c'];
91
92       would become:
93
94           $data = [
95               { data_item => 'a' },
96               { data_item => 'b' },
97               { data_item => 'c' },
98           ];
99
100       so that in the template you could say:
101
102           <tmpl_loop data>
103               <tmpl_var data_item>
104           </tmpl_loop>
105
106   templates ( )
107       This method reads in the template files and populates the object's
108       templates attribute. The module template directory is found by checking
109       the "MODULE_TEMPLATE_DIR" environment variable and then the config
110       option "template_dir".
111
112   Build_PL_guts($main_module, $main_pm_file)
113       This method is called by create_Build_PL and returns text used to
114       populate Build.PL when the builder is Module::Build; $main_pm_file is
115       the filename of the distribution's main module, $main_module.
116
117   Changes_guts
118       Implements the creation of a "Changes" file.
119
120   LICENSE_guts
121       Implements the creation of a "LICENSE" file.
122
123   Makefile_PL_guts($main_module, $main_pm_file)
124       This method is called by create_Makefile_PL and returns text used to
125       populate Makefile.PL when the builder is ExtUtils::MakeMaker;
126       $main_pm_file is the filename of the distribution's main module,
127       $main_module.
128
129   MANIFEST_SKIP_guts
130       Implements the creation of a "MANIFEST.SKIP" file.
131
132   MI_Makefile_PL_guts($main_module, $main_pm_file)
133       This method is called by create_MI_Makefile_PL and returns text used to
134       populate Makefile.PL when the builder is Module::Install; $main_pm_file
135       is the filename of the distribution's main module, $main_module.
136
137   module_guts($module, $rtname)
138       Implements the creation of a "README" file.
139
140   README_guts($build_instructions)
141       Implements the creation of a "README" file.
142
143   perlcriticrc_guts
144       Implements the creation of a "perlcriticrc" file.
145
146   server_pl_guts
147       Implements the creation of a "server.pl" file.
148
149   t_guts(@modules)
150       Implements the creation of test files. @modules is a list of all the
151       modules in the distribution.
152
153   tmpl_guts
154       Implements the creation of template files.
155
156   xt_guts(@modules)
157       Implements the creation of test files for author tests. @modules is a
158       list of all the modules in the distribution.
159

BUGS

161       Please report any bugs or feature requests to
162       "bug-module-starter-plugin-cgiapp at rt.cpan.org", or through the web
163       interface at rt.cpan.org <http://rt.cpan.org>. I will be notified, and
164       then you'll automatically be notified of progress on your bug as I make
165       changes.
166

AUTHOR

168       Jaldhar H. Vyas, <jaldhar at braincells.com>
169
171       Copyright (C) 2015, Consolidated Braincells Inc.  All Rights Reserved.
172
173       This distribution is free software; you can redistribute it and/or
174       modify it under the terms of either:
175
176       a) the GNU General Public License as published by the Free Software
177       Foundation; either version 1, or (at your option) any later version, or
178
179       b) the Artistic License version 1.0 or a later version.
180
181       The full text of the license can be found in the LICENSE file included
182       with this distribution.
183

SEE ALSO

185       cgiapp-starter, titanium-starter, Module::Starter,
186       Module::Starter::Simple, Module::Starter::Plugin::Template.
187       CGI::Application, Titanium, HTML::Template
188
189
190
191perl v5.36.0                      2022-07-22Module::Starter::Plugin::CGIApp(3)
Impressum