/usr/share/perl5/ConfigReader.pod is in libconfigreader-perl 0.5-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | =head1 NAME
ConfigReader - Read directives from a configuration file.
=head1 DESCRIPTION
The ConfigReader library is a set of classes which reads directives
from a configuration file. The library is completely object oriented,
and it is envisioned that parsers for new styles of configuration
files can be easily added.
ConfigReader::Spec encapsulates a specification for configuration
directives. You can specify which directives can be in the
configuration file, aliases for the directive, whether the directive
is required or has a default value, and how to parse the directive
value.
Here's an example of how one directive might be specified:
required $spec 'HomePage', 'new URI::URL';
This defines a required directive called 'HomePage'. To parse the
value from the configuration file, the URI::URL::new() method will be
called with the string value as its argument.
If the directive name is a simple string, it will be used both to
refer to the directive in the Perl program, and as the name in the
configuration file. You can also specify an alias by using an array
ref. For example, suppose you wanted to use "index" as the name of
the directive in the configuration file, but to avoid confusion with
Perl's index() function you wanted to refer to the directive inside
the program as the "file_index". This will do the trick:
['file_index', 'index']
You can specify any number of aliases for the directive:
['file_index', 'index', 'file_index', 'contents', ...]
The parsing function or method is called to translate the value string
from the configuration file into the value used by the program. It
can be specified in several different ways:
code ref
static method
object method
undefined
You can also specify a default value to be used if a directive is not
specified in the configuration file.
string value
code ref
undefined
ConfigReader::Values stores a set of directive values that have been
read from a configuration file. It stores a reference to an
associated Spec as a member variable. Separating the specification
from the values makes it possible to use a single specification for
multiple sets of values.
ConfigReader::DirectiveStyle implements a reader for a common style of
configuration file. It is a subclass of ConfigReader::Values.
Directive names are followed by their value, one per line:
HomePage http://www.w3.org/
Services /etc/services
|