IWL::Config - provides %IWLConfig
use IWL::Config '%IWLConfig'; print "Skin name: $IWLConfig{SKIN}.\n";
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:
The skin name to use with IWL. Default value: 'default'
The directory, containing the skins. It is relative to the server document root. Default value: '/iwl/skin'
The directory, containing the images. It is relative to the current skin directory. Default value: '/images'
The directory, containing the icons. It is relative to the current skin directory. Default value: '/images/icons'
The extension of the image icons. Default value: 'gif'
The directory, containing all javascript files. It is relative to the server root. Default value: '/iwl/jscript'
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'
If true, more debug information will be produced. Default value: ''
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.
If defined, this class will be used for sending data to the server. See IWL::Response for more details.
A colon-separated list of URIs, containing static files. See IWL::Static for more details.
A path, relative to the server document root, which points to a script to handle static content via IWL::Static.
The absolute path to the document root. It is used by IWL::Static to locate the static content.
SKIN = "myskin" SKIN_DIR = "/path/to/iwl/skins" JS_DIR = "/path/to/iwl/jscript" ICON_EXT = "png"
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:
It is mutated to SKIN_DIR + '/' + SKIN
It is mutated to SKIN_DIR + '/' + SKIN + IMAGE_DIR
It is mutated to SKIN_DIR + '/' + SKIN + ICON_DIR
It is mutated to an array reference, by splitting the value by a ','
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.
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:
You forgot a '=back' before '=head1'
To install IWL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IWL
CPAN shell
perl -MCPAN -e shell install IWL
For more information on module installation, please visit the detailed CPAN module installation guide.