Scroll to navigation

CPAN::Mini::Inject::Config(3pm) User Contributed Perl Documentation CPAN::Mini::Inject::Config(3pm)


CPAN::Mini::Inject::Config - Config for CPAN::Mini::Inject


Version 0.35


"config_file( [FILE] )"


loadcfg accepts a CPAN::Mini::Inject config file or if not defined will search the following four places in order:

  • file pointed to by the environment variable MCPANI_CONFIG
  • $HOME/.mcpani/config
  • /usr/local/etc/mcpani
  • /etc/mcpani

loadcfg sets the instance variable cfgfile to the file found or undef if none is found.

 print "$mcpi->{cfgfile}\n"; # /etc/mcpani


parsecfg reads the config file stored in the instance variable cfgfile and creates a hash in config with each setting.

  $mcpi->{config}{remote} # CPAN sites to mirror from.

parsecfg expects the config file in the following format:

 local: /www/CPAN
 repository: /work/mymodules
 passive: yes
 dirmode: 0755

Description of options:

  • local

    location to store local CPAN::Mini mirror (*REQUIRED*)

  • remote

    CPAN site(s) to mirror from. Multiple sites can be listed space separated. (*REQUIRED*)

  • repository

    Location to store modules to add to the local CPAN::Mini mirror.

  • passive

    Enable passive FTP.

  • dirmode

    Set the permissions of created directories to the specified mode. The default value is based on umask if supported.

If either local or remote are not defined parsecfg croaks.

"get( DIRECTIVE )"

Return the value for the named configuration directive.


Sets the value for the named configuration directive.


Christian Walde "<>"


Please report any bugs or feature requests to "", or through the web interface at <>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

2022-08-08 perl v5.34.0