
Oak::Filer::Component - Filer to save/load data into/from Components

This module provides access for saving and reading data into a Component XML, to be used by components. Must pass XML FILENAME


The name of the XML file. Defined by constructor. Or a string that represents a filehandle. Ex.: PACKAGE::DATA

Overwrited to test the existance of XML file.
Load the information from the XML file and return the following properties inside a hash "mine" => the properties of the owner of this XML "owned" => a hash with all the owned components and their properties
Throws a Oak::Filer::Component::Error::ErrorReadingXML when there was something wrong when trying to read the XML file.
Store the information into the XML file. You can pass any of these parameters, but you have to pass ALL the parameters, because the hash you pass as a parameter will overwrite the old hash. "mine" => the properties of the owner of this XML "owned" => a hash with all the owned components and their properties
Throws a Oak::Filer::Component::Error::ErrorReadingXML when there was something wrong when trying to read the XML file.

The following exceptions are introduced by Oak::Filer::Component
This error is throwed when the XML FILE does not exist.
This error is throwed when there is some problem with the XML while trying to read it.
This error is throwed when there is some problem with the XML while trying to read it.

require Oak::Filer::Component;
my $filer = new Oak::Filer::Component(
FILENAME => "tralala.xml"
)
my $hash = $filer->load();
$filer->store(
mine => $hash->{mine},
owned => $hash->{owned}
);

Copyright (c) 2001 Daniel Ruoso <daniel@ruoso.com> Marcelo de Paula Bezerra <mosca@oktiva.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.