CPANPL...nfigure(3pm)

πŸ“¦
version 0.9916 Β· 5 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

okay so bestie, you're about to read the CPANPLUS::Configure(3pm) page, and yes it lives in the User Contributed Perl Documentation corner of your manual, and yes it's giving extremely useful. pull up a chair 🫢

🌸 NAME 🌸

CPANPLUS::Configure β€” the configuration situation for CPANPLUS, periodt πŸ’…


✨ SYNOPSIS ✨

$conf   = CPANPLUS::Configure->new( );

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

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

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

πŸ’– DESCRIPTION πŸ’–

So this module is literally the one handling all the configuration issues for CPANPLUS. You can grab objects made by this module and use them to change how CPANPLUS behaves β€” like, you're the main character, and this is the settings panel πŸ‘‘

If you wanna know how to actually get yourself a CPANPLUS::Configure object, go peek at the CPANPLUS::Backend documentation. it's all in there, iykyk 🌈


πŸŽ€ METHODS πŸŽ€

🌟 $Configure = CPANPLUS::Configure->new( load_configs => BOOL )

This hands you back a brand new object, slay. But ngl, normal users will never need to call new themselves β€” instead you retrieve the object you want by calling a method on a CPANPLUS::Backend object. that's the vibe πŸ’«

load_configs

This one controls whether or not extra user configurations get loaded or not. Defaults to true. no cap ✨

🌟 $bool = $Configure->init( [rescan => BOOL])

This initializes the configure using other config files, not just the default 'CPANPLUS::Config'. fancy πŸ’…

It gets called from new() to load your user/system configurations.

If you pass in the rescan option, your disk gets examined again to see if there are any new config files that could be read. Defaults to false.

Returns true on success, false on failure. fr fr πŸ“

🌟 can_save( [$config_location] )

Checks whether we can save the configuration to the file you specified. If you don't hand it a file, it defaults to your personal config.

Returns true if the file can be saved, false otherwise. πŸ¦‹

🌟 $file = $conf->save( [$package_name] )

Saves the configuration to the package name you gave it. okay so here's the tea:

  • If that package is not CPANPLUS::Config::System, it gets saved in your .cpanplus directory.
  • Otherwise, it'll be attempted to be saved in the system wide directory. (On Debian systems, that system wide directory is /etc/perl.)

If you give it no argument at all, it defaults to your personal config.

Returns the full path to the file if the config was saved, false otherwise. πŸ‘‘

🌟 options( type => TYPE )

Returns a list of all the valid config options for a specific type (like for example conf or program) β€” or false if that type doesn't exist. simple as that bestie πŸ’œ


🧚 ACCESSORS 🧚

Any accessor that starts with a _ is marked private β€” regular users should never need to use these. like, don't touch, that's not for you πŸ™ˆ

For what items can be set and retrieved, go read the CPANPLUS::Config documentation. it's all spelled out there ✨

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

The get_* style accessors just retrieve one or more config options you want. that's it, that's the whole job 🌸

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

The set_* style accessors set the current value for one or more config options, and they return true on success, false on failure. πŸ’…

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

The add_* style accessor adds a new key to a config key. cute πŸŽ€

Currently, the following accessors exist:

  • set|get_conf β€” simple configuration directives like verbosity and your favourite shell. iconic πŸ’–
  • set|get_program β€” where your helper programs live. πŸ“
  • _set|_get_build β€” locations of where to put what files for CPANPLUS. πŸ”₯
  • _set|_get_source β€” locations and names of source files locally. 🏠
  • _set|_get_mirror β€” locations and names of source files remotely. 🌐
  • _set|_get_fetch β€” special settings pertaining to the fetching of files. πŸ“₯

πŸ’€ BUG REPORTS πŸ’€

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

yes that's literally how it's written in the original, i'm not touching it, i just work here 😭

πŸ‘‘ AUTHOR πŸ‘‘

This module by Jos Boumans <kane@cpan.org>. giving credit where credit is due 🫢


The CPAN++ interface (of which this module is a part of) is copyright (c) 2001 - 2007, Jos Boumans <kane@cpan.org>. All rights reserved.

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


πŸ¦‹ SEE ALSO πŸ¦‹

  • CPANPLUS::Backend
  • CPANPLUS::Configure::Setup
  • CPANPLUS::Config

and that's the whole page, bestie! this lil masterpiece comes to you from perl v5.40.1, dated 2025-03-01 πŸ’œ go forth and configure, you absolute icon πŸŽ€βœ¨

πŸ“¦ where this page comes from