![]() |
![]()
| ![]() |
![]()
NAMECPAN::Testers::Common::Client::Config - basic configuration for CPAN Testers clients WARNING!!!C:T:C:C:Config is a *very* early module and a *highly* EXPERIMENTAL one for that matter. The API WILL CHANGE. We're still moving stuff around, so please only use it if you understand and accept the consequences. If you have any questions, please contact the author. SYNOPSISmy $config = CPAN::Testers::Common::Client::Config->new( prompt => \&IO::Prompt::Tiny::prompt, ); if ( -e $config->get_config_filename ) { $config->read or return; } else { print "CPAN Testers config file not found. Creating..."; $config->setup; } ## perform your test logging according to $config's data ## send the report! my $reporter = Test::Reporter->new( from => $config->email_from, transport => $config->transport_name, transport_args => $config->transport_args, ... ); METHODSnewInstantiates a new CPAN::Testers::Common::Client::Config object. It may receive the following (optional) parameters:
readReads and parses the existing CPAN Tester's configuration file (usually "$HOME/.cpanreporter/config.ini" into the main object. setupPrompts the user and sets up the CPAN Tester's configuration file (usually "$HOME/.cpanreporter/config.ini"). This method requires you to have set a proper "prompt" function when you instantiated the object. get_config_dir()The base directory in which your '"config.ini"' and other files reside. Defaults to the '.cpanreporter' directory under your home directory (if you're using Linux or OS X) or under the 'my documents' folder (if you're running Windows). get_config_filename()Returns the full path for the '"config.ini"' file. CONFIGURATION AND ENVIRONMENT
Other methos & accessorsThis class also provides some semi-public methods and accessors that most likely will move around even more than the others, but that are listed here for completeness sake. You should really not use nor rely on those:
|