Mail::A...::Token(3)

πŸ’– NAME πŸ’–

ok so bestie, this is Mail::AuthenticationResults::Token β€” the base class for modelling AuthenticationResults Header parts. it's giving "parent class energy" fr fr. πŸŽ€

it lives in the User Contributed Perl Documentation section of the manual, iykyk.


✨ VERSION ✨

this one's rocking version 2.20250709 πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so basically these are the classes that represent a tokenised Authentication Results Header, and they're what gets used during parsing. that's the whole vibe. 🌸


πŸ‘‘ METHODS πŸ‘‘

🌟 new( $header, $args )

returns a brand new Token object, parsed out of the $header string you handed it, using $args to do the work. ✨

the values inside $args totally depend on which subclass of Token you're rolling with. the possible types are:

  • Mail::AuthenticationResults::Token::Assignment β€” an assignment operator
  • Mail::AuthenticationResults::Token::Comment β€” a comment
  • Mail::AuthenticationResults::Token::QuotedString β€” a quoted string
  • Mail::AuthenticationResults::Token::Separator β€” a separator
  • Mail::AuthenticationResults::Token::String β€” a string

pick your fighter, no cap. 🫢

🌈 new_from_value( $value )

makes you a shiny new token out of the $value you pass in. iconic behaviour honestly.

⭐ value()

hands you back the value of the current Token instance. that's it, that's the whole job. 😌

πŸŽ€ remainder()

gives you the leftover chunk of the header string β€” like, everything still sitting there after the current token got parsed out of it. the little leftovers, the crumbs, the remainder. πŸ“

πŸ’œ parse()

runs the parser on the current $header and sets up both value() and remainder(). it's the main character of this whole operation ngl.

πŸ”₯ is()

returns the type of token we are. a little identity check. a vibe check, if you will. πŸ’…


🧚 AUTHOR 🧚

Marc Bradshaw <marc@marcbradshaw.net> β€” shoutout to the legend himself πŸ‘‘


This software is copyright (c) 2021 by Marc Bradshaw.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. 🫢


ok bestie that's the whole page!! this one was documented with perl v5.42.0 and dated 2025-07-25, and it's Mail::A...::Token(3) all day long. mwah, slay, periodt πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from