Hello community,

here is the log from the commit of package perl-Email-Simple for 
openSUSE:Factory checked in at 2013-06-06 15:01:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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      
2011-12-27 18:14:06.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.perl-Email-Simple.new/perl-Email-Simple.changes 
2013-06-06 15:01:26.000000000 +0200
@@ -1,0 +2,9 @@
+Tue Jun  4 08:42:21 UTC 2013 - [email protected]
+
+- updated to 2.201
+          preserve the original header layout unless changed
+          fix a bug in header unfolding where "0\n 1" could be unfolded to "01"
+          recognize crlf correctly even if there is no body (thanks, Christian
+          Walde)
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ perl-Email-Simple.spec ++++++
--- /var/tmp/diff_new_pack.nG5Ks2/_old  2013-06-06 15:01:26.000000000 +0200
+++ /var/tmp/diff_new_pack.nG5Ks2/_new  2013-06-06 15:01:26.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Email-Simple
 #
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,23 +16,27 @@
 #
 
 
-
 Name:           perl-Email-Simple
+Version:        2.201
+Release:        0
 %define cpan_name Email-Simple
 Summary:        Simple parsing of RFC2822 message format and headers
-Version:        2.101
-Release:        0
 License:        Artistic-1.0 or GPL-1.0+
 Group:          Development/Libraries/Perl
 Url:            http://search.cpan.org/dist/Email-Simple/
-Source:         
http://www.cpan.org/authors/id/R/RJ/RJBS/Email-Simple-%{version}.tar.gz
+Source:         
http://www.cpan.org/authors/id/R/RJ/RJBS/%{cpan_name}-%{version}.tar.gz
 BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-%{perl_requires}
 BuildRequires:  perl
-BuildRequires:  perl(Email::Date::Format)
 BuildRequires:  perl-macros
+BuildRequires:  perl(Email::Date::Format)
+#BuildRequires: perl(Email::MIME)
+#BuildRequires: perl(Email::Simple)
+#BuildRequires: perl(Email::Simple::Creator)
+#BuildRequires: perl(Email::Simple::Header)
+#BuildRequires: perl(Test::MinimumVersion) >= 0.003
 Requires:       perl(Email::Date::Format)
+%{perl_requires}
 
 %description
 'Email::Simple' is the first deliverable of the "Perl Email Project." The
@@ -53,24 +57,11 @@
 
 %install
 %perl_make_install
-### since 11.4 perl_process_packlist
-### removes .packlist, perllocal.pod files
-%if 0%{?suse_version} > 1130
 %perl_process_packlist
-%else
-# do not perl_process_packlist
-# remove .packlist file
-%{__rm} -rf $RPM_BUILD_ROOT%perl_vendorarch
-# remove perllocal.pod file
-%{__rm} -f $RPM_BUILD_ROOT%perl_archlib/perllocal.pod
-%endif
 %perl_gen_filelist
 
-%clean
-%{__rm} -rf $RPM_BUILD_ROOT
-
 %files -f %{name}.files
-%defattr(-,root,root,-)
+%defattr(-,root,root,755)
 %doc Changes LICENSE README
 
 %changelog

++++++ Email-Simple-2.101.tar.gz -> Email-Simple-2.201.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Email-Simple-2.101/Changes 
new/Email-Simple-2.201/Changes
--- old/Email-Simple-2.101/Changes      2011-12-23 20:18:34.000000000 +0100
+++ new/Email-Simple-2.201/Changes      2013-04-16 17:29:17.000000000 +0200
@@ -1,5 +1,18 @@
 Revision history for Perl extension Email::Simple.
 
+2.201     2013-04-16
+          no changes
+
+2.200_01  2013-04-09
+          preserve the original header layout unless changed
+
+2.103     2013-04-09
+          fix a bug in header unfolding where "0\n 1" could be unfolded to "01"
+
+2.102     2012-07-13
+          recognize crlf correctly even if there is no body (thanks, Christian
+          Walde)
+
 2.101     2011-12-23
           remove instruction to use ::Creator instead of just ->create
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Email-Simple-2.101/META.json 
new/Email-Simple-2.201/META.json
--- old/Email-Simple-2.101/META.json    2011-12-23 20:18:50.000000000 +0100
+++ new/Email-Simple-2.201/META.json    2013-04-16 17:34:43.000000000 +0200
@@ -4,7 +4,7 @@
       "unknown"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter 
version 2.112621",
+   "generated_by" : "ExtUtils::MakeMaker version 6.6501, CPAN::Meta::Converter 
version 2.130880",
    "license" : [
       "perl_5"
    ],
@@ -22,17 +22,17 @@
    "prereqs" : {
       "build" : {
          "requires" : {
-            "ExtUtils::MakeMaker" : 0
+            "ExtUtils::MakeMaker" : "0"
          }
       },
       "configure" : {
          "requires" : {
-            "ExtUtils::MakeMaker" : 0
+            "ExtUtils::MakeMaker" : "0"
          }
       },
       "runtime" : {
          "requires" : {
-            "Email::Date::Format" : 0,
+            "Email::Date::Format" : "0",
             "Test::More" : "0.47"
          }
       }
@@ -41,5 +41,5 @@
    "resources" : {
       "x_Repository" : "http://github.com/rjbs/email-simple";
    },
-   "version" : "2.101"
+   "version" : "2.201"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Email-Simple-2.101/META.yml 
new/Email-Simple-2.201/META.yml
--- old/Email-Simple-2.101/META.yml     2011-12-23 20:18:49.000000000 +0100
+++ new/Email-Simple-2.201/META.yml     2013-04-16 17:34:43.000000000 +0200
@@ -7,7 +7,7 @@
 configure_requires:
   ExtUtils::MakeMaker: 0
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 
2.112621'
+generated_by: 'ExtUtils::MakeMaker version 6.6501, CPAN::Meta::Converter 
version 2.130880'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -22,4 +22,4 @@
   Test::More: 0.47
 resources:
   x_Repository: http://github.com/rjbs/email-simple
-version: 2.101
+version: 2.201
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Email-Simple-2.101/lib/Email/Simple/Creator.pm 
new/Email-Simple-2.201/lib/Email/Simple/Creator.pm
--- old/Email-Simple-2.101/lib/Email/Simple/Creator.pm  2011-12-23 
20:17:08.000000000 +0100
+++ new/Email-Simple-2.201/lib/Email/Simple/Creator.pm  2013-04-16 
17:28:55.000000000 +0200
@@ -2,7 +2,8 @@
 use warnings;
 package Email::Simple::Creator;
 
-our $VERSION = '2.101';
+our $VERSION = '2.201';
+$VERSION = eval $VERSION;
 
 sub _crlf {
   "\x0d\x0a";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Email-Simple-2.101/lib/Email/Simple/Header.pm 
new/Email-Simple-2.201/lib/Email/Simple/Header.pm
--- old/Email-Simple-2.101/lib/Email/Simple/Header.pm   2011-12-23 
20:17:39.000000000 +0100
+++ new/Email-Simple-2.201/lib/Email/Simple/Header.pm   2013-04-16 
17:28:59.000000000 +0200
@@ -5,7 +5,8 @@
 
 require Email::Simple;
 
-$Email::Simple::Header::VERSION = '2.101';
+our $VERSION = '2.201';
+$VERSION = eval $VERSION;
 
 =head1 NAME
 
@@ -71,14 +72,17 @@
 
   while ($$head =~ m/\G(.+?)$crlf/go) {
     local $_ = $1;
-    if (s/^\s+// or not /^([^:]+):\s*(.*)/) {
+
+    if (/^\s+/ or not /^([^:]+):\s*(.*)/) {
       # This is a continuation line. We fold it onto the end of
       # the previous header.
       next if !@headers;  # Well, that sucks.  We're continuing nothing?
 
-      $headers[-1] .= $headers[-1] ? " $_" : $_;
+      (my $trimmed = $_) =~ s/^\s+//;
+      $headers[-1][0] .= $headers[-1][0] =~ /\S/ ? " $trimmed" : $trimmed;
+      $headers[-1][1] .= "$mycrlf$_";
     } else {
-      push @headers, $1, $2;
+      push @headers, $1, [ $2, $_ ];
     }
   }
 
@@ -115,11 +119,13 @@
   };
 
   for (my $i = 0; $i < @$headers; $i += 2) {
-    my $header = "$headers->[$i]: $headers->[$i + 1]";
+    if (ref $headers->[ $i + 1 ]) {
+      $header_str .= $headers->[ $i + 1 ][1] . $self->crlf;
+    } else {
+      my $header = "$headers->[$i]: $headers->[$i + 1]";
 
-    $header_str .= lc $headers->[$i] eq 'content-type'
-                 ? $header . $self->crlf
-                 : $self->_fold($header, $fold_arg);
+      $header_str .= $self->_fold($header, $fold_arg);
+    }
   }
 
   return $header_str;
@@ -150,7 +156,9 @@
 sub header_pairs {
   my ($self) = @_;
 
-  return @{ $self->{headers} };
+  my @pairs = map {; _str_value($_) } @{ $self->{headers} };
+
+  return @pairs;
 }
 
 =head2 header
@@ -163,6 +171,8 @@
 
 =cut
 
+sub _str_value { return ref $_[0] ? $_[0][0] : $_[0] }
+
 sub header {
   my ($self, $field) = @_;
 
@@ -170,11 +180,11 @@
   my $lc_field = lc $field;
 
   if (wantarray) {
-    return map { @$headers[ $_ * 2 + 1 ] }
+    return map { _str_value($headers->[ $_ * 2 + 1 ]) }
       grep { lc $headers->[ $_ * 2 ] eq $lc_field } 0 .. int($#$headers / 2);
   } else {
     for (0 .. int($#$headers / 2)) {
-      return $headers->[ $_ * 2 + 1 ] if lc $headers->[ $_ * 2 ] eq $lc_field;
+      return _str_value($headers->[ $_ * 2 + 1 ]) if lc $headers->[ $_ * 2 ] 
eq $lc_field;
     }
     return;
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Email-Simple-2.101/lib/Email/Simple.pm 
new/Email-Simple-2.201/lib/Email/Simple.pm
--- old/Email-Simple-2.101/lib/Email/Simple.pm  2011-12-23 20:17:08.000000000 
+0100
+++ new/Email-Simple-2.201/lib/Email/Simple.pm  2013-04-16 17:28:46.000000000 
+0200
@@ -8,7 +8,8 @@
 use Email::Simple::Creator;
 use Email::Simple::Header;
 
-our $VERSION = '2.101';
+our $VERSION = '2.201';
+$VERSION = eval $VERSION;
 our $GROUCHY = 0;
 
 # We are liberal in what we accept.
@@ -123,7 +124,8 @@
   } else {
 
     # The body is, of course, optional.
-    return (undef, "\n");
+    $$text_ref =~ /($crlf)/gsm;
+    return (undef, ($1 || "\n"));
   }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Email-Simple-2.101/t/ct-header.t 
new/Email-Simple-2.201/t/ct-header.t
--- old/Email-Simple-2.101/t/ct-header.t        2008-11-21 22:34:21.000000000 
+0100
+++ new/Email-Simple-2.201/t/ct-header.t        2013-04-16 17:28:34.000000000 
+0200
@@ -2,7 +2,7 @@
 
 use strict;
 
-use Test::More tests => 4;
+use Test::More tests => 2;
 
 use Email::Simple;
 
@@ -13,19 +13,6 @@
 
 my $ct_text = qq{Content-Type: multipart/alternative; boundary="=_alternative 
0065F3338525722E_="\n};
 
-my $other_text = qq{Non-Content-Type: multipart/alternative; 
boundary="=_alternative 0065F3338525722E_="\n};
-
-{
-  my $count = my @lines = split /\n/, $other_text;
-  is($count, 1, "we start with one line (non-Content-Type header)");
-}
-
-{
-  my $email = Email::Simple->new($other_text);
-  my $count = my @lines = split /\n/, $email->as_string;
-  is($count, 2, "we end with two, because it wraps");
-}
-
 {
   my $count = my @lines = split /\n/, $ct_text;
   is($count, 1, "we start with one line (Content-Type header)");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Email-Simple-2.101/t/folding.t 
new/Email-Simple-2.201/t/folding.t
--- old/Email-Simple-2.101/t/folding.t  2008-11-21 22:34:21.000000000 +0100
+++ new/Email-Simple-2.201/t/folding.t  2013-04-09 16:23:14.000000000 +0200
@@ -1,6 +1,6 @@
 #!perl -w
 use strict;
-use Test::More tests => 5;
+use Test::More tests => 6;
 
 # This time, with folding!
 
@@ -11,7 +11,7 @@
 
 my $mail = Email::Simple->new($mail_text);
 isa_ok($mail, "Email::Simple");
-is($mail->header("References"), 
+is($mail->header("References"),
    q{<[email protected]>  
<[email protected]>  <[email protected]>},
     "References header checks out");
 is($mail->header("reFerEnceS"),
@@ -22,3 +22,17 @@
 'from mailman.opengroup.org ([192.153.166.9]) by deep-dark-truthful-mirror.pad 
with smtp (Exim 3.36 #1 (Debian)) id 18Buh5-0006Zr-00 for 
<[email protected]>; Wed, 13 Nov 2002 10:24:23 +0000',
 '(qmail 1679 invoked by uid 503); 13 Nov 2002 10:10:49 -0000'],
 "And the received headers are folded gracefully, and multiple headers work");
+
+{
+  my $text = <<'END';
+Fold-1: 1
+ 2 3
+Fold-2: 0
+ 1 2
+
+Body
+END
+
+  my $email = Email::Simple->new($text);
+  is($email->header('Fold-2'), '0 1 2', "we unfold with a false start string");
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Email-Simple-2.101/t/header-space.t 
new/Email-Simple-2.201/t/header-space.t
--- old/Email-Simple-2.101/t/header-space.t     2008-11-21 22:34:21.000000000 
+0100
+++ new/Email-Simple-2.201/t/header-space.t     2012-07-13 14:53:44.000000000 
+0200
@@ -1,7 +1,7 @@
 #!perl -T
 use strict;
 
-use Test::More tests => 8;
+use Test::More tests => 12;
 use Email::Simple;
 
 my @crlf = (
@@ -16,5 +16,7 @@
   is($m->header('foo-bar'), 'Baz', "no spaces trail with $name");
 
   is($m->crlf, $eol, "correctly detected crlf value");
-}
 
+  $m = Email::Simple->new("Foo-Bar: Baz${eol}");
+  is($m->crlf, $eol, "correctly detected crlf value");
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Email-Simple-2.101/t/pod-coverage.t 
new/Email-Simple-2.201/t/pod-coverage.t
--- old/Email-Simple-2.101/t/pod-coverage.t     2009-11-04 01:21:35.000000000 
+0100
+++ new/Email-Simple-2.201/t/pod-coverage.t     2013-04-09 16:23:14.000000000 
+0200
@@ -1,4 +1,4 @@
-#!perl -T
+#!perl
 
 use Test::More;
 eval "use Test::Pod::Coverage 1.08";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Email-Simple-2.101/t/pod.t 
new/Email-Simple-2.201/t/pod.t
--- old/Email-Simple-2.101/t/pod.t      2008-11-21 22:34:21.000000000 +0100
+++ new/Email-Simple-2.201/t/pod.t      2013-04-09 16:23:14.000000000 +0200
@@ -1,4 +1,4 @@
-#!perl -T
+#!perl
 
 use Test::More;
 eval "use Test::Pod 1.14";

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to