Alias - provide a "symbolic link" type capability for Devices (and Collections?) in the database.
base
use Alias;
$a = Alias->new({name=>"thing"});
$a->isa("Alias"); # returns true
$a->target("realnode1");
$target_name = $a->target;
# assuming "realnode1" is of type Device::Node...
$a->isa("Device::Node"); # returns true
$obj = $a; $obj->some_method; # calls some_method() for target object
This package provides the "Alias" object type for use in a CIToolkit database, which can reference any other existing object (Device or (Collection?))
Only the name and target methods (and isa if no target is yet defined) will act on the Alias itself. All other methods will behave as if called from the target object.
Also, after a target object method is called, the object handle will be changed to reference the target. This means that name, and target if defined, will subsequently act on the target, NOT THE Alias.
If target is defined, returns true if the target type matches the requested object type; otherwise returns false.
If target is NOT defined, performs a normal "isa" on the Alias object.
MyDB
Device
Collection