1CPANPLUS::Configure(3)User Contributed Perl DocumentationCPANPLUS::Configure(3)
2
3
4
6 CPANPLUS::Configure
7
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
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
28 $Configure = CPANPLUS::Configure->new( load_configs => BOOL )
29
30 This method returns a new object. Normal users will never need to
31 invoke the "new" method, but instead retrieve the desired object via a
32 method call on a "CPANPLUS::Backend" object.
33
34 The "load_configs" parameter controls wether or not additional user
35 configurations are to be loaded or not. Defaults to "true".
36
37 $bool = $Configure->init( [rescan => BOOL])
38
39 Initialize the configure with other config files than just the default
40 'CPANPLUS::Config'.
41
42 Called from "new()" to load user/system configurations
43
44 If the "rescan" option is provided, your disk will be examined again to
45 see if there are new config files that could be read. Defaults to
46 "false".
47
48 Returns true on success, false on failure.
49
50 can_save( [$config_location] )
51
52 Check if we can save the configuration to the specified file. If no
53 file is provided, defaults to your personal config.
54
55 Returns true if the file can be saved, false otherwise.
56
57 $file = $conf->save( [$package_name] )
58
59 Saves the configuration to the package name you provided. If this
60 package is not "CPANPLUS::Config::System", it will be saved in your
61 ".cpanplus" directory, otherwise it will be attempted to be saved in
62 the system wide directory.
63
64 If no argument is provided, it will default to your personal config.
65
66 Returns the full path to the file if the config was saved, false other‐
67 wise.
68
69 options( type => TYPE )
70
71 Returns a list of all valid config options given a specific type (like
72 for example "conf" of "program") or false if the type does not exist
73
75 Accessors that start with a "_" are marked private -- regular users
76 should never need to use these.
77
78 get_SOMETHING( ITEM, [ITEM, ITEM, ... ] );
79
80 The "get_*" style accessors merely retrieves one or more desired config
81 options.
82
83 set_SOMETHING( ITEM => VAL, [ITEM => VAL, ITEM => VAL, ... ] );
84
85 The "set_*" style accessors set the current value for one or more con‐
86 fig options and will return true upon success, false on failure.
87
88 add_SOMETHING( ITEM => VAL, [ITEM => VAL, ITEM => VAL, ... ] );
89
90 The "add_*" style accessor adds a new key to a config key.
91
92 Currently, the following accessors exist:
93
94 set⎪get_conf
95 Simple configuration directives like verbosity and favourite shell.
96
97 set⎪get_program
98 Location of helper programs.
99
100 _set⎪_get_build
101 Locations of where to put what files for CPANPLUS.
102
103 _set⎪_get_source
104 Locations and names of source files locally.
105
106 _set⎪_get_mirror
107 Locations and names of source files remotely.
108
109 _set⎪_get_dist
110 Mapping of distribution format names to modules.
111
112 _set⎪_get_fetch
113 Special settings pertaining to the fetching of files.
114
115 _set⎪_get_daemon
116 Settings for "cpanpd", the CPANPLUS daemon.
117
119 Please report bugs or other issues to <bug-cpanplus@rt.cpan.org<gt>.
120
122 This module by Jos Boumans <kane@cpan.org>.
123
125 The CPAN++ interface (of which this module is a part of) is copyright
126 (c) 2001 - 2007, Jos Boumans <kane@cpan.org>. All rights reserved.
127
128 This library is free software; you may redistribute and/or modify it
129 under the same terms as Perl itself.
130
132 CPANPLUS::Backend, CPANPLUS::Configure::Setup
133
134
135
136perl v5.8.8 2007-03-31 CPANPLUS::Configure(3)