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 );
59 # coerce the XML-parsed config into the correct format
63 for my $k ( keys %$config ) {
64 my $ref = $config->{ $k };
65 my $name = ref $ref ? delete $ref->{ name } : undef;
66 if ( defined $name ) {
67 $out->{ $k }->{ $name } = $ref;
80 =item * Brian Cassidy E<lt>bricas@cpan.orgE<gt>
82 =item * Joel Bernstein E<lt>rataxis@cpan.orgE<gt>
86 =head1 COPYRIGHT AND LICENSE
88 Copyright 2006 by Brian Cassidy
90 This library is free software; you can redistribute it and/or modify
91 it under the same terms as Perl itself.
99 =item * L<Config::Any>
101 =item * L<XML::Simple>