CPAN::Testers::Config - Manage CPAN Testers configuration data
version 0.001
use CPAN::Testers::Config; $config = CPAN::Testers::Config->read; $config->{global}{profile} = 'my_profile.json'; $config->write;
CPAN::Testers::Config provides a very simple interface to load and save CPAN Testers configuration data using only core Perl modules.
By default, configuration is stored in '.cpantesters/config.pl' in the user's home directory. Data is serialized using Data::Dumper.
Configuration is provided as a hash of hashes. No formal schema has been defined yet for CPAN Testers configuration and thus there is no validation by this module.
The top-level key global is reserved for data that will be used by multiple CPAN Testers modules. Only keys listed in the "Global Configuration Keys" section should be used in the global hash.
global
Module-specific configuration data should be stored under a top-level key corresponding to the module name. For example:
# global $metabase_profile = $config->{global}{profile}; # module-specific $config->{'CPAN::Testers::Client'}{send_duplicates} = 1;
The following key(s) are defined. No other keys should be added or expected.
Proposed new global keys should be sent to the maintainer(s) of this module and/or the CPAN Testers Discussion mailing list.
profile
A path to a filename containing a CPAN Testers 2.0 user profile; if not an absolute path, it should be treated as a path relative to the CPAN Testers configuration directory
$config = CPAN::Testers::Config->new( %data );
Creates and returns a new configuration object with optional starting data or dies.
$config = CPAN::Tester::Config->read; # ... modify $config ... $config->read; # reload
Returns a configuration object with data loaded from the configuration file or dies. May be called either as a class method or an object method.
$config->write;
Serializes a configuration object to the the configuration file or dies. Returns the object as a convenience on success.
$dir = CPAN::Testers::Config->config_dir;
Returns a path to the CPAN Testers configuration directory. See "ENVIRONMENT".
$file = CPAN::Testers::Config->config_file;
Returns a path to the CPAN Testesr configuration file. See "ENVIRONMENT".
Specifies an alternate directory to search for CPAN Testers configuration files instead of the default '.cpantesters' in the user's home directory.
Specifies an alternate file for configuration data instead of 'config.pl' in the default or alternate configuration directory.
David Golden <dagolden@cpan.org>
This software is Copyright (c) 2010 by David Golden.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
To install CPAN::Testers::Config, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CPAN::Testers::Config
CPAN shell
perl -MCPAN -e shell install CPAN::Testers::Config
For more information on module installation, please visit the detailed CPAN module installation guide.