Config::MVP::Reader(3) User Contributed Perl Documentation Config::MVP::Reader(3)

# [SYNOPSIS](#SYNOPSIS)

```
  use Config::MVP::Reader::YAML; # this doesn't really exist
  my $reader   = Config::MVP::Reader::YAML->new;
  my $sequence = $reader->read_config('/etc/foobar.yml');
```

# [DESCRIPTION](#DESCRIPTION)

A Config::MVP::Reader exists to read configuration data from storage (like a file) and convert that data into instructions to a Config::MVP::Assembler, which will in turn convert them into a Config::MVP::Sequence, the final product.

If true (which it is by default) then the current working directly will be locally added to @INC during config loading. This helps deal with changes made in Perl v5.26.1.

```
  my $sequence = $reader->read_config($location, \%arg);
```

This method is passed a location, which has no set meaning, but should be the mechanism by which the Reader is told how to locate configuration. It might be a file name, a hashref of parameters, a DBH, or anything else, depending on the needs of the specific Reader subclass.

It is also passed a hashref of arguments, of which there is only one valid argument:

```
 assembler - the Assembler object into which to read the config
```

If no assembler argument is passed, one will be constructed by calling the Reader's "build\_assembler" method.

Subclasses should generally not override "read\_config", but should instead implement a "read\_into\_assembler" method, described below. If a subclass *does* override "read\_config" it should take care to respect the "add\_cwd\_to\_lib" attribute, above.

This method should not be called directly. It is called by "read\_config" with the following parameters:

```
  my $sequence = $reader->read_into_assembler( $location, $assembler );
```

The method should read the configuration found at $location and use it to instruct the $assembler (a Config::MVP::Assembler) what configuration to perform.

The default implementation of this method will throw an exception complaining that it should have been implemented by a subclass.

If no Assembler is provided to "read\_config"'s "assembler" parameter, this method will be called on the Reader to construct one.

It must return a Config::MVP::Assembler object, and by default will return an entirely generic one.

# [POD ERRORS](#POD_ERRORS)

Hey! **The above document had some coding errors, which are explained below:**

[Around line 24:](#Around)

Unknown directive: =attr

[Around line 38:](#Around~2)

Unknown directive: =method

[Around line 82:](#Around~3)

Unknown directive: =method

[Around line 102:](#Around~4)

Unknown directive: =method

2026-10-25 perl v5.44.0

---

Document: Config::MVP::Reader(3pm) from perl-config-mvp 2.200015-r1 (Chainguard OS)
Source: https://github.com/rjbs/Config-MVP
