ATMConfig |
![]() |
ATMConfig - manage ApTest Manager configuration files
Shane P. McCarron <shane@aptest.com>
Copyright 2001-2006 Applied Testing and Technology, Inc. All Rights Reserved.
use ATMConfig;
# open up the configuration database for writing
my $cfg = new ATMConfig(1);
# get/set a parameter
my $value = $cfg->param('name');
$cfg->param('name', 'value');
# save the config information
$cfg->save();
# release the config information
$cfg->release();
The ATMConfig object allows examining and managing the ATM configuration parameters.
{report}->{pref1, pref2},
{report}->{custom}->{suiteName}->{pref1, pref2}
$cfg = new ATMConfig(read/write [, timeout]);
Creates a new configuration object.
returns a reference to the ATMConfig object.
$output = $cfg->dump() ;
Returns a newline separated list of properties and values.
returns a path to the config database file
$cfg->print();
$cfg->print(user);
returns the string-ified version of the entire session, or just the contents of test testNum, if specified.
$count = $cfg->numParams();
returns the number of options in the configuration system
@list = $cfg->plist();
returns a sorted array of the names of the defined configuration parameters.
$val = $cfg->param(name);
$cfg->param(name, value);
returns the value of a parameter, setting it if specified. If name is not specified, a pointer to all of the parameter data is returned.
$val = $cfg->priority(name);
returns a priority for a field
$val = $cfg->atmpro(name);
returns the atmpro flag for a field
$val = $cfg->prompt(name);
returns a prompt for a field
$val = $cfg->size(name);
returns a size for a field. This is field type dependent. If it is a text area field, it is the number of rows tall. If it is a text field, it is the maximum number of characters permitted in the field. For a boolean, it doesn't matter.
$val = $cfg->style(name);
Returns a style for a field. If there is no style specified, the default is plain.
@descs = $cfg->descs(name);
returns an array of descriptions, or undef if no descriptions are defined.
@values = $cfg->values(name);
returns an array of values, or undef if no values are defined.
$val = $cfg->type(name);
returns a type for a field, where legal types are textarea, text, and boolean. If the type is not defined, the default is text.
$val = $cfg->func(name);
returns a func value for a field.
$val = $cfg->default(name);
returns a default value for a field.
$output = $self->format(name, edit, value);
name - the name of the field
edit - a boolean indicating whether to present an input field or just the output.
value - the value to present. If not defined, uses the value from the current data structure.
returns the output in a form ready for inclusion in an HTML page.
Copyright © 2000-2006 Applied Testing and Technology, Inc. All rights reserved.