NAME

Lavoco::Website - Framework to run a tiny website, controlled by a json config file and Template::Toolkit.

VERSION

Version 0.05

SYNOPSIS

Runs a FastCGI web-app for serving Template::Toolkit templates.

This module is purely a personal project to control various small websites, use at your own risk.

#!/usr/bin/env perl

use strict;
use warnings;

use Lavoco::Website;

my $website = Lavoco::Website->new( name => 'Example' );

my $action = lc( $ARGV[0] );   # (start|stop|restart)

$website->$action;

METHODS

Class Methods

new

Creates a new instance of the website object.

Instance Methods

name

The identifier for the website, used as the process title.

base

The base directory of the application, we use FindBin for this.

dev

Flag to indicate whether this we're running a development instance of the website. It's on by default, and only turned off if the base directory contains /live. I typically use /home/user/www.example.com/dev and /home/user/www.example.com/live.

processes

Number of FastCGI process to spawn, 5 by default.

templates

The directory containing the TT templates, by default it's $website-\base . '/templates'>.

start

Starts the FastCGI daemon.

stop

Stops the FastCGI daemon.

restart

Restarts the FastCGI daemon, with a 1 second delay between stopping and starting.

TODO

More documentation.

AUTHOR

Rob Brown, <rob at intelcompute.com>

BUGS

Please report any bugs or feature requests to bug-lavoco-website at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Lavoco-Website. I will be notified, and then you will automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Lavoco::Website

You can also look for information at:

LICENSE AND COPYRIGHT

Copyright 2014 Rob Brown.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.