NAME
Oak::Filer::Component - Filer to save/load data into/from Components
DESCRIPTION
This module provides access for saving and reading data into a Component XML, to be used by components. Must pass XML FILENAME
HIERARCHY
Oak::Object
Oak::Filer
Oak::Filer::Component
PROPERTIES
- FILENAME
-
The name of the XML file. Defined by constructor
METHODS
- constructor
-
Overwrited to test the existance of XML file.
- load
-
Load the information from the XML file and return one of the following properties "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
-
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.
EXCEPTIONS
The following exceptions are introduced by Oak::Filer::Component
- Oak::Filer::Component::Error::ErrorReadingXML
-
This error is throwed when there is some problem with the XML while trying to read it.
- Oak::Filer::Component::Error::ErrorWritingXML
-
This error is throwed when there is some problem with the XML while trying to read it.
EXAMPLES
require Oak::Filer::Component;
my $filer = new Oak::Filer::Component(
FILENAME => "tralala.xml"
)
my $hr_props = $filer->load("mine");
my $hr_owned = $filer->load("owned");
$filer->store(
mine => $hr_props,
owned => $hr_owned
);
COPYRIGHT
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.