Jos Boumans > CPANPLUS-0.059_01 > CPANPLUS::Configure



Annotate this POD


New  30
Open  23
Stalled  10
View/Report Bugs
Source   Latest Release: CPANPLUS-0.9156




    $conf   = CPANPLUS::Configure->new( options => { ... } );

    $bool   = $conf->can_save;
    $bool   = $conf->save( $where );

    @opts   = $conf->options( $type );

    $make       = $conf->get_program('make');
    $verbose    = $conf->set_conf( verbose => 1 );


This module deals with all the configuration issues for CPANPLUS. Users can use objects created by this module to alter the behaviour of CPANPLUS.

Please refer to the CPANPLUS::Backend documentation on how to obtain a CPANPLUS::Configure object.


new( [options => HASHREF] )

This method returns a new object. Normal users will never need to invoke the new method, but instead retrieve the desired object via a method call on a CPANPLUS::Backend object.

can_save( [$config_location] )

Check if we can save the configuration to the specified file. If no file is provided, defaults to your personal config, or failing that, $INC{'CPANPLUS/'}.

Returns true if the file can be saved, false otherwise.

save( [$config_location] )

Saves the configuration to the location you provided. If no file is provided, defaults to your personal config, or failing that, $INC{'CPANPLUS/'}.

Returns true if the file was saved, false otherwise.


Return the CPANPLUS::Config object. For internal use only.

_load_args( [options => HASHREF] );

Called by new to do the actual altering of options.

Returns true on success, false on failure.

options( type => TYPE )

Returns a list of all valid config options given a specific type (like for example conf of program) or false if the type does not exist


Accessors that start with a _ are marked private -- regular users should never need to use these.

get_SOMETHING( ITEM, [ITEM, ITEM, ... ] );

The get_* style accessors merely retrieves one or more desired config options.

set_SOMETHING( ITEM => VAL, [ITEM => VAL, ITEM => VAL, ... ] );

The set_* style accessors set the current value for one or more config options and will return true upon success, false on failure.

add_SOMETHING( ITEM => VAL, [ITEM => VAL, ITEM => VAL, ... ] );

The add_* style accessor adds a new key to a config key.

Currently, the following accessors exist:


Simple configuration directives like verbosity and favourite shell.


Location of helper programs.


Locations of where to put what files for CPANPLUS.


Locations and names of source files locally.


Locations and names of source files remotely.


Mapping of distribution format names to modules.


Special settings pertaining to the fetching of files.


Settings for cpanpd, the CPANPLUS daemon.


This module by Jos Boumans <>.


The CPAN++ interface (of which this module is a part of) is copyright (c) 2001, 2002, 2003, 2004, Jos Boumans <>. All rights reserved.

This library is free software; you may redistribute and/or modify it under the same terms as Perl itself.


CPANPLUS::Backend, CPANPLUS::Configure::Setup

syntax highlighting: