Dpkg::Email::Address(3perl)

🌸 NAME 🌸

Bestie, meet Dpkg::Email::Address β€” the libdpkg-perl class that manages an email address πŸ’Œ (yes, the same kind of email address that shows up in deb822(5) data πŸ‘€).


✨ DESCRIPTION ✨

Okay so picture this: it hands you a whole class whose entire main-character job is managing an email address πŸŽ€ β€” specifically the kind that lives inside deb822(5) data. That's it, that's the vibe. Lowkey iconic πŸ’….


πŸ¦‹ FUNCTIONS πŸ¦‹

  • $regex = REGEX() β€” gimme the regex, and it returns the regex that's used to parse and validate an email address πŸ”. Ngl, it matches two parts: the name and the email. Periodt.

πŸ’– METHODS πŸ’–

  • $addr = Dpkg::Email::Address->new($string) β€” creates a shiny new object that can hold an email address ✨. New object, who dis 🫢.
  • $name = $addr->name([$name]) β€” gets the email address name, and if you pass $name it also sets it πŸ’«. Returns the current name, or the new one if you just set it.
  • $email = $addr->email([$email]) β€” same energy, but for the email part of the email address πŸ“§. Gets it, optionally sets it with $email, and returns the current or new email.
  • $bool = $addr->parse($string) β€” parses $string straight into the current object, replacing whatever address was already sitting there πŸ”„. Heads up though: it will die on parse errors πŸ’€ β€” dramatic, but fair.
  • $string = $addr->as_string() β€” returns the email address all formatted up as a string πŸŽ€. Glow-up complete.
  • $hashref = $addr->as_struct() β€” returns the email address as a hashref with name and email keys πŸ—‚οΈ. Struct-pilled.

🌈 CHANGES 🌈

⭐ Version 0.xx

Bestie, real talk: this is a private module πŸ™ˆ. That's the whole changelog, no cap.


πŸ’œ that's the whole page, bestie πŸ’œ β€” brought to you by libdpkg-perl, version 1.23.11-dirty, dated 2026-09-09. Slay, go parse some emails πŸ’Œβœ¨πŸ‘‘

πŸ“¦ where this page comes from