diff options
author | Peter Palfrader <peter@palfrader.org> | 2002-07-02 17:12:45 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2002-07-02 17:12:45 +0000 |
commit | f75f2e728276cbc91c434e920b53c5b15513e570 (patch) | |
tree | 1da044a47c1e3936f69c013475d9521a6a6b215a /Echolot/Config.pm | |
parent | 855080248a9c0c9d53ea9b57816a4156e6b7be52 (diff) |
Implemented dumpconf command
Diffstat (limited to 'Echolot/Config.pm')
-rw-r--r-- | Echolot/Config.pm | 16 |
1 files changed, 15 insertions, 1 deletions
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 <peter@palfrader.org> -# $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: |