Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package perl-Mail-AuthenticationResults for openSUSE:Factory checked in at 2021-09-30 23:43:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Mail-AuthenticationResults (Old) and /work/SRC/openSUSE:Factory/.perl-Mail-AuthenticationResults.new.2443 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Mail-AuthenticationResults" Thu Sep 30 23:43:06 2021 rev:3 rq:921837 version:2.20210915 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Mail-AuthenticationResults/perl-Mail-AuthenticationResults.changes 2021-01-18 11:30:48.768540378 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Mail-AuthenticationResults.new.2443/perl-Mail-AuthenticationResults.changes 2021-09-30 23:43:41.716489982 +0200 @@ -1,0 +2,12 @@ +Thu Sep 16 03:06:18 UTC 2021 - Tina M??ller <timueller+p...@suse.de> + +- updated to 2.20210915 + see /usr/share/doc/packages/perl-Mail-AuthenticationResults/Changes + + 2.20210915 2021-09-15 11:10:20+00:00 UTC + - Fix for older versions of Perl + + 2.20210914 2021-09-14 05:17:31+00:00 UTC + - New method to copy children from 1 object to another + +------------------------------------------------------------------- Old: ---- Mail-AuthenticationResults-2.20210112.tar.gz New: ---- Mail-AuthenticationResults-2.20210915.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Mail-AuthenticationResults.spec ++++++ --- /var/tmp/diff_new_pack.z60nUj/_old 2021-09-30 23:43:42.436490807 +0200 +++ /var/tmp/diff_new_pack.z60nUj/_new 2021-09-30 23:43:42.440490811 +0200 @@ -18,7 +18,7 @@ %define cpan_name Mail-AuthenticationResults Name: perl-Mail-AuthenticationResults -Version: 2.20210112 +Version: 2.20210915 Release: 0 Summary: Object Oriented Authentication-Results Headers License: Artistic-1.0 OR GPL-1.0-or-later @@ -28,8 +28,10 @@ BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros +BuildRequires: perl(Clone) BuildRequires: perl(JSON) BuildRequires: perl(Test::Exception) +Requires: perl(Clone) Requires: perl(JSON) %{perl_requires} @@ -47,8 +49,6 @@ Comments added between key/value pairs will be added after them in the data structures and when stringified. -It is a work in progress.. - %prep %autosetup -n %{cpan_name}-%{version} ++++++ Mail-AuthenticationResults-2.20210112.tar.gz -> Mail-AuthenticationResults-2.20210915.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/Changes new/Mail-AuthenticationResults-2.20210915/Changes --- old/Mail-AuthenticationResults-2.20210112/Changes 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/Changes 2021-09-15 13:10:25.000000000 +0200 @@ -1,5 +1,11 @@ Change log for Mail::AuthenticationResults +2.20210915 2021-09-15 11:10:20+00:00 UTC + - Fix for older versions of Perl + +2.20210914 2021-09-14 05:17:31+00:00 UTC + - New method to copy children from 1 object to another + 2.20210112 2021-01-12 22:10:28+00:00 UTC - Switch to a purely numeric version string diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/LICENSE new/Mail-AuthenticationResults-2.20210915/LICENSE --- old/Mail-AuthenticationResults-2.20210112/LICENSE 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/LICENSE 2021-09-15 13:10:25.000000000 +0200 @@ -1,4 +1,4 @@ -This software is copyright (c) 2020 by Marc Bradshaw. +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. @@ -12,7 +12,7 @@ --- The GNU General Public License, Version 1, February 1989 --- -This software is Copyright (c) 2020 by Marc Bradshaw. +This software is Copyright (c) 2021 by Marc Bradshaw. This is free software, licensed under: @@ -272,7 +272,7 @@ --- The Artistic License 1.0 --- -This software is Copyright (c) 2020 by Marc Bradshaw. +This software is Copyright (c) 2021 by Marc Bradshaw. This is free software, licensed under: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/MANIFEST new/Mail-AuthenticationResults-2.20210915/MANIFEST --- old/Mail-AuthenticationResults-2.20210112/MANIFEST 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/MANIFEST 2021-09-15 13:10:25.000000000 +0200 @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.014. +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.017. Changes LICENSE MANIFEST @@ -35,6 +35,7 @@ t/02-safe_set.t t/02-set.t t/02-tokens.t +t/03-add-children-from.t t/03-parser-bogus.t t/03-parser.t t/03-search-authserv-id.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/META.yml new/Mail-AuthenticationResults-2.20210915/META.yml --- old/Mail-AuthenticationResults-2.20210112/META.yml 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/META.yml 2021-09-15 13:10:25.000000000 +0200 @@ -9,7 +9,7 @@ configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 -generated_by: 'Dist::Zilla version 6.014, CPAN::Meta::Converter version 2.150010' +generated_by: 'Dist::Zilla version 6.017, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -17,15 +17,16 @@ name: Mail-AuthenticationResults requires: Carp: '0' + Clone: '0' JSON: '0' Scalar::Util: '0' base: '0' perl: '5.008' strict: '0' warnings: '0' -version: '2.20210112' +version: '2.20210915' x_contributors: - 'Ricardo Signes <r...@users.noreply.github.com>' -x_generated_by_perl: v5.30.1 +x_generated_by_perl: v5.34.0 x_serialization_backend: 'YAML::Tiny version 1.73' x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/Makefile.PL new/Mail-AuthenticationResults-2.20210915/Makefile.PL --- old/Mail-AuthenticationResults-2.20210112/Makefile.PL 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/Makefile.PL 2021-09-15 13:10:25.000000000 +0200 @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.014. +# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.017. use strict; use warnings; @@ -18,6 +18,7 @@ "NAME" => "Mail::AuthenticationResults", "PREREQ_PM" => { "Carp" => 0, + "Clone" => 0, "JSON" => 0, "Scalar::Util" => 0, "base" => 0, @@ -29,7 +30,7 @@ "Test::More" => 0, "lib" => 0 }, - "VERSION" => "2.20210112", + "VERSION" => "2.20210915", "test" => { "TESTS" => "t/*.t" } @@ -38,6 +39,7 @@ my %FallbackPrereqs = ( "Carp" => 0, + "Clone" => 0, "JSON" => 0, "Scalar::Util" => 0, "Test::Exception" => 0, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/README new/Mail-AuthenticationResults-2.20210915/README --- old/Mail-AuthenticationResults-2.20210112/README 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/README 2021-09-15 13:10:25.000000000 +0200 @@ -5,7 +5,7 @@ VERSION - version 2.20210112 + version 2.20210915 DESCRIPTION @@ -22,8 +22,6 @@ Comments added between key/value pairs will be added after them in the data structures and when stringified. - It is a work in progress.. - METHODS new() @@ -47,7 +45,7 @@ COPYRIGHT AND LICENSE - This software is copyright (c) 2020 by Marc Bradshaw. + 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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/README.md new/Mail-AuthenticationResults-2.20210915/README.md --- old/Mail-AuthenticationResults-2.20210112/README.md 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/README.md 2021-09-15 13:10:25.000000000 +0200 @@ -18,7 +18,7 @@ # COPYRIGHT AND LICENSE -This software is copyright (c) 2018 by Marc Bradshaw. +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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/dist.ini new/Mail-AuthenticationResults-2.20210915/dist.ini --- old/Mail-AuthenticationResults-2.20210112/dist.ini 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/dist.ini 2021-09-15 13:10:25.000000000 +0200 @@ -2,7 +2,7 @@ author = Marc Bradshaw <m...@marcbradshaw.net> license = Perl_5 copyright_holder = Marc Bradshaw -copyright_year = 2020 +copyright_year = 2021 [@Basic] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/FoldableHeader.pm new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/FoldableHeader.pm --- old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/FoldableHeader.pm 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/FoldableHeader.pm 2021-09-15 13:10:25.000000000 +0200 @@ -4,7 +4,7 @@ require 5.008; use strict; use warnings; -our $VERSION = '2.20210112'; # VERSION +our $VERSION = '2.20210915'; # VERSION use Carp; use Mail::AuthenticationResults::Token::String; @@ -248,7 +248,7 @@ =head1 VERSION -version 2.20210112 +version 2.20210915 =head1 DESCRIPTION @@ -351,7 +351,7 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2020 by Marc Bradshaw. +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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Header/AuthServID.pm new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Header/AuthServID.pm --- old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Header/AuthServID.pm 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Header/AuthServID.pm 2021-09-15 13:10:25.000000000 +0200 @@ -4,7 +4,7 @@ require 5.008; use strict; use warnings; -our $VERSION = '2.20210112'; # VERSION +our $VERSION = '2.20210915'; # VERSION use Carp; use base 'Mail::AuthenticationResults::Header::Base'; @@ -49,7 +49,7 @@ =head1 VERSION -version 2.20210112 +version 2.20210915 =head1 DESCRIPTION @@ -70,7 +70,7 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2020 by Marc Bradshaw. +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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Header/Base.pm new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Header/Base.pm --- old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Header/Base.pm 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Header/Base.pm 2021-09-15 13:10:25.000000000 +0200 @@ -4,10 +4,11 @@ require 5.008; use strict; use warnings; -our $VERSION = '2.20210112'; # VERSION +our $VERSION = '2.20210915'; # VERSION use Scalar::Util qw{ weaken refaddr }; use JSON; use Carp; +use Clone qw{ clone }; use Mail::AuthenticationResults::Header::Group; use Mail::AuthenticationResults::FoldableHeader; @@ -124,6 +125,16 @@ } +sub copy_children_from { + my ( $self, $object ) = @_; + for my $original_entry (@{$object->children()}) { + my $entry = clone $original_entry; + $entry->orphan if exists $entry->{ 'parent' };; + $self->add_child( $entry ); + } +} + + sub add_parent { my ( $self, $parent ) = @_; return if ( ref $parent eq 'Mail::AuthenticationResults::Header::Group' ); @@ -415,7 +426,7 @@ =head1 VERSION -version 2.20210112 +version 2.20210915 =head1 DESCRIPTION @@ -529,6 +540,11 @@ Croaks if this instance does not have a parent. +=head2 copy_children_from( $object ) + +Copy (clone) all of the children from the given object +into this object. + =head2 add_parent( $parent ) Sets the parent for this instance to the supplied object. @@ -607,7 +623,7 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2020 by Marc Bradshaw. +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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Header/Comment.pm new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Header/Comment.pm --- old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Header/Comment.pm 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Header/Comment.pm 2021-09-15 13:10:25.000000000 +0200 @@ -4,7 +4,7 @@ require 5.008; use strict; use warnings; -our $VERSION = '2.20210112'; # VERSION +our $VERSION = '2.20210915'; # VERSION use Scalar::Util qw{ weaken }; use Carp; @@ -88,7 +88,7 @@ =head1 VERSION -version 2.20210112 +version 2.20210915 =head1 DESCRIPTION @@ -103,7 +103,7 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2020 by Marc Bradshaw. +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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Header/Entry.pm new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Header/Entry.pm --- old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Header/Entry.pm 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Header/Entry.pm 2021-09-15 13:10:25.000000000 +0200 @@ -4,7 +4,7 @@ require 5.008; use strict; use warnings; -our $VERSION = '2.20210112'; # VERSION +our $VERSION = '2.20210915'; # VERSION use Scalar::Util qw{ refaddr }; use Carp; @@ -37,7 +37,7 @@ =head1 VERSION -version 2.20210112 +version 2.20210915 =head1 DESCRIPTION @@ -53,7 +53,7 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2020 by Marc Bradshaw. +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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Header/Group.pm new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Header/Group.pm --- old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Header/Group.pm 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Header/Group.pm 2021-09-15 13:10:25.000000000 +0200 @@ -4,7 +4,7 @@ require 5.008; use strict; use warnings; -our $VERSION = '2.20210112'; # VERSION +our $VERSION = '2.20210915'; # VERSION use Scalar::Util qw{ refaddr }; use Carp; @@ -76,7 +76,7 @@ =head1 VERSION -version 2.20210112 +version 2.20210915 =head1 DESCRIPTION @@ -91,7 +91,7 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2020 by Marc Bradshaw. +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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Header/SubEntry.pm new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Header/SubEntry.pm --- old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Header/SubEntry.pm 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Header/SubEntry.pm 2021-09-15 13:10:25.000000000 +0200 @@ -4,7 +4,7 @@ require 5.008; use strict; use warnings; -our $VERSION = '2.20210112'; # VERSION +our $VERSION = '2.20210915'; # VERSION use Carp; use base 'Mail::AuthenticationResults::Header::Base'; @@ -35,7 +35,7 @@ =head1 VERSION -version 2.20210112 +version 2.20210915 =head1 DESCRIPTION @@ -52,7 +52,7 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2020 by Marc Bradshaw. +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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Header/Version.pm new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Header/Version.pm --- old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Header/Version.pm 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Header/Version.pm 2021-09-15 13:10:25.000000000 +0200 @@ -4,7 +4,7 @@ require 5.008; use strict; use warnings; -our $VERSION = '2.20210112'; # VERSION +our $VERSION = '2.20210915'; # VERSION use Scalar::Util qw{ weaken }; use Carp; @@ -67,7 +67,7 @@ =head1 VERSION -version 2.20210112 +version 2.20210915 =head1 DESCRIPTION @@ -81,7 +81,7 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2020 by Marc Bradshaw. +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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Header.pm new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Header.pm --- old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Header.pm 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Header.pm 2021-09-15 13:10:25.000000000 +0200 @@ -4,7 +4,7 @@ require 5.008; use strict; use warnings; -our $VERSION = '2.20210112'; # VERSION +our $VERSION = '2.20210915'; # VERSION use Carp; use Mail::AuthenticationResults::Header::AuthServID; @@ -246,7 +246,7 @@ =head1 VERSION -version 2.20210112 +version 2.20210915 =head1 DESCRIPTION @@ -320,7 +320,7 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2020 by Marc Bradshaw. +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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Parser.pm new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Parser.pm --- old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Parser.pm 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Parser.pm 2021-09-15 13:10:25.000000000 +0200 @@ -4,7 +4,7 @@ require 5.008; use strict; use warnings; -our $VERSION = '2.20210112'; # VERSION +our $VERSION = '2.20210915'; # VERSION use Carp; use Mail::AuthenticationResults::Header; @@ -325,7 +325,7 @@ =head1 VERSION -version 2.20210112 +version 2.20210915 =head1 DESCRIPTION @@ -359,7 +359,7 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2020 by Marc Bradshaw. +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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Token/Assignment.pm new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Token/Assignment.pm --- old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Token/Assignment.pm 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Token/Assignment.pm 2021-09-15 13:10:25.000000000 +0200 @@ -4,7 +4,7 @@ require 5.008; use strict; use warnings; -our $VERSION = '2.20210112'; # VERSION +our $VERSION = '2.20210915'; # VERSION use Carp; use base 'Mail::AuthenticationResults::Token'; @@ -48,7 +48,7 @@ =head1 VERSION -version 2.20210112 +version 2.20210915 =head1 DESCRIPTION @@ -60,7 +60,7 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2020 by Marc Bradshaw. +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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Token/Comment.pm new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Token/Comment.pm --- old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Token/Comment.pm 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Token/Comment.pm 2021-09-15 13:10:25.000000000 +0200 @@ -4,7 +4,7 @@ require 5.008; use strict; use warnings; -our $VERSION = '2.20210112'; # VERSION +our $VERSION = '2.20210915'; # VERSION use Carp; use base 'Mail::AuthenticationResults::Token'; @@ -67,7 +67,7 @@ =head1 VERSION -version 2.20210112 +version 2.20210915 =head1 DESCRIPTION @@ -79,7 +79,7 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2020 by Marc Bradshaw. +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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Token/QuotedString.pm new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Token/QuotedString.pm --- old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Token/QuotedString.pm 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Token/QuotedString.pm 2021-09-15 13:10:25.000000000 +0200 @@ -4,7 +4,7 @@ require 5.008; use strict; use warnings; -our $VERSION = '2.20210112'; # VERSION +our $VERSION = '2.20210915'; # VERSION use Carp; use base 'Mail::AuthenticationResults::Token'; @@ -58,7 +58,7 @@ =head1 VERSION -version 2.20210112 +version 2.20210915 =head1 DESCRIPTION @@ -70,7 +70,7 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2020 by Marc Bradshaw. +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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Token/Separator.pm new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Token/Separator.pm --- old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Token/Separator.pm 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Token/Separator.pm 2021-09-15 13:10:25.000000000 +0200 @@ -4,7 +4,7 @@ require 5.008; use strict; use warnings; -our $VERSION = '2.20210112'; # VERSION +our $VERSION = '2.20210915'; # VERSION use Carp; use base 'Mail::AuthenticationResults::Token'; @@ -46,7 +46,7 @@ =head1 VERSION -version 2.20210112 +version 2.20210915 =head1 DESCRIPTION @@ -58,7 +58,7 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2020 by Marc Bradshaw. +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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Token/Space.pm new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Token/Space.pm --- old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Token/Space.pm 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Token/Space.pm 2021-09-15 13:10:25.000000000 +0200 @@ -4,7 +4,7 @@ require 5.008; use strict; use warnings; -our $VERSION = '2.20210112'; # VERSION +our $VERSION = '2.20210915'; # VERSION use Carp; use base 'Mail::AuthenticationResults::Token'; @@ -45,7 +45,7 @@ =head1 VERSION -version 2.20210112 +version 2.20210915 =head1 DESCRIPTION @@ -57,7 +57,7 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2020 by Marc Bradshaw. +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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Token/String.pm new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Token/String.pm --- old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Token/String.pm 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Token/String.pm 2021-09-15 13:10:25.000000000 +0200 @@ -4,7 +4,7 @@ require 5.008; use strict; use warnings; -our $VERSION = '2.20210112'; # VERSION +our $VERSION = '2.20210915'; # VERSION use Carp; use base 'Mail::AuthenticationResults::Token'; @@ -74,7 +74,7 @@ =head1 VERSION -version 2.20210112 +version 2.20210915 =head1 DESCRIPTION @@ -86,7 +86,7 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2020 by Marc Bradshaw. +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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Token.pm new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Token.pm --- old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults/Token.pm 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults/Token.pm 2021-09-15 13:10:25.000000000 +0200 @@ -4,7 +4,7 @@ require 5.008; use strict; use warnings; -our $VERSION = '2.20210112'; # VERSION +our $VERSION = '2.20210915'; # VERSION use Carp; @@ -69,7 +69,7 @@ =head1 VERSION -version 2.20210112 +version 2.20210915 =head1 DESCRIPTION @@ -115,7 +115,7 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2020 by Marc Bradshaw. +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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults.pm new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults.pm --- old/Mail-AuthenticationResults-2.20210112/lib/Mail/AuthenticationResults.pm 2021-01-12 23:10:33.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/lib/Mail/AuthenticationResults.pm 2021-09-15 13:10:25.000000000 +0200 @@ -4,7 +4,7 @@ require 5.008; use strict; use warnings; -our $VERSION = '2.20210112'; # VERSION +our $VERSION = '2.20210915'; # VERSION use Carp; use Mail::AuthenticationResults::Parser; @@ -37,7 +37,7 @@ =head1 VERSION -version 2.20210112 +version 2.20210915 =head1 DESCRIPTION @@ -51,8 +51,6 @@ Comments added between key/value pairs will be added after them in the data structures and when stringified. -It is a work in progress.. - =head1 METHODS =head2 new() @@ -76,7 +74,7 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2020 by Marc Bradshaw. +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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-AuthenticationResults-2.20210112/t/03-add-children-from.t new/Mail-AuthenticationResults-2.20210915/t/03-add-children-from.t --- old/Mail-AuthenticationResults-2.20210112/t/03-add-children-from.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Mail-AuthenticationResults-2.20210915/t/03-add-children-from.t 2021-09-15 13:10:25.000000000 +0200 @@ -0,0 +1,47 @@ +#!perl +use 5.008; +use strict; +use warnings FATAL => 'all'; +use lib 't'; +use Test::More; +use Test::Exception; + +use lib 'lib'; +use Mail::AuthenticationResults::Parser; + +my $ARHeader1 = 'Authentication-Results: mx6.messagingengine.com; + dkim=pass (1024-bit rsa key sha256) header.d=mail.ru header.i=@mail.ru header.b=oF80QtY/ x-bits=1024 x-keytype=rsa x-algorithm=sha256 x-selector=mail2; + spf=pass smtp.mailfrom=fmdeliverabil...@mail.ru smtp.helo=smtp46.i.mail.ru;'; +my $ARHeader2 = 'Authentication-Results: mx5.messagingengine.com; + dmarc=pass (p=reject,d=none) header.from=mail.ru;'; + +my $Parsed1; +my $Parsed2; +lives_ok( sub{ $Parsed1 = Mail::AuthenticationResults::Parser->new()->parse( $ARHeader1 ) }, 'Parse 1 lives' ); +lives_ok( sub{ $Parsed2 = Mail::AuthenticationResults::Parser->new()->parse( $ARHeader2 ) }, 'Parse 2 lives' ); + +is ( $Parsed1->value()->value(), 'mx6.messagingengine.com', 'ServID 1' ); +is ( scalar @{$Parsed1->search({ 'key'=>'spf','value'=>'pass' })->children() }, 1, 'SPF Pass 1' ); +is ( scalar @{$Parsed1->search({ 'key'=>'dkim','value'=>'pass' })->search({ 'key'=>'header.i','value'=>'@mail.ru' })->children() }, 1, 'DKIM Pass 1' ); +is ( scalar @{$Parsed1->search({ 'key'=>'dmarc','value'=>'pass' })->children() }, 0, 'DMARC Missing 1' ); + +is ( $Parsed2->value()->value(), 'mx5.messagingengine.com', 'ServID 2' ); +is ( scalar @{$Parsed2->search({ 'key'=>'spf','value'=>'pass' })->children() }, 0, 'SPF Missing 2' ); +is ( scalar @{$Parsed2->search({ 'key'=>'dkim','value'=>'pass' })->search({ 'key'=>'header.i','value'=>'@mail.ru' })->children() }, 0, 'DKIM Missing 2' ); +is ( scalar @{$Parsed2->search({ 'key'=>'dmarc','value'=>'pass' })->children() }, 1, 'DMARC Pass 2' ); + +lives_ok( sub{ $Parsed1->copy_children_from( $Parsed2 ) }, 'Merge 2 into 1 lives' ); + +is ( $Parsed1->value()->value(), 'mx6.messagingengine.com', 'ServID 1 post copy' ); +is ( scalar @{$Parsed1->search({ 'key'=>'spf','value'=>'pass' })->children() }, 1, 'SPF Pass 1 post copy' ); +is ( scalar @{$Parsed1->search({ 'key'=>'dkim','value'=>'pass' })->search({ 'key'=>'header.i','value'=>'@mail.ru' })->children() }, 1, 'DKIM Pass 1 post copy' ); +is ( scalar @{$Parsed1->search({ 'key'=>'dmarc','value'=>'pass' })->children() }, 1, 'DMARC Pass post copy' ); + +is ( $Parsed2->value()->value(), 'mx5.messagingengine.com', 'ServID 2' ); +is ( scalar @{$Parsed2->search({ 'key'=>'spf','value'=>'pass' })->children() }, 0, 'SPF Missing 2 post copy' ); +is ( scalar @{$Parsed2->search({ 'key'=>'dkim','value'=>'pass' })->search({ 'key'=>'header.i','value'=>'@mail.ru' })->children() }, 0, 'DKIM Missing 2 post copy' ); +is ( scalar @{$Parsed2->search({ 'key'=>'dmarc','value'=>'pass' })->children() }, 1, 'DMARC Pass 2 post copy' ); + +done_testing(); + +