---
name: "App::Parcimonie"
section: "3pm"
platform: "linux"
package: "parcimonie"
version: "0.12.0-2"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/App::Parcimonie"
---

# App::Parcimonie(3pm)

tools for the parcimonie program

## NAME

App::Parcimonie - tools for the parcimonie program

## SYNOPSIS

See bin/parcimonie :)

## EXPORT

## SUBROUTINES

### pickRandomItems(N, @list)

Returns a list of N unique items picked at random from the input list.

### gpg\_is\_v21()

Detects the version of the gpg binary in the `$PATH`. Returns true iff. it is 2.1 or newer.

### gpgPublicKeys()

Returns the list of key fingerprints found in the public keyring.

Args:\
   \- `$gnupg_options:` reference to a hash passed to -\>hash\_init

### gpgRecvKeys( $keyids, $gnupg\_options )

Imports the keys with the given key IDs from a keyserver.

Args:\
   \- `$keyids:` reference to an array of key IDs\
   \- `$gnupg_options:` reference to a hash passed to -\>hash\_init

### checkGpgHasDefinedKeyserver

Throws an exception if no keyserver is defined in GnuPG configuration.

When using GnuPG 2.x, a keyserver can be defined either in dirmngr's configuration or in good old gpg.conf, so we check both.

### averageLapseTime

Argument: number of public keys in the keyring. Returns the desirable average lapse time (in seconds) between two key fetches.
