Help - App::Doh::Config
Index
- Name
- Synopsis
- Description
- Configuration and Environment
- Subroutines/Methods
- Diagnostics
- Dependencies
- Incompatibilities
- Bugs and Limitations
- Acknowledgements
- Author
- License and Copyright
Name
App::Doh::Config - Defines the configuration file options and their defaults
Synopsis
use Class::Usul; my $usul = Class::Usul->new( config_class => 'App::Doh::Config' ); my $author = $usul->config->author;
Description
Each of the attributes defined here, plus the ones inherited from Class::Usul::Config::Programs, can have their default value overridden by the value in the configuration file
Configuration and Environment
The configuration file is, by default, in JSON format
It is found by calling the find_apphome function
Defines the following attributes;
analytics-
A simple string that defaults to null. Unique Google Analytics registration code
assetdir-
Defaults to var/root/docs/assets. Path object for the directory containing user uploaded files
assets-
A non empty simple string that defaults to assets/. Relative URI path that locates the assets files uploaded by users
auth_roles-
The list of roles applicable to authorisation. Defaults to
admin,editor, anduser author-
A non empty simple string that defaults to
anon. The HTML meta attributes author value blank_template-
Name of the template file to use when creating new markdown files
brand-
A simple string that defaults to null. The name of the image file used on the splash screen to represent the application
cdn-
A simple string containing the URI prefix for the content delivery network. Defaults to null
cdnjs-
A hash reference of URIs for JavaScript libraries stored on the content delivery network. Created prepending cdn to each of the jslibs values
colours-
A lazily evaluated array reference of hashes created automatically from the hash reference in the configuration file. Each hash has a single key / value pair, the colour name and it's hash value. If specified creates a custom colour scheme for the project
components-
A hash reference containing component specific configuration options. Keyed by component classname with the leading application class removed. e.g.
$self->config->components->{ 'Controller::Root' };Defines attributes for these components;
Model::User-
Defines these attributes;
load_factor-
Defaults to 14. A non zero positive integer passed to the
bcryptfunction min_pass_len-
Defaults to 8. The minimum acceptable length for a password
path-
Defaults to var/root/docs/users.json. A file object which contains the users and their profile used by the application
compress_css-
Boolean default to true. Should the
make_cssmethod compress it's output css-
A non empty simple string that defaults to css/. Relative URI path that locates the static CSS files
default_route-
A non empty simple string that default to /doh/static/en/index.html assuming that the mount_point is /doh. What to redirect to for all paths outside the mount point
default_view-
Simple string that default to
html. The moniker of the view that will be used by default to render the response deflate_types-
An array reference of non empty simple strings. The list of mime types to deflate in Plack middleware
description-
A simple string that defaults to null. The HTML meta attributes description value
drafts-
A non empty simple string. Prepended to the pathname of files created in draft mode. Draft mode files are ignored by the static site generator
extensions-
A hash reference. The keys are microformat names and the values are an array reference of filename extensions that the corresponding view can render
file_root-
The project's document root. A lazily evaluated directory that defaults to var/root/docs. The document root for the microformat content pages
font-
A simple string that defaults to null. The default font used to display text headings
help_url-
A simple string that defaults to
pod. The partial URI path which locates this POD when rendered as HTML and served by this application images-
A non empty simple string that defaults to img/. Relative URI path that locates the static image files
js-
A non empty simple string that defaults to js/. Relative URI path that locates the static JavaScript files
jslibs-
An array reference of tuples. The first element is the library name, the second is a partial URI for a JavaScript library stored on the content delivery network. Defaults to an empty list
keywords-
A simple string that defaults to null. The HTML meta attributes keyword list value
languages-
A array reference of string derived from the list of configuration locales The value is constructed on demand and has no initial argument
layout-
A non empty simple string that defaults to standard. The name of the Template::Toolkit template used to render the HTML response page. The template will be wrapped by wrapper.tt
less-
A non empty simple string that defaults to less/. Relative URI path that locates the static Less files
less_files-
The list of predefined colour schemes and feature specific less files
links-
A lazily evaluated array reference of hashes created automatically from the hash reference in the configuration file. Each hash has a single key / value pair, the link name and it's URI. The links are displayed in the navigation panel and the footer in the default templates
mdn_tab_width-
Non zero positive integer defaults to 3. The number of spaces required to indent a code block in the markdown class
max_asset_size-
Integer defaults to 4Mb. Maximum size in bytes of the file upload
max_messages-
Non zero positive integer defaults to 3. The maximum number of messages to store in the session between requests
max_sess_time-
Time in seconds before a session expires. Defaults to 15 minutes
mount_point-
A non empty simple string that defaults to /doh. The root of the URI on which the application is mounted
no_index-
An array reference that defaults to
[ .git .svn cgi-bin doh.json ]. List of files and directories under the document root to ignore owner-
A non empty simple string that defaults to the configuration
prefixattribute. Name of the user and group that should own all files and directories in the application when installed port-
A lazily evaluated non zero positive integer that defaults to 8085. This is the port number that the documentation server will listen on by default when started by the control daemon
posts-
A non empty simple string the defaults to posts. The directory name where dated markdown files are created in category directories. These are the blogs posts or news articles
projects-
A hash reference that defaults to an empty hash reference. The keys are port numbers and the values are paths to the document roots of different projects. Multiple servers can be started on different port numbers each with their document root and local configuration file in that document root directory
request_roles-
Defaults to
L10N,Session, andStatic. The list of roles to apply to the default request base class repo_url-
A simple string that defaults to null. The URI of the source code repository for this project
root_mtime-
Path object for the document tree modification time file. The indexing program touches this file setting it to modification time of the most recently changed file in the document tree
scrubber-
A string used as a character class in a regular expression. These character are scrubber from user input so they cannot appear in any user supplied pathnames or query terms. Defaults to
[;\$\`&\r\n] secret-
Used to encrypt the session cookie
serve_as_static-
A non empty simple string which defaults to
css | favicon.ico | img | js | less. Selects the resources that are served by Plack::Middleware::Static server-
A non empty simple string that defaults to
Starman. The Plack engine name to load when the documentation server is started in production mode session_attr-
A hash reference of array references. These attributes are added to the ones in Web::ComposableRequest::Session to created the session class. The hash key is the attribute name and the tuple consists of a type and a optional default value. The default list of attributes is;
code_blocks-
An integer which defaults to 1. Can be 1 (shown code blocks), 2 (show code blocks inline), or 3 (hide code blocks)
float-
A non numeric simple string which defaults to
float-view. The default view mode query-
Default search string
theme-
A non empty simple string that defaults to
green. The name of the default colour scheme use_flags-
Boolean which defaults to
TRUE. Display the language code, which is derived from browsers accept language header value, as a national flag. If false display as text
skin-
A non empty simple string that defaults to
default. The name of the default skin used to theme the appearance of the application stash_attr-
A hash reference of array references. The keys indicate a data source and the values are lists of attribute names. The values of the named attributes are copied into the stash. Defines the following keys and values;
config-
The list of configuration attributes whose values are copied to the
pagehash reference in the stash common_links-
An array reference that defaults to
[ assets css help_url images less js ]. The application pre-calculates URIs for these static directories for use in the HTML templates request-
The list of request attributes whose values are copied to the
pagehash reference in the stash session-
An array reference that defaults to the keys of the session_attr hash reference. List of attributes that can be specified as query parameters in URIs. Their values are persisted between requests stored in the session store
static-
The default name for the sub-directory of the
rootdirectory that will contain the static HTML pages. Defaults tostatic template-
If the selected Template::Toolkit layout is standard then this attribute selects which left and right columns templates are rendered
title-
A non empty simple string that defaults to
Documentation. The documentation project's title as displayed in the title bar of all pages twitter-
An array reference that defaults to an empty array reference. List of Twitter follow buttons
user-
Simple string that defaults to null. If set the daemon process will change to running as this user when it forks into the background
user_home-
The home directory of the user who owns the files and directories in the the application
workers-
A non zero positive integer. The number of processes to start when running under a pre-forking server. Defaults to 5
Subroutines/Methods
None
Diagnostics
None
Dependencies
Incompatibilities
There are no known incompatibilities in this module
Bugs and Limitations
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Acknowledgements
Larry Wall - For the Perl programming language
Author
Peter Flanigan, <pjfl@cpan.org>
License and Copyright
Copyright (c) 2015 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE