XAO::DO::Embeddable - recommended base object for XAO embeddable configs


XAO-Base documentation Contained in the XAO-Base distribution.

Index


Code Index:

NAME

Top

XAO::DO::Embeddable - recommended base object for XAO embeddable configs

SYNOPSIS

Top

 package XAO::DO::Foo::Config;
 use strict;
 use XAO::Objects;
 use base XAO::Objects->load(objname => 'Embeddable');

DESCRIPTION

Top

Provides set_base_config() and base_config() methods to embeddable configs based on it.

METHODS

Top

set_base_config ($)

Called automatically with one argument -- reference to the configuration object it is being embedded into.

base_config ($)

Returns previously stored base config reference. Reason to have this method is the following: methods of embedded configs are called in the namespace of their own and common configuration object is not available from them through normal @ISA relations.

EXPORTS

Top

Nothing.

AUTHOR

Top

Copyright (c) 2003 XAO, Inc.

Andrew Maltsev <am@xao.com>.

SEE ALSO

Top

XAO::DO::Config


XAO-Base documentation Contained in the XAO-Base distribution.
###############################################################################
package XAO::DO::Embeddable;
use strict;
use XAO::Objects;
use base XAO::Objects->load(objname => 'Atom');

use vars qw($VERSION);
$VERSION=(0+sprintf('%u.%03u',(q$Id: Embeddable.pm,v 2.1 2005/01/13 22:34:34 am Exp $ =~ /\s(\d+)\.(\d+)\s/))) || die "Bad VERSION";

###############################################################################

sub set_base_config ($%) {
    my ($self,$base)=@_;
    $self->{_embedding_base_config}=$base;
}

###############################################################################

sub base_config ($%) {
    my $self=shift;
    return $self->{_embedding_base_config};
}

###############################################################################
1;
__END__