PogoLink makes single-single or single-multi or multi-multi bidirectional relationships between objects in a Pogo database. The relationships are automatically maintained to link each other correctly. You can choose one of Pogo::Array, Pogo::Hash, Pogo::Htree, Pogo::Btree and Pogo::Ntree to make a multi end of link.

Constructor. Class method. $selfobject is a object in the database which possesses this link. It must be a object as a hash reference. $linkclass is a class name of linked object. If $linkclass defaults, any class object is allowed. $invfield is a field (i.e. hash key) name of the linked object which links inversely. $keyfield is only necessary for PogoLink::Hash, PogoLink::Htree, PogoLink::Btree, PogoLink::Ntree. It specifies a field name of the linked object thats value is used as the key of this link hash. $size may be specified for PogoLink::Array, PogoLink::Hash or PogoLink::Htree. $size will be used when internal linking Pogo::Array, Pogo::Hash or Pogo::Htree object will be constructed.

NOTE: You cannot use PogoLink::* constructors as follows in a class constructor.

Link to $object. The inverse field (it's name was specified as $invfield by new()) of $object must be a PogoLink::* object. If the inverse field is not defined yet and $object has INIT_fieldname method (e.g. the field name is 'FIELD', the method name is 'INIT_FIELD'), this method calls $object->INIT_fieldname() to initialize the inverse field before linking.