---
name: "GnuPG::UserId"
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::UserId"
---

# GnuPG::UserId(3pm)

GnuPG User ID Objects

## NAME

GnuPG::UserId - GnuPG User ID Objects

## SYNOPSIS

```
  # assumes a GnuPG::PublicKey object in $publickey
  my $user_id = $publickey->user_ids_ref->[0]->as_string;
```

## DESCRIPTION

GnuPG::UserId objects are generally not instantiated on their own, but rather as part of GnuPG::PublicKey or GnuPG::SecretKey objects.

## OBJECT METHODS

- new( *%initialization\_args* )

  This methods creates a new object.  The optional arguments are initialization of data members;

- compare( *$other*, *$deep* )

  Returns non-zero only when this User ID is identical to the other GnuPG::UserID.  If `$deep` is present and non-zero, the User ID's signatures and revocations will also be compared.

## OBJECT DATA MEMBERS

- as\_string

  A string of the user id.

- validity

  A scalar holding the value GnuPG reports for the trust of authenticity (a.k.a.) validity of a key. See GnuPG's DETAILS file for details.

- signatures

  A list of GnuPG::Signature objects embodying the signatures on this user id.

- revocations

  A list of revocations associated with this User ID, stored as GnuPG::Signature objects (since revocations are a type of certification as well).

## SEE ALSO

GnuPG::Signature,
