<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Ace::Browser::SiteDefs - Access to AceBrowser configuration files</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rev="made" href="mailto:root@localhost" /> </head> <body style="background-color: white"> <!-- INDEX BEGIN --> <div name="index"> <p><a name="__index__"></a></p> <!-- <ul> <li><a href="#name">NAME</a></li> <li><a href="#synopsis">SYNOPSIS</a></li> <li><a href="#description">DESCRIPTION</a></li> <ul> <li><a href="#working_with_configuration_objects">Working with Configuration Objects</a></li> </ul> <li><a href="#bugs">BUGS</a></li> <li><a href="#see_also">SEE ALSO</a></li> <li><a href="#author">AUTHOR</a></li> </ul> --> </div> <!-- INDEX END --> <p> </p> <h1><a name="name">NAME</a></h1> <p>Ace::Browser::SiteDefs - Access to AceBrowser configuration files</p> <p> </p> <hr /> <h1><a name="synopsis">SYNOPSIS</a></h1> <pre> use Ace; use Ace::Browser::AceSubs; use CGI qw(:standard);</pre> <pre> my $configuration = Configuration; my $docroot = $configuration->Docroot; my @pictures = @{$configuration->Pictures}; my %displays = %{$configuration->Displays}; my $coderef = $configuration->Url_mapper; $coderef->($param1,$param2);</pre> <p> </p> <hr /> <h1><a name="description">DESCRIPTION</a></h1> <p>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.</p> <p>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.</p> <p> </p> <h2><a name="working_with_configuration_objects">Working with Configuration Objects</a></h2> <p>To fetch a configuration object, use the Ace::Browser::AceSubs <code>Configuration()</code> function. This will return a configuration object for the current database:</p> <pre> $config_object = Configuration();</pre> <p>Thereafter, it's just a matter of making the proper method calls.</p> <pre> If the Configuration file is a.... The method call returns a... ---------------------------------- ----------------------------</pre> <pre> Scalar variable Scalar Array variable Array reference Hash variable Hash reference Subroutine Code reference</pre> <p>If a variable is not defined, the corresponding method will return undef.</p> <p> </p> <hr /> <h1><a name="bugs">BUGS</a></h1> <p>Please report them.</p> <p> </p> <hr /> <h1><a name="see_also">SEE ALSO</a></h1> <p><a href="/AcePerl/docs/./Ace/Object.html">the Ace::Object manpage</a>, <a href="/AcePerl/docs/./Ace/Browser/AceSubs.html">the Ace::Browser::AceSubs manpage</a>, <a href="/AcePerl/docs/Ace/Browsr/SearchSubs.html">the Ace::Browsr::SearchSubs manpage</a>, the README.ACEBROWSER file.</p> <p> </p> <hr /> <h1><a name="author">AUTHOR</a></h1> <p>Lincoln Stein <<a href="mailto:lstein@cshl.org">lstein@cshl.org</a>>.</p> <p>Copyright (c) 2001 Cold Spring Harbor Laboratory</p> <p>This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See DISCLAIMER.txt for disclaimers of warranty.</p> </body> </html>