NAME
Oak::Object - Base for all Oak Perl Object Tree
SYNOPSIS
use base qw(Oak::Object);
DESCRIPTION
This is the base object for all the Oak Project, it implements a set of primary functions, that will provide the main functionallity of all Oak objects.
OBJECT METHODS
Oak::Object implements the following methods
- new(PARAMS)
-
This method should not be overriden by any module. It calls constructor passing all the parameters it received and then calls after_construction and returns the object reference. In case of any exception in this routines, it will call call_exception passing the return of the function which failed.
- constructor(PARAMS)
-
This method is called automatically from new. You should not call it unless you know what you are doing. It MUST return a true value in case of success. In case of failure, the return of this function will be passed to call_exception.
MUST CALL SUPER IN THE FUNCTION IF YOU OVERRIDES IT
- after_construction
-
This method is called just after constructor. The return of this function will be treated in the same way of constructor.
MUST CALL SUPER IN THE FUNCTION IF YOU OVERRIDES IT
- call_exception(MESSAGE)
-
Handles an exception with code MESSAGE. The default handler is die MESSAGE. If you override this function, remember to call SUPER if you do not find MESSAGE in the exception table.
- get_property_array
-
Returns an array with all existent properties. Actually, it really uses keys of the hash $self->{__properties__}.
- get(NAME,NAME,...)
-
Returns a scalar if one parameter is passed, or an array if more. Do not override this function, override get_hash instead, this function is only a wraper.
- get_hash(NAME,NAME,...)
-
Retuns a hash with all the properties requested. This function is called by get.
- hierarchy_tree
-
Returns an array containing the tree of inheritance of the actual object. Including the actual object. Nice to determine the path where the object searches for methods.
- DESTROY
-
Always you implement DESTROY function, remember to call SUPER.
BUGS
Too early to determine. :)
COPYRIGHT
Copyright (c) 2001 Daniel Ruoso <daniel@ruoso.com> Aguimar Mendonca Neto <aguimar@email.com.br> All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.