1CPANPLUS::Configure(3)User Contributed Perl DocumentationCPANPLUS::Configure(3)
2
3
4

NAME

6       CPANPLUS::Configure - configuration for CPANPLUS
7

SYNOPSIS

9           $conf   = CPANPLUS::Configure->new( );
10
11           $bool   = $conf->can_save;
12           $bool   = $conf->save( $where );
13
14           @opts   = $conf->options( $type );
15
16           $make       = $conf->get_program('make');
17           $verbose    = $conf->set_conf( verbose => 1 );
18

DESCRIPTION

20       This module deals with all the configuration issues for CPANPLUS.
21       Users can use objects created by this module to alter the behaviour of
22       CPANPLUS.
23
24       Please refer to the "CPANPLUS::Backend" documentation on how to obtain
25       a "CPANPLUS::Configure" object.
26

METHODS

28   $Configure = CPANPLUS::Configure->new( load_configs => BOOL )
29       This method returns a new object. Normal users will never need to
30       invoke the "new" method, but instead retrieve the desired object via a
31       method call on a "CPANPLUS::Backend" object.
32
33       load_configs
34           Controls whether or not additional user configurations are to be
35           loaded or not. Defaults to "true".
36
37   $bool = $Configure->init( [rescan => BOOL])
38       Initialize the configure with other config files than just the default
39       'CPANPLUS::Config'.
40
41       Called from "new()" to load user/system configurations
42
43       If the "rescan" option is provided, your disk will be examined again to
44       see if there are new config files that could be read. Defaults to
45       "false".
46
47       Returns true on success, false on failure.
48
49   can_save( [$config_location] )
50       Check if we can save the configuration to the specified file.  If no
51       file is provided, defaults to your personal config.
52
53       Returns true if the file can be saved, false otherwise.
54
55   $file = $conf->save( [$package_name] )
56       Saves the configuration to the package name you provided.  If this
57       package is not "CPANPLUS::Config::System", it will be saved in your
58       ".cpanplus" directory, otherwise it will be attempted to be saved in
59       the system wide directory.
60
61       If no argument is provided, it will default to your personal config.
62
63       Returns the full path to the file if the config was saved, false
64       otherwise.
65
66   options( type => TYPE )
67       Returns a list of all valid config options given a specific type (like
68       for example "conf" of "program") or false if the type does not exist
69

ACCESSORS

71       Accessors that start with a "_" are marked private -- regular users
72       should never need to use these.
73
74       See the "CPANPLUS::Config" documentation for what items can be set and
75       retrieved.
76
77   get_SOMETHING( ITEM, [ITEM, ITEM, ... ] );
78       The "get_*" style accessors merely retrieves one or more desired config
79       options.
80
81   set_SOMETHING( ITEM => VAL, [ITEM => VAL, ITEM => VAL, ... ] );
82       The "set_*" style accessors set the current value for one or more
83       config options and will return true upon success, false on failure.
84
85   add_SOMETHING( ITEM => VAL, [ITEM => VAL, ITEM => VAL, ... ] );
86       The "add_*" style accessor adds a new key to a config key.
87
88       Currently, the following accessors exist:
89
90       set|get_conf
91           Simple configuration directives like verbosity and favourite shell.
92
93       set|get_program
94           Location of helper programs.
95
96       _set|_get_build
97           Locations of where to put what files for CPANPLUS.
98
99       _set|_get_source
100           Locations and names of source files locally.
101
102       _set|_get_mirror
103           Locations and names of source files remotely.
104
105       _set|_get_fetch
106           Special settings pertaining to the fetching of files.
107

BUG REPORTS

109       Please report bugs or other issues to <bug-cpanplus@rt.cpan.org<gt>.
110

AUTHOR

112       This module by Jos Boumans <kane@cpan.org>.
113
115       The CPAN++ interface (of which this module is a part of) is copyright
116       (c) 2001 - 2007, Jos Boumans <kane@cpan.org>. All rights reserved.
117
118       This library is free software; you may redistribute and/or modify it
119       under the same terms as Perl itself.
120

SEE ALSO

122       CPANPLUS::Backend, CPANPLUS::Configure::Setup, CPANPLUS::Config
123
124
125
126perl v5.32.0                      2020-12-21            CPANPLUS::Configure(3)
Impressum