The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::Ack::ConfigFinder

DESCRIPTION

A module that contains the logic for locating the various configuration files.

LOCATING CONFIG FILES

First, ack looks for a global ackrc.

On Windows, this is `ackrc` in either COMMON_APPDATA or APPDATA. If `ackrc` is present in both directories, ack uses both files in that order.
On a non-Windows OS, this is `/etc/ackrc`.

Then, ack looks for a user-specific ackrc if the HOME environment variable is set. This is either $HOME/.ackrc or $HOME/_ackrc.

Then, ack looks for a project-specific ackrc file. ack searches up the directory hierarchy for the first `.ackrc` or `_ackrc` file. If this is one of the ackrc files found in the previous steps, it is not loaded again.

It is a fatal error if a directory contains both .ackrc and _ackrc.

After ack loads the options from the found ackrc files, ack looks at the ACKRC_OPTIONS environment variable.

Finally, ack takes settings from the command line.

METHODS

new

Creates a new config finder.

$finder->find_config_files

Locates config files, and returns a list of them.

read_rcfile

Reads the contents of the .ackrc file and returns the arguments.