Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 13.59.227.41
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/2/task/2/root/usr/share/perl5/Mail/DMARC/Report/Aggregate/Record/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/2/task/2/root/usr/share/perl5/Mail/DMARC/Report/Aggregate/Record//Auth_Results.pm
package Mail::DMARC::Report::Aggregate::Record::Auth_Results;
our $VERSION = '1.20211209';
use strict;
use warnings;

use Carp;
require Mail::DMARC::Report::Aggregate::Record::Auth_Results::SPF;
require Mail::DMARC::Report::Aggregate::Record::Auth_Results::DKIM;

sub new {
    my ( $class, @args ) = @_;
    croak "invalid arguments" if @args % 2;

    my $self = bless { spf => [], dkim => [] }, $class;
    return $self if 0 == scalar @args;

    my %args = @args;
    foreach my $key ( keys %args ) {
        $self->$key( $args{$key} );
    }

    return $self;
}

sub spf {
    my ($self, @args) = @_;
    return $self->{spf} if 0 == scalar @args;

    # one shot
    if (1 == scalar @args && ref $args[0] eq 'ARRAY') {
        #warn "SPF one shot";
        my $iter = 0;
        foreach my $d ( @{ $args[0] }) {
            $self->{spf}->[$iter] = 
                Mail::DMARC::Report::Aggregate::Record::Auth_Results::SPF->new($d);
            $iter++;
        }
        return $self->{spf};
    }

    #warn "SPF iterative";
    push @{ $self->{spf} },
        Mail::DMARC::Report::Aggregate::Record::Auth_Results::SPF->new(@args);

    return $self->{spf};
}

sub dkim {
    my ($self, @args) = @_;
    return $self->{dkim} if 0 == scalar @args;

    if (1 == scalar @args && ref $args[0] eq 'ARRAY') {
        #warn "dkim one shot";
        my $iter = 0;
        foreach my $d ( @{ $args[0] }) {
            $self->{dkim}->[$iter] =
                Mail::DMARC::Report::Aggregate::Record::Auth_Results::DKIM->new($d);
            $iter++;
        }
        return $self->{dkim};
    }

    #warn "dkim iterative";
    push @{ $self->{dkim}},
        Mail::DMARC::Report::Aggregate::Record::Auth_Results::DKIM->new(@args);

    return $self->{dkim};
}

1;

__END__

=pod

=head1 NAME

Mail::DMARC::Report::Aggregate::Record::Auth_Results - auth_results section of a DMARC aggregate record

=head1 VERSION

version 1.20211209

=head1 AUTHORS

=over 4

=item *

Matt Simerson <msimerson@cpan.org>

=item *

Davide Migliavacca <shari@cpan.org>

=item *

Marc Bradshaw <marc@marcbradshaw.net>

=back

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2021 by Matt Simerson.

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

=cut


Anon7 - 2022
AnonSec Team