NAME

Config::INI::MVP::Reader - multi-value capable .ini file reader (for plugins)

VERSION

version 0.023

DESCRIPTION

The MVP INI file reader reads INI files, but can handle properties with multiple values. The identification of properties that may have multiple entries is done by section, on a plugin basis. For example, given the following file:

[Foo::Bar]
x = 1
y = 2
y = 3

MVP will, upon reaching this section, load Foo::Bar and call a method (by default mvp_multivalue_args) on it, to determine which property names may have multiple entries. If the return value of that method includes y, then the entry for y in the Foo::Bar section will be an arrayref with two values. If the list returned by multivalue_args did not contain y, then an exception would be raised while reading this section.

To request a single plugin multiple times, the sections must be uniquely identifiable by their names. A name can be given in this form:

[Package::Name / name]

If no name is given, the package name is used as the name.

The data returned is in the form:

[
  {
    '=package' => 'Some::Package',
    '=name'    => 'plugin_moniker',
    arg_1_val  => $value,
    arg_N_val  => [ $val1, $val2, ... ],
  },
  ...
]

The unfortunate names =package and =name are used because they are illegal as property names. The first datum may be the "root" section before any section header. By default, it will have the name _ and no package.

METHODS

AUTHOR

Ricardo SIGNES, <rjbs@cpan.org>

BUGS

Please report any bugs or feature requests through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

COPYRIGHT

Copyright 2008 Ricardo SIGNES, all rights reserved.

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.