Mail::AuthenticationResults::Header::Base(3) User Contributed Perl Documentation Mail::AuthenticationResults::Header::Base(3)

Mail::AuthenticationResults::Header::Base - Base class for modelling parts of the Authentication Results Header

version 2.20230112

Set of classes representing the various parts and sub parts of Authentication Results Headers.

  • Mail::AuthenticationResults::Header represents a complete Authentication Results Header set
  • Mail::AuthenticationResults::Header::AuthServID represents the AuthServID part of the set
  • Mail::AuthenticationResults::Header::Comment represents a comment
  • Mail::AuthenticationResults::Header::Entry represents a main entry
  • Mail::AuthenticationResults::Header::Group represents a group of parts, typically as a search result
  • Mail::AuthenticationResults::Header::SubEntry represents a sub entry part
  • Mail::AuthenticationResults::Header::Version represents a version part
Header
    AuthServID
        Version
        Comment
        SubEntry
    Entry
        Comment
    Entry
        Comment
        SubEntry
            Comment
    Entry
        SubEntry
        SubEntry
Group
    Entry
        Comment
    SubEntry
        Comment
    Entry
        SubEntry

new()

Return a new instance of this class

Set the key for this instance.

Croaks if $key is invalid.

key()

Return the current key for this instance.

Croaks if this instance type can not have a key.

Set the value for this instance.

Munges the value to remove invalid characters before setting.

This method also removes some value characters when their inclusion would be likely to break simple parsers.

Set the value for this instance.

Croaks if the value contains invalid characters.

value()

Returns the current value for this instance.

Returns $value with stringify rules applied.

children()

Returns a listref of this instances children.

Croaks if this instance type can not have children.

orphan()

Removes the parent for this instance.

Croaks if this instance does not have a parent.

Copy (clone) all of the children from the given object into this object.

Sets the parent for this instance to the supplied object.

Croaks if the relationship between $parent and $self is not valid.

parent()

Returns the parent object for this instance.

Removes $child as a child of this instance.

Croaks if the relationship between $child and $self is not valid.

Adds $child as a child of this instance.

Croaks if the relationship between $child and $self is not valid.

ancestor()

Returns the top Header object and depth of this child

Add the prefix to as_string for this object when calledas a child of another objects as_string method call.

as_json()

Return this instance as a JSON serialised string

as_string()

Returns this instance as a string.

Build a string using the supplied Mail::AuthenticationResults::FoldableHeader object.

Apply search rules in $search to this instance and return a Mail::AuthenticationResults::Header::Group object containing the matches.

$search is a HASHREF with the following possible key/value pairs

Match if the instance key matches the supplied value (string or regex)
Match if the instance value matches the supplied value (string or regex)
Match is the instance class typs matches the supplied value. This is a lowercase version of the class type, (comment,entry,subentry,etc))
An arrayref of searches, match this class if the supplied search queries would return at least 1 result each

Marc Bradshaw <marc@marcbradshaw.net>

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.

2023-07-26 perl v5.38.0