From f75f2e728276cbc91c434e920b53c5b15513e570 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 2 Jul 2002 17:12:45 +0000 Subject: Implemented dumpconf command --- Echolot/Config.pm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'Echolot') diff --git a/Echolot/Config.pm b/Echolot/Config.pm index 057b6ee..7e7a55a 100644 --- a/Echolot/Config.pm +++ b/Echolot/Config.pm @@ -1,7 +1,7 @@ package Echolot::Config; # (c) 2002 Peter Palfrader -# $Id: Config.pm,v 1.5 2002/07/02 17:04:21 weasel Exp $ +# $Id: Config.pm,v 1.6 2002/07/02 17:12:45 weasel Exp $ # =pod @@ -84,5 +84,19 @@ sub get() { return $CONFIG; }; +sub dump() { + # FIXME XML::Dumper bug workaround + # There is a bug in pl2xml that changes data passed (cf. Debian Bug #148969 and #148970 + # at http://bugs.debian.org/148969 and http://bugs.debian.org/148970 + require Data::Dumper; + my $storedata; + eval ( Data::Dumper->Dump( [ $CONFIG ], [ 'storedata' ] )); + + my $dump = new XML::Dumper; + my $data = $dump->pl2xml($storedata); + + print $data; +}; + 1; # vim: set ts=4 shiftwidth=4: -- cgit v1.2.3