Hi Matthew!
Please consider adding a licence. The POD could use some work. I've
attached a diff file where you can see the changes.
HTH,
Alex
Subject: | diff.txt |
--- orig.pm
+++ modified.pm
@@ -113,9 +113,12 @@
__END__
=pod
+
=head1 NAME
+
XML::Config
-=head1 VERSION INFORMATION
+
+=head1 VERSION
Version: 0.1
@@ -123,48 +126,59 @@
=head1 SYNOPSIS
-use XML::Config;
-
-my $cfg = new XML::Config;
-my %CONF = $cfg->load_conf("path/to/file.xml");
-
- -OR-
-
-my %CONF = $cfg->load_conf("path/to/file.xml",\%your_local_config_hash);
-
- -OR-
-
-my %CONF = $cfg->load_conf("path/to/file.xml",\%your_local_config_hash, \@do_not_overide_these);
-
+ use XML::Config;
+
+ my $cfg = new XML::Config;
+ my %CONF = $cfg->load_conf("path/to/file.xml");
+
+ -OR-
+
+ my %CONF = $cfg->load_conf("path/to/file.xml",\%your_local_config_hash);
+
+ -OR-
+
+ my %CONF = $cfg->load_conf("path/to/file.xml",\%your_local_config_hash, \@do_not_overide_these);
=head1 DESCRIPTION
-XML::Config is a simple shallow XML to hash converter. Given a configuration file in the form:
+XML::Config is a simple shallow XML to hash converter. Given a configuration file in the form:
-<goxml_config process="spider">
- <foo>Bar</foo>
- <bar>Foo</bar>
-</goxml_config>
+ <goxml_config process="spider">
+ <foo>Bar</foo>
+ <bar>Foo</bar>
+ </goxml_config>
... XML::Config->load_conf returns:
-{
- foo => 'bar',
- bar => 'foo'
-}
+ {
+ foo => 'bar',
+ bar => 'foo'
+ }
-XML::Config will also try to load "path/to/file.xml.bak" in the case of a non-file not found parse error.
+XML::Config will also try to load F<path/to/file.xml.bak> in the case of a non-file not found parse error.
if it does this, it will set the err_str to "WARN: Loaded backup configuration\n";
-The second way of calling load_conf() with the hash reference allows you to set defaults to your config hash,
+The second way of calling C<load_conf()> with the hash reference allows you to set defaults to your config hash,
and have the XML overide some of them.
The third way makes it possible to disallow overwrites of certain variables. This is a good security measure.
+
=head1 METHODS
-load_conf($conf_file_path)
-err_str()
+=head2 load_conf($conf_file_path)
+
+Loads the configuration files located at C<$conf_file_path>.
+
+=head2 err_str()
+
+Returns the last error message. Inspect this if loading a configuration file was not successful.
+
+=head1 LICENSE
+
+This library is free software; you can redistribute it and/or modify it under
+the same terms as Perl itself, either Perl version 5.12.2 or, at your option,
+any later version of Perl 5 you may have available.
=head1 AUTHOR
@@ -172,8 +186,4 @@
=head1 COPYRIGHT
-(c)2000 XML Global Technologies, Inc.
-
-
-
-
\ No newline at end of file
+(c)2000 XML Global Technologies, Inc.
\ No newline at end of file