summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2013-03-18 20:49:32 +0000
committerLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2013-03-18 20:49:32 +0000
commit6fb6c74abf36536e6d5621d93caa1c1556e28afb (patch)
treedd9dd686474b8c7aefe015c03bdf3087ddab175e /modules
parent95b83ee0416677254259236f5563815fc405df7b (diff)
Don't use disk-caching of XML; fixed some stuff in the writeXML sub
Diffstat (limited to 'modules')
-rw-r--r--modules/xml.pl15
1 files changed, 6 insertions, 9 deletions
diff --git a/modules/xml.pl b/modules/xml.pl
index e9b96aa..e18e4c4 100644
--- a/modules/xml.pl
+++ b/modules/xml.pl
@@ -5,12 +5,14 @@ use strict;
use XML::Simple qw(:strict);
use IO::All;
-$::xs1 = XML::Simple->new( KeyAttr => ['id'], Cache => [ qw/storable memcopy/ ]);
+$::xs1 = XML::Simple->new( KeyAttr => ['id'], Cache => [ qw/memcopy/ ]);
sub readXML {
my ( $p ) = $::cset;
my @fchan = ( 'event', keys %::RISKS );
- $::settings = $::xs1->XMLin( "$p/settings.xml", ForceArray => ['host'], 'GroupTags' => { altnicks => 'altnick', server => 'host', autojoins => 'autojoin' });
+ $::settings = $::xs1->XMLin( "$p/settings.xml", ForceArray => ['host'],
+ 'GroupTags' => { altnicks => 'altnick', server => 'host',
+ autojoins => 'autojoin' });
$::channels = $::xs1->XMLin( "$p/channels.xml", ForceArray => \@fchan );
$::users = $::xs1->XMLin( "$p/users.xml", ForceArray => 'person');
$::commands = $::xs1->XMLin( "$p/commands.xml", ForceArray => [qw/command/]);
@@ -21,16 +23,11 @@ sub readXML {
}
sub writeXML {
- $::xs1->XMLout($::settings, RootName => 'settings', KeyAttr => ['id'],
- GroupTags => { altnicks => 'altnick', server => 'host', autojoins => 'autojoin' },
- ValueAttr => { debug => 'content', nick => 'content', port => 'content',
- realname => 'content', username => 'content', dir => 'content',
- zone => 'content', filefmt => 'content', timefmt => 'content',
- masterchan => 'content', debugchan => 'content'}) > io("$::cset/settings.xml");
+ writeSettings();
writeChannels();
writeUsers();
writeRestrictions();
- $::xs1->XMLout($::commands, RootName => 'commands', KeyAttr => ['id']) > io("$::cset/commands.xml");
+# $::xs1->XMLout($::commands, RootName => 'commands', KeyAttr => ['id']) > io("$::cset/commands.xml");
}
sub writeChannels {