BioMart::Web SiteDefs
SummaryPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
BioMart::Web::SiteDefs
Package variables
Privates (from "my" definitions)
%settings = ()
Synopsis
TODO: Synopsis here.
Description
Defines constants used throughout BioMart for things like URL prefixes.
Loads these from a file called settings.conf in the same location as
the registry XML file. If file not found, defaults are used.
Methods
configure
No description
Code
getSettings
No description
Code
Methods description
None available.
Methods code
configuredescriptionprevnextTop
sub configure {
	my ($self, $confDir) = @_;

	my $confFile = $confDir."/settings.conf";
	if (-e $confFile) {	
		open(FH, "<".$confFile) || return; # Ignore if can't read.
my $currHash = undef; while (<FH>) { # Have to do split because of weird newline stuff.
foreach (split("\n")) { s/^\s+//; # Strip leading whitespace
s/\s+$//; # Strip trailing whitespace
s/^#.*//; # Strip comments.
m/^.+$/ or next; # Skip blank lines.
m/^\[\s*(.*?)\s*\]$/ and $currHash = $1; # New section?
$currHash and m/^(.*?)\s*=\s*(.*)$/ and $settings{$currHash}{$1}=$2; # Key=value
}
}
close(FH);
} } 1;
}
getSettingsdescriptionprevnextTop
sub getSettings {
	my ($self, $confDir) = @_;
	if($confDir) ## undefined expected from formatterI as it has no concept of conf dir
{ $self->configure($confDir); } #return (exists $settings{$group}) ? %{$settings{$group}} : ();
return\% settings;
}
General documentation
AUTHOR - Syed Haider, Richard HollandTop
CONTACTTop
This module is part of the BioMart project
http://www.ebi.ac.uk/biomart
Questions can be posted to the mart-dev mailing list: mart-dev@ebi.ac.uk