The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

IWL::Config - provides %IWLConfig

SYNOPSIS

 use IWL::Config '%IWLConfig';
 print "Skin name: $IWLConfig{SKIN}.\n";

IWL.CONF

iwl.conf Can be placed inside cgi-bin/ directory, or using the IWL_CONFIG_FILE environment variable: IWL_CONFIG_FILE=/path/to/my/iwl/config/file/bar.alpha

The following variables may be defined inside the config file:

SKIN

The skin name to use with IWL. Default value: 'default'

SKIN_DIR

The directory, containing the skins. It is relative to the server document root. Default value: '/iwl/skin'

IMAGE_DIR

The directory, containing the images. It is relative to the current skin directory. Default value: '/images'

ICON_DIR

The directory, containing the icons. It is relative to the current skin directory. Default value: '/images/icons'

ICON_EXT

The extension of the image icons. Default value: 'gif'

JS_DIR

The directory, containing all javascript files. It is relative to the server root. Default value: '/iwl/jscript'

STRICT_LEVEL

The level of strictness. If greater than 1, attribute names will be checked, and and an exception will be thrown in case the name is illegal. Default value: '1'

DEBUG

If true, more debug information will be produced. Default value: ''

JS_WHITELIST

A comma separated list of config elements, which are allowed to make it into the JavaScript IWL.Config object. The default value includes the previously mentioned config elements.

RESPONSE_CLASS

If defined, this class will be used for sending data to the server. See IWL::Response for more details.

STATIC_URIS

A colon-separated list of URIs, containing static files. See IWL::Static for more details.

STATIC_URI_SCRIPT

A path, relative to the server document root, which points to a script to handle static content via IWL::Static.

DOCUMENT_ROOT

The absolute path to the document root. It is used by IWL::Static to locate the static content.

EXAMPLE CONFIG FILE
    SKIN = "myskin"
    SKIN_DIR = "/path/to/iwl/skins"
    JS_DIR = "/path/to/iwl/jscript"
    ICON_EXT = "png"

%IWLConfig

By default, the %IWLConfig variable is filled with default values. If a config file is provided and found, The keys inside the config file will overwrite the default ones. Before the variable is exported, the following keys are mutated:

SKIN_DIR

It is mutated to SKIN_DIR + '/' + SKIN

IMAGE_DIR

It is mutated to SKIN_DIR + '/' + SKIN + IMAGE_DIR

ICON_DIR

It is mutated to SKIN_DIR + '/' + SKIN + ICON_DIR

JS_WHITELIST

It is mutated to an array reference, by splitting the value by a ','

METHODS

getJSConfig

Returns a javascript expression, which creates the global IWL object, if such does not exist, and adds the Config attribute to it.

This is a class method.

LICENCE AND COPYRIGHT

Copyright (c) 2006-2007 Viktor Kojouharov. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perldoc perlartistic.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 192:

You forgot a '=back' before '=head1'