1 package Config::Any::XML;
8 Config::Any::XML - Load XML config files
12 Loads XML files. Example:
16 <component name="Controller::Foo">
28 return an array of valid extensions (C<xml>).
38 Attempts to load C<$file> as an XML file.
45 my $args = shift || {};
48 my $config = XML::Simple::XMLin(
50 ForceArray => [ qw( component model view controller ) ],
54 return $class->_coerce($config);
58 # coerce the XML-parsed config into the correct format
62 for my $k (keys %$config) {
63 my $ref = $config->{$k};
64 my $name = ref $ref ? delete $ref->{name} : undef;
66 $out->{$k}->{$name} = $ref;
78 =item * Brian Cassidy E<lt>bricas@cpan.orgE<gt>
80 =item * Joel Bernstein E<lt>rataxis@cpan.orgE<gt>
84 =head1 COPYRIGHT AND LICENSE
86 Copyright 2006 by Brian Cassidy
88 This library is free software; you can redistribute it and/or modify
89 it under the same terms as Perl itself.
97 =item * L<Config::Any>
99 =item * L<XML::Simple>