NAME

Mail::AuthenticationResults::Token - Base class for modelling AuthenticationResults Header parts

VERSION

version 2.20261029

DESCRIPTION

Classes representing a tokenised Authentication Results Header, used in parsing

METHODS

new( $header, $args )

Return a new Token object parsed from the given $header string using $args

$args value depend on the subclass of Token used, 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

new_from_value( $value )

Create a new token from the given value

value()

Return the value of the current Token instance.

remainder()

Return the remainder of the header string after parsing the current token out.

Tokens created by Mail::AuthenticationResults::Parser do not retain the remainder once it has been consumed, and will return undef. Retaining a copy of the remaining header in every token uses memory quadratic in the number of tokens.

parse()

Run the parser on the current $header and set up value() and remainder().

is()

Return the type of token we are.

AUTHOR

Jemma Bradshaw <jemma@nothingbutstatic.dev>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Jemma 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.