IRC::Indexer::Conf - Handle Indexer configuration files
my $cfhash = IRC::Indexer::Conf->parse_conf($path); ## Recursively read server spec files: my $nethash = IRC::Indexer::Conf->parse_nets($specfile_dir);
Handles IRC::Indexer configuration files in YAML format.
This module can also generate example configuration files.
Methods can be called as either class or object methods.
Takes either a file path or a previously-opened filehandle.
Read and parse a specified YAML configuration file, returning the deserialized contents.
parse_conf will croak() if the path cannot be read or does not contain YAML.
YAML::XS will throw an exception if the YAML is not valid.
Takes either a directory or an array reference containing a previously-discovered list of server spec files.
Calls "find_nets" to discover server spec files.
IRC::Indexer::Conf->parse_nets($spec_dir); IRC::Indexer::Conf->parse_nets(\@specfiles);
Returns a hash with the following structure:
$NETWORK => { $ServerA => $spec_file_hash, }
Locate .server spec files recursively under a specified directory.
.server
my @specfiles = IRC::Indexer::Conf->find_nets($spec_dir);
Returns an array in list context or an array reference in scalar context.
Returns the raw YAML for an example configuration file.
IRC::Indexer::Conf->get_example_cf('httpd');
Valid types, as of this writing, are:
httpd spec
Writes an example configuration file to a specified path.
IRC::Indexer::Conf->write_example_cf('httpd', $path); ## From a shell, perhaps: $ perl -MIRC::Indexer::Conf -e \ 'IRC::Indexer::Conf->write_example_cf("httpd", "myhttpd.cf")'
See "get_example_cf" for a list of valid types.
Jon Portnoy <avenj@cobaltirc.org>
To install IRC::Indexer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IRC::Indexer
CPAN shell
perl -MCPAN -e shell install IRC::Indexer
For more information on module installation, please visit the detailed CPAN module installation guide.