| 1 | package Mail::BIMI::Base; | ||||||||||
| 2 | # ABSTRACT: Base class for Mail::BIMI subclasses | ||||||||||
| 3 | 30 | our $VERSION = '3.20260302'; # VERSION | |||||||||
| 4 | 30 | ▶ | use 5.20.0; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 30 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 30 | ▶ | use Mail::BIMI::Prelude; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 30 | has bimi_object => ( is => 'ro', isa => 'Mail::BIMI', required => 1, weak_ref => 1, | |||||||||
| 9 | documentation => 'Base Mail::BIMI object for this operation' ); | ||||||||||
| 10 | |||||||||||
| 11 | |||||||||||
| 12 | |||||||||||
| 13 | ▶ | sub record_object($self) { | |||||||||
|
Subroutine
record_object: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 14 | 6 | return $self->bimi_object->record; | |||||||||
| 15 | } | ||||||||||
| 16 | |||||||||||
| 17 | |||||||||||
| 18 | ▶ | sub authority_object($self) { | |||||||||
|
Subroutine
authority_object: called CC=2 SCAR=7.2
Pod
documented
| |||||||||||
| 19 | 2 | ▶ | return unless $self->record_object; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | 2 | return $self->record_object->authority; | |||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | |||||||||||
| 24 | ▶ | sub log_verbose($self,$text) { | |||||||||
|
Subroutine
log_verbose: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 25 | 231 | $self->bimi_object->log_verbose($text); | |||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | 30 | 1; | |||||||||
| 29 | |||||||||||
| 30 | __END__ | ||||||||||
| 31 | |||||||||||
| 32 | =pod | ||||||||||
| 33 | |||||||||||
| 34 | =encoding UTF-8 | ||||||||||
| 35 | |||||||||||
| 36 | =head1 NAME | ||||||||||
| 37 | |||||||||||
| 38 | Mail::BIMI::Base - Base class for Mail::BIMI subclasses | ||||||||||
| 39 | |||||||||||
| 40 | =head1 VERSION | ||||||||||
| 41 | |||||||||||
| 42 | version 3.20260302 | ||||||||||
| 43 | |||||||||||
| 44 | =head1 DESCRIPTION | ||||||||||
| 45 | |||||||||||
| 46 | Base BIMI class with common methods and attributes | ||||||||||
| 47 | |||||||||||
| 48 | =head1 ATTRIBUTES | ||||||||||
| 49 | |||||||||||
| 50 | These values are derived from lookups and verifications made based upon the input values, it is however possible to override these with other values should you wish to, for example, validate a record before it is published in DNS, or validate an Indicator which is only available locally | ||||||||||
| 51 | |||||||||||
| 52 | =head2 bimi_object | ||||||||||
| 53 | |||||||||||
| 54 | is=ro required | ||||||||||
| 55 | |||||||||||
| 56 | Base Mail::BIMI object for this operation | ||||||||||
| 57 | |||||||||||
| 58 | =head1 EXTENDS | ||||||||||
| 59 | |||||||||||
| 60 | =over 4 | ||||||||||
| 61 | |||||||||||
| 62 | =item * L<Moose::Object> | ||||||||||
| 63 | |||||||||||
| 64 | =back | ||||||||||
| 65 | |||||||||||
| 66 | =head1 METHODS | ||||||||||
| 67 | |||||||||||
| 68 | =head2 I<record_object()> | ||||||||||
| 69 | |||||||||||
| 70 | Return the current Mail::BIMI::Record object for this operation | ||||||||||
| 71 | |||||||||||
| 72 | =head2 I<authority_object()> | ||||||||||
| 73 | |||||||||||
| 74 | Return the current Mail::BIMI::Authority object for this operation | ||||||||||
| 75 | |||||||||||
| 76 | =head2 I<log_verbose()> | ||||||||||
| 77 | |||||||||||
| 78 | Output given text if in verbose mode. | ||||||||||
| 79 | |||||||||||
| 80 | =head1 REQUIRES | ||||||||||
| 81 | |||||||||||
| 82 | =over 4 | ||||||||||
| 83 | |||||||||||
| 84 | =item * L<Mail::BIMI::Prelude|Mail::BIMI::Prelude> | ||||||||||
| 85 | |||||||||||
| 86 | =item * L<Moose|Moose> | ||||||||||
| 87 | |||||||||||
| 88 | =back | ||||||||||
| 89 | |||||||||||
| 90 | =head1 AUTHOR | ||||||||||
| 91 | |||||||||||
| 92 | Marc Bradshaw <marc@marcbradshaw.net> | ||||||||||
| 93 | |||||||||||
| 94 | =head1 COPYRIGHT AND LICENSE | ||||||||||
| 95 | |||||||||||
| 96 | This software is copyright (c) 2020 by Marc Bradshaw. | ||||||||||
| 97 | |||||||||||
| 98 | This is free software; you can redistribute it and/or modify it under | ||||||||||
| 99 | the same terms as the Perl 5 programming language system itself. | ||||||||||
| 100 | |||||||||||
| 101 | =cut | ||||||||||