---
name: "mcpani"
section: "1p"
platform: "linux"
package: "libcpan-mini-inject-perl"
version: "1.012-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mcpani"
---

# mcpani(1p)

## NAME

mcpani -- A command line tool to manage a CPAN Mini Mirror.

## SYNOPSIS

mcpani \[options\] \< --add \| --update \| --mirror \| --inject \>

Commands:

```
    --add               Add a new package to the repository
          --module      Name of the module to add
          --authorid    Author ID of the module
          --modversion  Version number of the module
          --file        distribution module
    --update            Update local CPAN mirror and inject modules
    --mirror            Update local CPAN mirror from remote
    --inject            Add modules from repository to CPAN mirror
```

Options:

```
    -h, --help          This synopsis
    -H, --man           Detailed description
    -l, --local         local location for CPAN::Mini Mirror
    -r, --remote        CPAN mirror to mirror from
    -p, --passive       Enable passive ftp for mirroring.
    -v, --verbose       verbose output
    -V, --version       Version information.
        --signing-key   See CPAN::Checksums $SIGNING_KEY
```

## DESCRIPTION

**mcpani** uses CPAN::Mini to build or update a local CPAN mirror from a remote one, while also adding private or third-party distributions.

### Configuration file

**mcpani** 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

By default, **mcpani** uses a simple configuration file in the following format:

```
 local: /www/CPAN
 remote: ftp://ftp.cpan.org/pub/CPAN ftp://ftp.kernel.org/pub/CPAN
 repository: /work/mymodules
 passive: yes
 dirmode: 0755
```

### Configuration options

- "dirmode"

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

- "force"

  Update modules even if the module list is out of data. This is from CPAN::Mini.

- "local" (required)

  Location to store local CPAN::Mini mirror

- "log\_level"

  The logging level for CPAN::Mini.

- "passive"

  Enable passive FTP.

- "remote" (required)

  CPAN site(s) to mirror from. Multiple sites can be listed, with spaces between them.

- "repository"

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

- "skip\_cleanup"

  Do not remove old files in the local directory. this is from CPAN::Mini.

- "skip\_perl"

  Do not mirror **perl** distributions. This is from CPAN::Mini.

- "trace"

  Enable trace logging. This is from CPAN::Mini

### Command-line options

- "--add"

  - "--authorid" the CPAN ID

    - "--file" the distribution file

    - "--module" the package name of the main module

    - "-v", "--verbose"

    - "--version" the version of the distribution

    - "-h", "-H", "--help", "--man", "-?"

  Output a help message and exit.

- "--inject"

  Inject the local distributions into the local repository.

  - "-v", "--verbose"

    - "--mirror"

  Update the local MiniCPAN by downloading the latest modules from the public CPAN (or the CPAN-like repo specified in the `"remote"` config. `"--mirror"` uses

  - "-l", "--local"

    - "-r", "--remote"

    - "-v", "--verbose"

    - "--update"

  This runs `"--mirror"` then `"--inject"`.

- "-V", "--version"

  Output the version of **mcpani** and exit.

## AUTHOR

Shawn Sorichetti `"<ssoriche@coloredblocks.net>"`

## SOURCE AVAILABILITY

The main repository is on GitHub:

```
        https://github.com/briandfoy/cpan-mini-inject
```

There are also backup repositories on several other services:

```
        https://bitbucket.org/briandfoy/cpan-mini-inject
        https://codeberg.org/briandfoy/cpan-mini-inject
        https://gitlab.com/briandfoy/cpan-mini-inject
```

## COPYRIGHT & LICENSE

Copyright 2004 Shawn Sorichetti, All Rights Reserved.

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