Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages
CPAN::Testers::Common::Client::Config(3) User Contributed Perl Documentation CPAN::Testers::Common::Client::Config(3)

CPAN::Testers::Common::Client::Config - basic configuration for CPAN Testers clients

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.

    my $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...";

    ## 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,

Instantiates a new CPAN::Testers::Common::Client::Config object. It may receive the following (optional) parameters:
  • warn => \&my_warn_function

    Inject your own warning function. Defaults to CORE::warn.

  • print => \&my_print_function

    Inject your own printing function. Defaults to "sub { print @_ }".

  • prompt => \&my_prompt_function

    Inject your own prompt function. Does not have a default. The function is expected to receive two values: "( $question, $default_value )", and return a scalar containing the answer. Take a look at IO::Prompt::Tiny and ExtUtils::MakeMaker's "prompt()" functions for suitable candidates.

    If you plan on calling "setup", make sure you pass the 'prompt' argument to "new()".

Reads and parses the existing CPAN Tester's configuration file (usually "$HOME/.cpanreporter/config.ini" into the main object.

Prompts 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.

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).

Returns the full path for the '"config.ini"' file.


    Overrides the value for "get_config_dir()".


    Overrides the value for "get_config_filename()".

This 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:
  • edit_report - accessor for the 'edit_report' setting.
  • email_from - accessor for the 'email_from' setting.
  • myprint - accessor for the print function.
  • myprompt - accessor for the prompt function.
  • mywarn - accessor for the warn function.
  • send_duplicates - accessor for the 'send_duplicates' setting.
  • send_report - accessor for the 'send_report' setting.
  • transport - accessor for the 'transport' setting.
  • transport_name - returns the transport name.
  • transport_args - returns the transport arguments.
2018-04-22 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.