NAME
Zoidberg::PdParse - parses Zoidbergs config files
SYNOPSIS
push @ISA, 'Zoidberg::PdParse';
my $config_hash_ref = $self->pd_read('config_file.pd');
ABSTRACT
This module parses Zoidbergs config files.
DESCRIPTION
The Zoidberg object and some Zoidberg plugins inherit from this object to read and write config files. The format used is actually output of Data::Dumper. We give these files the extension ".pd" this stands for "Perl Dump". These files can contain all kinds of code that will be executed in a eval() function. There should be assigned a $VAR1 (as done by Data::Dumper output) preferrably this should be a hash reference.
EXPORT
None by default.
METHODS
pd_read_multi(@file_names)
Returns a merge of the contents of array files as hash ref.
Can also be called as pd_read_multi([@file_names], @options)
in this case @options is passed on to pd_read
pd_read($file_name, $pre_eval)
Returns the contents of single file as hash ref.
$pre_eval can contain perl code as a string,
this code will be evalled in the same scope as
the config file. This can for example be used to allow
variables in the config file.
pd_write($file, $hash_ref)
Dump the contents of $hash_ref to $file. Retuns 1 on succes.
pd_merge(@hash_refs)
Merges @hash_refs to single ref. This is for example used
to let multiple config files overload each other.
The last array element is the las processed, and thus in case of overloading
the most specific.
AUTHOR
R.L. Zwart, <carlos@caremail.nl> Jaap Karssenberg || Pardus [Larus] <j.g.karssenberg@student.utwente.nl>
Copyright (c) 2002 Raoul L. Zwart. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
http://zoidberg.sourceforge.net.