---
name: "GnuPG::PrimaryKey"
section: "3pm"
platform: "linux"
package: "perl-gnupg-interface"
version: "1.07-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/GnuPG::PrimaryKey"
---

# GnuPG::PrimaryKey(3pm)

GnuPG Primary Key Objects

## NAME

GnuPG::PrimaryKey - GnuPG Primary Key Objects

## SYNOPSIS

```
  # assumes a GnuPG::Interface object in $gnupg
  my @keys = $gnupg->get_public_keys( 'ftobin' );
  # or
  my @keys = $gnupg->get_secret_keys( 'ftobin' );
  # now GnuPG::PrimaryKey objects are in @keys
```

## DESCRIPTION

GnuPG::PrimaryKey objects are generally instantiated as GnuPG::PublicKey or GnuPG::SecretKey objects through various methods of GnuPG::Interface. They embody various aspects of a GnuPG primary key.

This package inherits data members and object methods from GnuPG::Key, which is not described here, but rather in GnuPG::Key.

## OBJECT DATA MEMBERS

- user\_ids

  A list of GnuPG::UserId objects associated with this key.

- user\_attributes

  A list of GnuPG::UserAttribute objects associated with this key.

- subkeys

  A list of GnuPG::SubKey objects associated with this key.

- local\_id

  WARNING: DO NOT USE.  This used to mean GnuPG's local id for the key, but modern versions of GnuPG do not produce it.  Expect this to be the empty string or undef.

- owner\_trust

  The scalar value GnuPG reports as the ownertrust for this key. See GnuPG's DETAILS file for details.

## SEE ALSO

GnuPG::Key, GnuPG::UserId, GnuPG::SubKey,
