NAME
Module::Starter::Plugin::CGIApp - template based module starter for CGI apps.
SYNOPSIS
use Module::Starter qw(
Module::Starter::Simple
Module::Starter::Plugin::Template
Module::Starter::Plugin::CGIApp
);
Module::Starter->create_distro(%args);
ABSTRACT
This is a plugin for Module::Starter that builds you a skeleton CGI::Application module with all the extra files needed to package it for CPAN. You can customize the output using HTML::Template.
VERSION
Version 0.01
DESCRIPTION
This module subclasses Module::Starter::Plugin::Template which in turn subclasses Module::Starter::Simple. This document only describes the methods which are overriden from those modules or are new.
METHODS
new ( %args )
This method calls the new
supermethod from Module::Starter::Plugin::Template and then initializes the template store and renderer. (See templates
and renderer
below.)
create_distro ( %args )
This method works as advertised in Module::Starter.
create_MANIFEST_SKIP( )
This method creates a MANIFEST.SKIP
file in the distribution's directory so that unneeded files can be skipped from inclusion in the distribution.
create_perlcriticrc( )
This method creates a perlcriticrc
in the distribution's test directory so that the behavior of perl-critic.t
can be modified.
create_tmpl( )
This method takes all the template files ending in .html (representing HTML::Template's and installs them into a directory under the distro tree. For instance if the distro was called Foo-Bar
, the templates would be installed in lib/Foo/Bar/templates
.
Note the files will just be copied over not rendered.
render( $template, \%options )
This method is subclassed from Module::Starter::Plugin::Template.
It is given an HTML::Template and options and returns the resulting document.
Data in the Module::Starter
object which represents an array is transformed into an array of hashes with one key called $data_item
in order to make it usable in an HTML::Template TMPL_LOOP
.
renderer ( )
This method is subclassed from Module::Starter::Plugin::Template but doesn't do anything as the actual template is created by render
in this implementation.
templates ( )
This method is subclassed from Module::Starter::Plugin::Template.
It reads in the template files and populates the object's templates attribute. The module template directory is found by checking the MODULE_TEMPLATE_DIR
environment variable and then the config option template_dir
.
Changes_guts
Implements the creation of a Changes
file.
MANIFEST_SKIP_guts
Implements the creation of a MANIFEST.SKIP
file.
perlcriticrc_guts
Implements the creation of a perlcriticrc
file.
cvsignore_guts
Implements the creation of a .cvsignore
file.
t_guts
Implements the creation of test files.
tmpl_guts
Implements the creation of template files.
BUGS
Please report any bugs or feature requests to bug-module-starter-plugin-cgiapp 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.
AUTHOR
Jaldhar H. Vyas, <jaldhar at braincells.com>
COPYRIGHT
Copyright (C) 2008, Consolidated Braincells Inc. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
module-starter, Module::Starter, Module::Starter::Simple, Module::Starter::Plugin::Template. CGI::Application, HTML::Template