man XTM::generic () - XTM generic accessor

NAME

XTM::generic - XTM generic accessor

SYNOPSIS

  # very much an internal package...

DESCRIPTION

Generic provider for accessor functions.

Instead of hard-coding simple accessor functions into trivial packages, these packages can inherit the methods from this package.

INTERFACE

Constructor

The constructor just returns a blessed object reference to the class in question. All parameters - given in a hash - will be components of the resulting object.

Methods

add
$o->add ($p, ....) add analyzes the class of the parameters and incorporates them according to the nesting imposed by this implementation of the XTM standard. An exception will be raised if the internal consistency would be violated.
add_, add__s
AUTOLOAD will capture most of the set/get accesses. If the method name begins with 'add_', then the information provided as parameter will be added as follows. If it ends with '_s' then the provided values will be added to a list component with a particular name (see below). Otherwise it is regarded as a single value. If the method does not begin with 'add_' then a simple read access is assumed. Again, if the name ends with '_s' then a list will be returned. The component name will be derived from the rest of the method name, if that is non-empty ('rumsti' as in 'add_rumsti_s'). If the name is empty ('add__s') then the component name will be derived from the parameters class name ('XYZ::rumsti' will result in a component name 'rumsti').
undefine
The method undefine gets rid of a particular component.
xml
This method is meant for serialisation into XTM. As this class is generic, every subclass will have to implement this.

SEE ALSO

XTM

AUTHOR INFORMATION

Copyright 200[1-2], Robert Barta <rho@telecoma.net>, All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. http://www.perl.com/perl/misc/Artistic.html