GnuPG::UserId(3pm)

πŸ’… GnuPG::UserId β€” GnuPG User ID Objects

So this is the GnuPG::UserId(3pm) page, bestie β€” part of the User Contributed Perl Documentation, and honestly? It's a little baddie. Let's get into it. πŸŽ€


✨ SYNOPSIS ✨

Okay so picture this: you've got a GnuPG::PublicKey object chilling in $publickey, and you wanna grab the first user ID off it as a plain string. Boom. Iconic.

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

That's it. That's the whole vibe check. πŸ¦‹


🌸 DESCRIPTION 🌸

So here's the tea: these GnuPG::UserId objects are generally not instantiated on their own. Like, they're not out here living their solo main character life. They show up as part of GnuPG::PublicKey or GnuPG::SecretKey objects instead β€” supporting cast, but make it essential. πŸ’–


πŸ‘‘ OBJECT METHODS πŸ‘‘

new( %initialization_args )

This method creates a new object. The arguments are optional, and what are they, exactly? They're initialization of data members. Lowkey self-explanatory but we said what we said. ✨

compare( $other, $deep )

Returns non-zero only when this User ID is identical to the other GnuPG::UserID. That's the whole rule, no exceptions, periodt.

Now, if $deep is present and non-zero, then the User ID's signatures and revocations get compared too β€” like a deep dive into the whole friend group instead of just the profile pic. 🫢


🌈 OBJECT DATA MEMBERS 🌈

  • as_string β€” A string of the user id. Literally just the user ID, as a string. Slay. πŸ’…
  • validity β€” A scalar holding the value GnuPG reports for the trust of authenticity (a.k.a.) validity of a key. For the deets, go check GnuPG's DETAILS file β€” iykyk. πŸ‘€
  • signatures β€” A list of GnuPG::Signature objects embodying the signatures on this user id. The whole entourage. πŸŽ€
  • revocations β€” A list of revocations associated with this User ID, stored as GnuPG::Signature objects. Why? Because revocations are a type of certification as well β€” so they get the same object treatment. No cap. πŸ’€

⭐ SEE ALSO ⭐

  • GnuPG::Signature,

Fr fr, that's the whole page. Nothing skipped, nothing hidden. You're welcome bestie. πŸ˜­πŸ’œ

And that's the wrap! 🧚 This absolute gem of a page came to you courtesy of perl v5.40.1, dated 2025-03-14 β€” go off, GnuPG::UserId(3pm), you ate. πŸ“πŸ”₯

πŸ“¦ where this page comes from