Ace::Browser::SiteDefs3pm
Access to acebrowser configuration files
Usage
use Ace;use Ace::Browser::AceSubs;use CGI qw(:standard);my $configuration = Configuration;my $docroot = $configuration->Docroot;my @pictures = @{$configuration->Pictures};my %displays = %{$configuration->Displays};my $coderef = $configuration->Url_mapper;$coderef->($param1,$param2);
Overview
Ace::Browser::SiteDefs evaluates an AceBrowser configuration file and returns a configuration object ("config object" for short). A config object is a bag of dynamically-generated methods, derived from the scalar variables, arrays, hashes and subroutines in the configuration file.
The config object methods are a canonicalized form of the configuration file variables, in which the first character of the method is uppercase, and subsequent characters are lower case. For example, if the configuration variable was $ROOT, the method will be $config_object->Root.
Working with Configuration Objects
To fetch a configuration object, use the Ace::Browser::AceSubs Configuration() function. This will return a configuration object for the current database:
$config_object = Configuration();
Thereafter, it's just a matter of making the proper method calls.
If the Configuration file is a.... The method call returns a...---------------------------------- ----------------------------Scalar variable ScalarArray variable Array referenceHash variable Hash referenceSubroutine Code reference
If a variable is not defined, the corresponding method will return undef.
Releases
8 releases since Debian 6.0 (Squeeze); the text changed 7 times.