| Data-Serializer documentation | Contained in the Data-Serializer distribution. |
Data::Serializer::Config::General - Creates bridge between Data::Serializer and Config::General
use Data::Serializer::Config::General;
Module is used internally to Data::Serializer
Base data structure to serialize must be a hash reference
Thomas Linden <tom@daemon.de>
Copyright 2002 by Thomas Linden. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl(1), Data::Serializer(3), Config::General(3)
| Data-Serializer documentation | Contained in the Data-Serializer distribution. |
package Data::Serializer::Config::General; BEGIN { @Data::Serializer::Config::General::ISA = qw(Data::Serializer) } use warnings; use strict; use Config::General; use vars qw($VERSION @ISA); $VERSION = '0.02'; sub options { return (shift)->{options}; } sub serialize { my $self = (shift); my $ref = (shift); return (new Config::General(%{$self->options()}, -ConfigHash => $ref))->save_string(); } sub deserialize { my $self = (shift); my $ref = (shift); my %hash = (new Config::General(%{$self->options()}, -String => $ref))->getall(); return \%hash; } 1; __END__