Hello community,

here is the log from the commit of package perl-Email-Simple for 
openSUSE:Factory checked in at 2017-02-16 17:03:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Email-Simple (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Email-Simple.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Email-Simple"

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Email-Simple/perl-Email-Simple.changes      
2016-11-18 22:03:16.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.perl-Email-Simple.new/perl-Email-Simple.changes 
2017-02-16 17:03:25.333674130 +0100
@@ -1,0 +2,13 @@
+Mon Feb 13 11:51:06 UTC 2017 - [email protected]
+
+- updated to 2.213
+   see /usr/share/doc/packages/perl-Email-Simple/Changes
+
+  2.213     2017-01-11 09:21:54-05:00 America/New_York
+          - no changes since v2.212
+  
+  2.212     2016-12-18 20:05:09-05:00 America/New_York (TRIAL RELEASE)
+          - add an $index arg to ->header to get the nth header (thanks, Pali
+            Rohár)
+
+-------------------------------------------------------------------

Old:
----
  Email-Simple-2.211.tar.gz

New:
----
  Email-Simple-2.213.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Email-Simple.spec ++++++
--- /var/tmp/diff_new_pack.ZLdOe1/_old  2017-02-16 17:03:25.821605095 +0100
+++ /var/tmp/diff_new_pack.ZLdOe1/_new  2017-02-16 17:03:25.821605095 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Email-Simple
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,14 +17,14 @@
 
 
 Name:           perl-Email-Simple
-Version:        2.211
+Version:        2.213
 Release:        0
 %define cpan_name Email-Simple
 Summary:        Simple Parsing of Rfc2822 Message Format and Headers
 License:        Artistic-1.0 or GPL-1.0+
 Group:          Development/Libraries/Perl
 Url:            http://search.cpan.org/dist/Email-Simple/
-Source0:        
http://www.cpan.org/authors/id/R/RJ/RJBS/%{cpan_name}-%{version}.tar.gz
+Source0:        
https://cpan.metacpan.org/authors/id/R/RJ/RJBS/%{cpan_name}-%{version}.tar.gz
 Source1:        cpanspec.yml
 BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -58,6 +58,7 @@
 
 %files -f %{name}.files
 %defattr(-,root,root,755)
-%doc Changes LICENSE README
+%doc Changes README
+%license LICENSE
 
 %changelog

++++++ Email-Simple-2.211.tar.gz -> Email-Simple-2.213.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Email-Simple-2.211/Changes 
new/Email-Simple-2.213/Changes
--- old/Email-Simple-2.211/Changes      2016-11-12 15:39:12.000000000 +0100
+++ new/Email-Simple-2.213/Changes      2017-01-11 15:21:58.000000000 +0100
@@ -1,5 +1,12 @@
 Revision history for Perl extension Email::Simple
 
+2.213     2017-01-11 09:21:54-05:00 America/New_York
+        - no changes since v2.212
+
+2.212     2016-12-18 20:05:09-05:00 America/New_York (TRIAL RELEASE)
+        - add an $index arg to ->header to get the nth header (thanks, Pali
+          Rohár)
+
 2.211     2016-11-12 09:39:09-05:00 America/New_York
         - fix a fencepost error in headers and header_names that led to a
           spurious undef in return and to a warning (thanks, Pali Rohár)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Email-Simple-2.211/META.json 
new/Email-Simple-2.213/META.json
--- old/Email-Simple-2.211/META.json    2016-11-12 15:39:12.000000000 +0100
+++ new/Email-Simple-2.213/META.json    2017-01-11 15:21:58.000000000 +0100
@@ -59,7 +59,7 @@
          "web" : "https://github.com/rjbs/Email-Simple";
       }
    },
-   "version" : "2.211",
+   "version" : "2.213",
    "x_Dist_Zilla" : {
       "perl" : {
          "version" : "5.024000"
@@ -82,7 +82,7 @@
                }
             },
             "name" : "@RJBS/Git::GatherDir",
-            "version" : "2.039"
+            "version" : "2.041"
          },
          {
             "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed",
@@ -205,11 +205,12 @@
                   "version_regexp" : "(?^:^([0-9]+\\.[0-9]+)$)"
                },
                "Dist::Zilla::Role::Git::Repo" : {
+                  "git --version" : "2.11.0",
                   "repo_root" : "."
                }
             },
             "name" : "@RJBS/Git::NextVersion",
-            "version" : "2.039"
+            "version" : "2.041"
          },
          {
             "class" : "Dist::Zilla::Plugin::PkgVersion",
@@ -272,82 +273,82 @@
                      {
                         "class" : "Pod::Weaver::Plugin::EnsurePod5",
                         "name" : "@CorePrep/EnsurePod5",
-                        "version" : "4.013"
+                        "version" : "4.015"
                      },
                      {
                         "class" : "Pod::Weaver::Plugin::H1Nester",
                         "name" : "@CorePrep/H1Nester",
-                        "version" : "4.013"
+                        "version" : "4.015"
                      },
                      {
                         "class" : "Pod::Weaver::Plugin::SingleEncoding",
                         "name" : "@RJBS/SingleEncoding",
-                        "version" : "4.013"
+                        "version" : "4.015"
                      },
                      {
                         "class" : "Pod::Weaver::Section::Name",
                         "name" : "@RJBS/Name",
-                        "version" : "4.013"
+                        "version" : "4.015"
                      },
                      {
                         "class" : "Pod::Weaver::Section::Version",
                         "name" : "@RJBS/Version",
-                        "version" : "4.013"
+                        "version" : "4.015"
                      },
                      {
                         "class" : "Pod::Weaver::Section::Region",
                         "name" : "@RJBS/Prelude",
-                        "version" : "4.013"
+                        "version" : "4.015"
                      },
                      {
                         "class" : "Pod::Weaver::Section::Generic",
                         "name" : "@RJBS/Synopsis",
-                        "version" : "4.013"
+                        "version" : "4.015"
                      },
                      {
                         "class" : "Pod::Weaver::Section::Generic",
                         "name" : "@RJBS/Description",
-                        "version" : "4.013"
+                        "version" : "4.015"
                      },
                      {
                         "class" : "Pod::Weaver::Section::Generic",
                         "name" : "@RJBS/Overview",
-                        "version" : "4.013"
+                        "version" : "4.015"
                      },
                      {
                         "class" : "Pod::Weaver::Section::Generic",
                         "name" : "@RJBS/Stability",
-                        "version" : "4.013"
+                        "version" : "4.015"
                      },
                      {
                         "class" : "Pod::Weaver::Section::Collect",
                         "name" : "Attributes",
-                        "version" : "4.013"
+                        "version" : "4.015"
                      },
                      {
                         "class" : "Pod::Weaver::Section::Collect",
                         "name" : "Methods",
-                        "version" : "4.013"
+                        "version" : "4.015"
                      },
                      {
                         "class" : "Pod::Weaver::Section::Collect",
                         "name" : "Functions",
-                        "version" : "4.013"
+                        "version" : "4.015"
                      },
                      {
                         "class" : "Pod::Weaver::Section::Leftovers",
                         "name" : "@RJBS/Leftovers",
-                        "version" : "4.013"
+                        "version" : "4.015"
                      },
                      {
                         "class" : "Pod::Weaver::Section::Region",
                         "name" : "@RJBS/postlude",
-                        "version" : "4.013"
+                        "version" : "4.015"
                      },
                      {
                         "class" : "Pod::Weaver::Section::Authors",
                         "name" : "@RJBS/Authors",
-                        "version" : "4.013"
+                        "version" : "4.015"
                      },
                      {
                         "class" : "Pod::Weaver::Section::Contributors",
@@ -357,12 +358,12 @@
                      {
                         "class" : "Pod::Weaver::Section::Legal",
                         "name" : "@RJBS/Legal",
-                        "version" : "4.013"
+                        "version" : "4.015"
                      },
                      {
                         "class" : "Pod::Weaver::Plugin::Transformer",
                         "name" : "@RJBS/List",
-                        "version" : "4.013"
+                        "version" : "4.015"
                      }
                   ]
                }
@@ -390,11 +391,12 @@
                   "changelog" : "Changes"
                },
                "Dist::Zilla::Role::Git::Repo" : {
+                  "git --version" : "2.11.0",
                   "repo_root" : "."
                }
             },
             "name" : "@RJBS/@Git/Check",
-            "version" : "2.039"
+            "version" : "2.041"
          },
          {
             "class" : "Dist::Zilla::Plugin::Git::Commit",
@@ -412,6 +414,7 @@
                   "changelog" : "Changes"
                },
                "Dist::Zilla::Role::Git::Repo" : {
+                  "git --version" : "2.11.0",
                   "repo_root" : "."
                },
                "Dist::Zilla::Role::Git::StringFormatter" : {
@@ -419,7 +422,7 @@
                }
             },
             "name" : "@RJBS/@Git/Commit",
-            "version" : "2.039"
+            "version" : "2.041"
          },
          {
             "class" : "Dist::Zilla::Plugin::Git::Tag",
@@ -428,11 +431,12 @@
                   "branch" : null,
                   "changelog" : "Changes",
                   "signed" : 0,
-                  "tag" : "2.211",
+                  "tag" : "2.213",
                   "tag_format" : "%v",
                   "tag_message" : "v%v"
                },
                "Dist::Zilla::Role::Git::Repo" : {
+                  "git --version" : "2.11.0",
                   "repo_root" : "."
                },
                "Dist::Zilla::Role::Git::StringFormatter" : {
@@ -440,30 +444,31 @@
                }
             },
             "name" : "@RJBS/@Git/Tag",
-            "version" : "2.039"
+            "version" : "2.041"
          },
          {
             "class" : "Dist::Zilla::Plugin::Git::Push",
             "config" : {
                "Dist::Zilla::Plugin::Git::Push" : {
                   "push_to" : [
-                     "origin :",
+                     "rjbs :",
                      "github :"
                   ],
                   "remotes_must_exist" : 0
                },
                "Dist::Zilla::Role::Git::Repo" : {
+                  "git --version" : "2.11.0",
                   "repo_root" : "."
                }
             },
             "name" : "@RJBS/@Git/Push",
-            "version" : "2.039"
+            "version" : "2.041"
          },
          {
             "class" : "Dist::Zilla::Plugin::Git::Contributors",
             "config" : {
                "Dist::Zilla::Plugin::Git::Contributors" : {
-                  "git --version" : "2.10.0",
+                  "git --version" : "2.11.0",
                   "include_authors" : 0,
                   "include_releaser" : 1,
                   "order_by" : "name",
@@ -541,6 +546,6 @@
       "Ronald F. Guilmette <[email protected]>",
       "William Yardley <[email protected]>"
    ],
-   "x_serialization_backend" : "Cpanel::JSON::XS version 3.0213"
+   "x_serialization_backend" : "Cpanel::JSON::XS version 3.0225"
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Email-Simple-2.211/META.yml 
new/Email-Simple-2.213/META.yml
--- old/Email-Simple-2.211/META.yml     2016-11-12 15:39:12.000000000 +0100
+++ new/Email-Simple-2.213/META.yml     2017-01-11 15:21:58.000000000 +0100
@@ -27,7 +27,7 @@
   bugtracker: https://github.com/rjbs/Email-Simple/issues
   homepage: https://github.com/rjbs/Email-Simple
   repository: https://github.com/rjbs/Email-Simple.git
-version: '2.211'
+version: '2.213'
 x_Dist_Zilla:
   perl:
     version: '5.024000'
@@ -46,7 +46,7 @@
         Dist::Zilla::Plugin::Git::GatherDir:
           include_untracked: 0
       name: '@RJBS/Git::GatherDir'
-      version: '2.039'
+      version: '2.041'
     -
       class: Dist::Zilla::Plugin::CheckPrereqsIndexed
       name: '@RJBS/CheckPrereqsIndexed'
@@ -143,9 +143,10 @@
           version_by_branch: 1
           version_regexp: (?^:^([0-9]+\.[0-9]+)$)
         Dist::Zilla::Role::Git::Repo:
+          'git --version': 2.11.0
           repo_root: .
       name: '@RJBS/Git::NextVersion'
-      version: '2.039'
+      version: '2.041'
     -
       class: Dist::Zilla::Plugin::PkgVersion
       name: '@RJBS/PkgVersion'
@@ -195,67 +196,67 @@
             -
               class: Pod::Weaver::Plugin::EnsurePod5
               name: '@CorePrep/EnsurePod5'
-              version: '4.013'
+              version: '4.015'
             -
               class: Pod::Weaver::Plugin::H1Nester
               name: '@CorePrep/H1Nester'
-              version: '4.013'
+              version: '4.015'
             -
               class: Pod::Weaver::Plugin::SingleEncoding
               name: '@RJBS/SingleEncoding'
-              version: '4.013'
+              version: '4.015'
             -
               class: Pod::Weaver::Section::Name
               name: '@RJBS/Name'
-              version: '4.013'
+              version: '4.015'
             -
               class: Pod::Weaver::Section::Version
               name: '@RJBS/Version'
-              version: '4.013'
+              version: '4.015'
             -
               class: Pod::Weaver::Section::Region
               name: '@RJBS/Prelude'
-              version: '4.013'
+              version: '4.015'
             -
               class: Pod::Weaver::Section::Generic
               name: '@RJBS/Synopsis'
-              version: '4.013'
+              version: '4.015'
             -
               class: Pod::Weaver::Section::Generic
               name: '@RJBS/Description'
-              version: '4.013'
+              version: '4.015'
             -
               class: Pod::Weaver::Section::Generic
               name: '@RJBS/Overview'
-              version: '4.013'
+              version: '4.015'
             -
               class: Pod::Weaver::Section::Generic
               name: '@RJBS/Stability'
-              version: '4.013'
+              version: '4.015'
             -
               class: Pod::Weaver::Section::Collect
               name: Attributes
-              version: '4.013'
+              version: '4.015'
             -
               class: Pod::Weaver::Section::Collect
               name: Methods
-              version: '4.013'
+              version: '4.015'
             -
               class: Pod::Weaver::Section::Collect
               name: Functions
-              version: '4.013'
+              version: '4.015'
             -
               class: Pod::Weaver::Section::Leftovers
               name: '@RJBS/Leftovers'
-              version: '4.013'
+              version: '4.015'
             -
               class: Pod::Weaver::Section::Region
               name: '@RJBS/postlude'
-              version: '4.013'
+              version: '4.015'
             -
               class: Pod::Weaver::Section::Authors
               name: '@RJBS/Authors'
-              version: '4.013'
+              version: '4.015'
             -
               class: Pod::Weaver::Section::Contributors
               name: '@RJBS/Contributors'
@@ -263,11 +264,11 @@
             -
               class: Pod::Weaver::Section::Legal
               name: '@RJBS/Legal'
-              version: '4.013'
+              version: '4.015'
             -
               class: Pod::Weaver::Plugin::Transformer
               name: '@RJBS/List'
-              version: '4.013'
+              version: '4.015'
       name: '@RJBS/PodWeaver'
       version: '4.008'
     -
@@ -286,9 +287,10 @@
           allow_dirty_match: []
           changelog: Changes
         Dist::Zilla::Role::Git::Repo:
+          'git --version': 2.11.0
           repo_root: .
       name: '@RJBS/@Git/Check'
-      version: '2.039'
+      version: '2.041'
     -
       class: Dist::Zilla::Plugin::Git::Commit
       config:
@@ -302,11 +304,12 @@
           allow_dirty_match: []
           changelog: Changes
         Dist::Zilla::Role::Git::Repo:
+          'git --version': 2.11.0
           repo_root: .
         Dist::Zilla::Role::Git::StringFormatter:
           time_zone: local
       name: '@RJBS/@Git/Commit'
-      version: '2.039'
+      version: '2.041'
     -
       class: Dist::Zilla::Plugin::Git::Tag
       config:
@@ -314,32 +317,34 @@
           branch: ~
           changelog: Changes
           signed: 0
-          tag: '2.211'
+          tag: '2.213'
           tag_format: '%v'
           tag_message: v%v
         Dist::Zilla::Role::Git::Repo:
+          'git --version': 2.11.0
           repo_root: .
         Dist::Zilla::Role::Git::StringFormatter:
           time_zone: local
       name: '@RJBS/@Git/Tag'
-      version: '2.039'
+      version: '2.041'
     -
       class: Dist::Zilla::Plugin::Git::Push
       config:
         Dist::Zilla::Plugin::Git::Push:
           push_to:
-            - 'origin :'
+            - 'rjbs :'
             - 'github :'
           remotes_must_exist: 0
         Dist::Zilla::Role::Git::Repo:
+          'git --version': 2.11.0
           repo_root: .
       name: '@RJBS/@Git/Push'
-      version: '2.039'
+      version: '2.041'
     -
       class: Dist::Zilla::Plugin::Git::Contributors
       config:
         Dist::Zilla::Plugin::Git::Contributors:
-          'git --version': 2.10.0
+          'git --version': 2.11.0
           include_authors: 0
           include_releaser: 1
           order_by: name
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Email-Simple-2.211/Makefile.PL 
new/Email-Simple-2.213/Makefile.PL
--- old/Email-Simple-2.211/Makefile.PL  2016-11-12 15:39:12.000000000 +0100
+++ new/Email-Simple-2.213/Makefile.PL  2017-01-11 15:21:58.000000000 +0100
@@ -27,7 +27,7 @@
     "File::Spec" => 0,
     "Test::More" => "0.96"
   },
-  "VERSION" => "2.211",
+  "VERSION" => "2.213",
   "test" => {
     "TESTS" => "t/*.t"
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Email-Simple-2.211/README 
new/Email-Simple-2.213/README
--- old/Email-Simple-2.211/README       2016-11-12 15:39:12.000000000 +0100
+++ new/Email-Simple-2.213/README       2017-01-11 15:21:58.000000000 +0100
@@ -1,7 +1,7 @@
 
 
 This archive contains the distribution Email-Simple,
-version 2.211:
+version 2.213:
 
   simple parsing of RFC2822 message format and headers
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Email-Simple-2.211/lib/Email/Simple/Creator.pm 
new/Email-Simple-2.213/lib/Email/Simple/Creator.pm
--- old/Email-Simple-2.211/lib/Email/Simple/Creator.pm  2016-11-12 
15:39:12.000000000 +0100
+++ new/Email-Simple-2.213/lib/Email/Simple/Creator.pm  2017-01-11 
15:21:58.000000000 +0100
@@ -2,7 +2,7 @@
 use warnings;
 package Email::Simple::Creator;
 # ABSTRACT: private helper for building Email::Simple objects
-$Email::Simple::Creator::VERSION = '2.211';
+$Email::Simple::Creator::VERSION = '2.213';
 sub _crlf {
   "\x0d\x0a";
 }
@@ -44,7 +44,7 @@
 
 =head1 VERSION
 
-version 2.211
+version 2.213
 
 =head1 AUTHORS
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Email-Simple-2.211/lib/Email/Simple/Header.pm 
new/Email-Simple-2.213/lib/Email/Simple/Header.pm
--- old/Email-Simple-2.211/lib/Email/Simple/Header.pm   2016-11-12 
15:39:12.000000000 +0100
+++ new/Email-Simple-2.213/lib/Email/Simple/Header.pm   2017-01-11 
15:21:58.000000000 +0100
@@ -2,7 +2,7 @@
 use warnings;
 package Email::Simple::Header;
 # ABSTRACT: the header of an Email::Simple message
-$Email::Simple::Header::VERSION = '2.211';
+$Email::Simple::Header::VERSION = '2.213';
 use Carp ();
 
 require Email::Simple;
@@ -175,6 +175,7 @@
 #pod =method header_raw
 #pod
 #pod   my $first_value = $header->header_raw($field);
+#pod   my $nth_value   = $header->header_raw($field, $index);
 #pod   my @all_values  = $header->header_raw($field);
 #pod
 #pod This method returns the value or values of the given header field.  If the
@@ -191,19 +192,24 @@
 sub _str_value { return ref $_[0] ? $_[0][0] : $_[0] }
 
 sub header_raw {
-  my ($self, $field) = @_;
+  my ($self, $field, $index) = @_;
 
   my $headers  = $self->{headers};
   my $lc_field = lc $field;
 
-  if (wantarray) {
+  if (wantarray and not defined $index) {
     return map { _str_value($headers->[ $_ * 2 + 1 ]) }
       grep { lc $headers->[ $_ * 2 ] eq $lc_field } 0 .. @$headers / 2 - 1;
   } else {
-    for (0 .. @$headers / 2 - 1) {
-      return _str_value($headers->[ $_ * 2 + 1 ]) if lc $headers->[ $_ * 2 ] 
eq $lc_field;
+    $index = 0 unless defined $index;
+    my $max = @$headers / 2 - 1;
+    my @indexes = $index >= 0 ? (0 .. $max) : reverse(0 .. $max);
+    $index = -1-$index if $index < 0;
+    for (@indexes) {
+      next unless lc $headers->[ $_ * 2 ] eq $lc_field;
+      return _str_value($headers->[ $_ * 2 + 1 ]) if $index-- == 0;
     }
-    return;
+    return undef;
   }
 }
 
@@ -370,7 +376,7 @@
 
 =head1 VERSION
 
-version 2.211
+version 2.213
 
 =head1 SYNOPSIS
 
@@ -429,6 +435,7 @@
 =head2 header_raw
 
   my $first_value = $header->header_raw($field);
+  my $nth_value   = $header->header_raw($field, $index);
   my @all_values  = $header->header_raw($field);
 
 This method returns the value or values of the given header field.  If the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Email-Simple-2.211/lib/Email/Simple.pm 
new/Email-Simple-2.213/lib/Email/Simple.pm
--- old/Email-Simple-2.211/lib/Email/Simple.pm  2016-11-12 15:39:12.000000000 
+0100
+++ new/Email-Simple-2.213/lib/Email/Simple.pm  2017-01-11 15:21:58.000000000 
+0100
@@ -3,7 +3,7 @@
 use warnings;
 package Email::Simple;
 # ABSTRACT: simple parsing of RFC2822 message format and headers
-$Email::Simple::VERSION = '2.211';
+$Email::Simple::VERSION = '2.213';
 use Carp ();
 
 use Email::Simple::Creator;
@@ -214,9 +214,12 @@
 #pod
 #pod   my @values = $email->header($header_name);
 #pod   my $first  = $email->header($header_name);
+#pod   my $value  = $email->header($header_name, $index);
 #pod
 #pod In list context, this returns every value for the named header.  In scalar
-#pod context, it returns the I<first> value for the named header.
+#pod context, it returns the I<first> value for the named header.  If second
+#pod parameter is specified then instead I<first> value it returns value at
+#pod position C<$index> (negative C<$index> is from the end).
 #pod
 #pod =method header_set
 #pod
@@ -337,7 +340,7 @@
 
 =head1 VERSION
 
-version 2.211
+version 2.213
 
 =head1 SYNOPSIS
 
@@ -428,9 +431,12 @@
 
   my @values = $email->header($header_name);
   my $first  = $email->header($header_name);
+  my $value  = $email->header($header_name, $index);
 
 In list context, this returns every value for the named header.  In scalar
-context, it returns the I<first> value for the named header.
+context, it returns the I<first> value for the named header.  If second
+parameter is specified then instead I<first> value it returns value at
+position C<$index> (negative C<$index> is from the end).
 
 =head2 header_set
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Email-Simple-2.211/t/header-new.t 
new/Email-Simple-2.213/t/header-new.t
--- old/Email-Simple-2.211/t/header-new.t       2016-11-12 15:39:12.000000000 
+0100
+++ new/Email-Simple-2.213/t/header-new.t       2017-01-11 15:21:58.000000000 
+0100
@@ -11,6 +11,7 @@
 my $header_string = <<'END_HEADER';
 Foo: 1
 Foo: 2
+Foo: 3
 Bar: 3
 Baz: 1
 END_HEADER
@@ -20,15 +21,61 @@
 
   isa_ok($head, 'Email::Simple::Header');
 
-  is_deeply(
-    [ $head->header('foo') ],
-    [ 1, 2 ],
-    "multi-value header",
-  );
-
-  is_deeply(
-    scalar $head->header('foo'),
-    1,
-    "single-value header",
-  );
+  for my $method (qw(header header_raw)) {
+    subtest "checks via $method" => sub {
+      is_deeply(
+        [ $head->$method('foo') ],
+        [ 1, 2, 3 ],
+        "multi-value header",
+      );
+
+      is_deeply(
+        scalar $head->$method('foo'),
+        1,
+        "single-value header",
+      );
+
+      is_deeply(
+        scalar $head->$method('foo', 0),
+        1,
+        "first value",
+      );
+
+      is_deeply(
+        scalar $head->$method('foo', 1),
+        2,
+        "second value",
+      );
+
+      is_deeply(
+        scalar $head->$method('foo', 2),
+        3,
+        "third value",
+      );
+
+      is_deeply(
+        scalar $head->$method('foo', 3),
+        undef,
+        "non existent fourth value",
+      );
+
+      is_deeply(
+        scalar $head->$method('foo', -1),
+        3,
+        "last value",
+      );
+
+      is_deeply(
+        scalar $head->$method('foo', -3),
+        1,
+        "third value from end",
+      );
+
+      is_deeply(
+        scalar $head->$method('foo', -4),
+        undef,
+        "non existent fourth value from end",
+      );
+    }
+  }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Email-Simple-2.211/xt/release/changes_has_content.t 
new/Email-Simple-2.213/xt/release/changes_has_content.t
--- old/Email-Simple-2.211/xt/release/changes_has_content.t     2016-11-12 
15:39:12.000000000 +0100
+++ new/Email-Simple-2.213/xt/release/changes_has_content.t     2017-01-11 
15:21:58.000000000 +0100
@@ -4,7 +4,7 @@
 
 note 'Checking Changes';
 my $changes_file = 'Changes';
-my $newver = '2.211';
+my $newver = '2.213';
 my $trial_token = '-TRIAL';
 
 SKIP: {


Reply via email to