Oak::Component - Implements component capability in objects
This module is the base for all objects that needs to own other objects and other things. Oak::Component objects will use a Oak::Component::Filer filer to store the properties.
# 1 - Instanciating a top level my $comp = new MyComponent(RESTORE_TOPLEVEL => "FILENAME_OR_FILEHANDLE");
# 2 - Instanciating a normal component
my $comp = new MyComponent(RESTORE => { this => "that", name => "bla" });
The following options are accepted in the constructor:
This function throws the following errors:
- Oak::Component::Error::MissingOwnedClassname if __CLASSNAME__ not found. - Oak::Component::Error::MissingOwnedFile if require return a error. - Oak::Component::Error::ErrorCreatingOwned if new return false.
restore_toplevel($xml_filename)restore($data)create_owned($data)free_child(KEY)get_child(KEY)set_owner(OBJ)change_name(NEWNAME)dispatch(EVENT)does nothing if the component is designing.
$page->login->get('value');
Will be the same as:
$page->get_child('login')->get('value');
The following exceptions are introduced by Oak::Component
Copyright (c) 2001 Daniel Ruoso <daniel@ruoso.com> All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.