r27518 - in /trunk/libmail-imapclient-perl: Changes META.yml debian/NEWS debian/changelog debian/control debian/copyright debian/patches/catch_ssl_attribute.patch lib/Mail/IMAPClient.pm

ansgar-guest at users.alioth.debian.org ansgar-guest at users.alioth.debian.org
Sun Nov 30 17:25:43 UTC 2008


Author: ansgar-guest
Date: Sun Nov 30 17:25:37 2008
New Revision: 27518

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=27518
Log:
* New upstream release.
* Add myself to Uploaders.
* debian/NEWS: Correct reference to Mail::IMAPClient man page.
* Convert debian/copyright to proposed machine-readable format.
* debian/copyright: Do not mention Debian Perl Group as copyright holder for
  the Debian packaging, instead list all individual contributors.
  The list of contributors was taken from the changelog.

Modified:
    trunk/libmail-imapclient-perl/Changes
    trunk/libmail-imapclient-perl/META.yml
    trunk/libmail-imapclient-perl/debian/NEWS
    trunk/libmail-imapclient-perl/debian/changelog
    trunk/libmail-imapclient-perl/debian/control
    trunk/libmail-imapclient-perl/debian/copyright
    trunk/libmail-imapclient-perl/debian/patches/catch_ssl_attribute.patch
    trunk/libmail-imapclient-perl/lib/Mail/IMAPClient.pm

Modified: trunk/libmail-imapclient-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-imapclient-perl/Changes?rev=27518&op=diff
==============================================================================
--- trunk/libmail-imapclient-perl/Changes (original)
+++ trunk/libmail-imapclient-perl/Changes Sun Nov 30 17:25:37 2008
@@ -2,6 +2,14 @@
 == Revision History for Mail::IMAPClient
 All changes from 2.99_01 upward are made by Mark Overmeer.  The changes
 before that are applied by David Kernen
+
+version 3.12: Mon Nov 24 15:34:58 CET 2008
+
+	Improvement:
+
+	- major performance improvement in append_message(), avoiding
+	  reading the whole file in memory as the docs promised but the
+	  code didn't do.  [David Podolsky]
 
 version 3.11: Wed Oct  8 10:57:31 CEST 2008
 

Modified: trunk/libmail-imapclient-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-imapclient-perl/META.yml?rev=27518&op=diff
==============================================================================
--- trunk/libmail-imapclient-perl/META.yml (original)
+++ trunk/libmail-imapclient-perl/META.yml Sun Nov 30 17:25:37 2008
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:                Mail-IMAPClient
-version:             3.11
+version:             3.12
 abstract:            IMAP4 client library
 license:             ~
 author:              ~

Modified: trunk/libmail-imapclient-perl/debian/NEWS
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-imapclient-perl/debian/NEWS?rev=27518&op=diff
==============================================================================
--- trunk/libmail-imapclient-perl/debian/NEWS (original)
+++ trunk/libmail-imapclient-perl/debian/NEWS Sun Nov 30 17:25:37 2008
@@ -5,7 +5,7 @@
   the rewritten upstream source: Use the Socket or RawSocket parameters for
   getting SSL connections.
 
-  For details refer to `man IMAPClient'.
+  For details refer to `man Mail::IMAPClient'.
   
   Cf. also http://rt.cpan.org/Public/Bug/Display.html?id=9256
 

Modified: trunk/libmail-imapclient-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-imapclient-perl/debian/changelog?rev=27518&op=diff
==============================================================================
--- trunk/libmail-imapclient-perl/debian/changelog (original)
+++ trunk/libmail-imapclient-perl/debian/changelog Sun Nov 30 17:25:37 2008
@@ -1,9 +1,19 @@
-libmail-imapclient-perl (3.11-2) UNRELEASED; urgency=low
-
+libmail-imapclient-perl (3.12-1) UNRELEASED; urgency=low
+
+  [ gregor herrmann ]
   * debian/control: Changed: Switched Vcs-Browser field to ViewSVN
     (source stanza).
 
- -- gregor herrmann <gregoa at debian.org>  Sun, 16 Nov 2008 20:44:27 +0100
+  [ Ansgar Burchardt ]
+  * New upstream release.
+  * Add myself to Uploaders.
+  * debian/NEWS: Correct reference to Mail::IMAPClient man page.
+  * Convert debian/copyright to proposed machine-readable format.
+  * debian/copyright: Do not mention Debian Perl Group as copyright holder for
+    the Debian packaging, instead list all individual contributors.
+    The list of contributors was taken from the changelog.
+
+ -- Ansgar Burchardt <ansgar at 43-1.org>  Sun, 30 Nov 2008 18:09:52 +0100
 
 libmail-imapclient-perl (3.11-1) unstable; urgency=low
 

Modified: trunk/libmail-imapclient-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-imapclient-perl/debian/control?rev=27518&op=diff
==============================================================================
--- trunk/libmail-imapclient-perl/debian/control (original)
+++ trunk/libmail-imapclient-perl/debian/control Sun Nov 30 17:25:37 2008
@@ -4,7 +4,8 @@
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Gunnar Wolf <gwolf at debian.org>,
  Niko Tyni <ntyni at debian.org>, Russ Allbery <rra at debian.org>,
- gregor herrmann <gregoa at debian.org>, Rene Mayorga <rmayorga at debian.org.sv>
+ gregor herrmann <gregoa at debian.org>, Rene Mayorga <rmayorga at debian.org.sv>,
+ Ansgar Burchardt <ansgar at 43-1.org>
 Build-Depends: debhelper (>= 7), quilt (>= 0.40)
 Build-Depends-Indep: perl (>= 5.6.0-17), libparse-recdescent-perl, libtest-pod-perl
 Standards-Version: 3.8.0

Modified: trunk/libmail-imapclient-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-imapclient-perl/debian/copyright?rev=27518&op=diff
==============================================================================
--- trunk/libmail-imapclient-perl/debian/copyright (original)
+++ trunk/libmail-imapclient-perl/debian/copyright Sun Nov 30 17:25:37 2008
@@ -1,53 +1,59 @@
-This is Debian GNU/Linux's prepackaged version of Mail::IMAPClient.
-This is a perl library for manipulating IMAP mail stores
-
-Originally packaged by Michael Alan Dorman <mdorman at debian.org>.  The
-original sources should always be available from the Comprehensive
-Perl Archive Network (CPAN). Visit <URL:http://www.perl.com/CPAN/> to
-find a CPAN site near you.
-
-The generic upstream URL is
-Homepage: http://search.cpan.org/dist/Mail-IMAPClient/
+Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=226
+Upstream-Name: Mail-IMAPClient
+Upstream-Maintainer: Mark Overmeer
+Upstream-Source: http://search.cpan.org/dist/Mail-IMAPClient/
 
 Files: *
-Copyright: Copyright 1999-2003 The Kernen Group, Inc.
-           Copyright 2007 Mark Overmeer
-           All rights reserved.
-License: GPL-1+|Artistic
+Copyright:
+ © 1999-2003, The Kernen Group, Inc.
+ © 2007,      Mark Overmeer
+ All rights reserved.
+License: GPL-1+ | Artistic
  This program is free software; you can redistribute it and/or modify
  it under the terms of either:
  .
-	a) the "Artistic License" which comes with this Kit, or
+   a) the "Artistic License" which comes with this Kit, or
  .
-	b) the GNU General Public License as published by the Free Software 
-	Foundation; either version 1, or (at your option) any later version.
+   b) the GNU General Public License as published by the Free Software 
+   Foundation; either version 1, or (at your option) any later version.
  .
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See either
  the GNU General Public License or the Artistic License for more details.
+ .
+ On Debian systems, the complete text of the GNU General Public License can be
+ found in /usr/share/common-licenses/GPL and the Artistic license in
+ /usr/share/common-licenses/Artistic.
 
 Files: examples/*
-Copyright: This example and Mail::IMAPClient are Copyright (c) 2003 
- by The Kernen Group, Inc. All rights reserved.
-License: GPL-1+|Artistic
+Copyright:
+ © 2003, The Kernen Group, Inc. All rights reserved.
+License: GPL-1+ | Artistic
  This example is distributed with Mail::IMAPClient and 
  subject to the same licensing requirements as Mail::IMAPClient.
 
 Files: examples/imap_to_mbox.pl
-Copyright: (c) 1999 Thomas Stromberg, Research Triangle Commerce, Inc.
+Copyright:
+ © 1999, Thomas Stromberg, Research Triangle Commerce, Inc.
 License: other
  This software is protected by the BSD License. No rights reserved anyhow. 
  <tstromberg at rtci.com>
 
 Files: debian/*
-Copyright: © 2000-2004 Michael Alan Dorman <mdorman at debian.org>
-           © 2004-2008 Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
+Copyright:
+ © 2000-2004, Michael Alan Dorman <mdorman at debian.org>
+ © 2004,      Joachim Breitner <nomeata at debian.org>
+ © 2004-2008, Gunnar Wolf <gwolf at debian.org>
+ © 2006,      Russ Allbery <rra at debian.org>
+ © 2008,      Roberto C. Sanchez <roberto at debian.org>
+ © 2006-2008, Niko Tyni <ntyni at debian.org>
+ © 2007-2008, Damyan Ivanov
+ © 2008,      Peter Pentchev
+ © 2008,      gregor herrmann <gregoa at debian.org>
+ © 2008,      Rene Mayorga <rmayorga at debian.org.sv>
+ © 2008,      Ansgar Burchardt <ansgar at 43-1.org>
 License: other
  It is assumed that package maintainers have licensed their work under terms
  compatible with upstream licensing terms.
 
-Perl is distributed under your choice of the GNU General Public License or
-the Artistic License.  On Debian GNU/Linux systems, the complete text of the
-GNU General Public License can be found in `/usr/share/common-licenses/GPL'
-and the Artistic Licence in `/usr/share/common-licenses/Artistic'.

Modified: trunk/libmail-imapclient-perl/debian/patches/catch_ssl_attribute.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-imapclient-perl/debian/patches/catch_ssl_attribute.patch?rev=27518&op=diff
==============================================================================
--- trunk/libmail-imapclient-perl/debian/patches/catch_ssl_attribute.patch (original)
+++ trunk/libmail-imapclient-perl/debian/patches/catch_ssl_attribute.patch Sun Nov 30 17:25:37 2008
@@ -1,6 +1,6 @@
---- a/lib/Mail/IMAPClient.pm
-+++ b/lib/Mail/IMAPClient.pm
-@@ -205,6 +205,10 @@
+--- libmail-imapclient-perl.orig/lib/Mail/IMAPClient.pm
++++ libmail-imapclient-perl/lib/Mail/IMAPClient.pm
+@@ -210,6 +210,10 @@
          my $v = shift;
          $self->{$k} = $v if defined $v;
      }

Modified: trunk/libmail-imapclient-perl/lib/Mail/IMAPClient.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-imapclient-perl/lib/Mail/IMAPClient.pm?rev=27518&op=diff
==============================================================================
--- trunk/libmail-imapclient-perl/lib/Mail/IMAPClient.pm (original)
+++ trunk/libmail-imapclient-perl/lib/Mail/IMAPClient.pm Sun Nov 30 17:25:37 2008
@@ -2,7 +2,7 @@
 use strict;
 
 package Mail::IMAPClient;
-our $VERSION = '3.11';
+our $VERSION = '3.12';
 
 use Mail::IMAPClient::MessageSet;
 
@@ -21,15 +21,20 @@
 use MIME::Base64;
 use File::Spec  ();
 
-use constant Unconnected   => 0;
-use constant Connected     => 1; # connected; not logged in
-use constant Authenticated => 2; # logged in; no mailbox selected
-use constant Selected      => 3; # mailbox selected
-
-use constant INDEX         => 0; # Array index for output line number
-use constant TYPE          => 1; # Array index for line type
-                                 #    (either OUTPUT, INPUT, or LITERAL)
-use constant DATA          => 2; # Array index for output line data
+use constant APPEND_BUFFER_SIZE => 1024 * 1024;
+
+use constant
+  { Unconnected   => 0
+  , Connected     => 1 # connected; not logged in
+  , Authenticated => 2 # logged in; no mailbox selected
+  , Selected      => 3 # mailbox selected
+  };
+
+use constant
+  { INDEX         => 0 # Array index for output line number
+  , TYPE          => 1 # Array index for line type (OUTPUT, INPUT, or LITERAL)
+  , DATA          => 2 # Array index for output line data
+  };
 
 use constant NonFolderArg => 1;  # Value to pass to Massage to
                                  #    indicate non-folder argument
@@ -2382,7 +2387,7 @@
         return undef;
     }
 
-    my $fh = IO::File->new($file);
+    my $fh = IO::File->new($file, 'rb');
     unless($fh)
     {   $self->LastError("Unable to open $file: $!");
         return undef;
@@ -2394,7 +2399,10 @@
         $date = qq{"$f" };
     }
 
-    my $bare_nl_count = grep m/^\n$|[^\r]\n$/, <$fh>;
+    my $bare_nl_count = 0;
+    while(<$fh>)                 # do no read the whole file at once!
+    {   $bare_nl_count++ if m/^\n$|[^\r]\n$/;
+    }
 
     seek($fh,0,0);
 
@@ -2438,38 +2446,23 @@
         }
     }
 
-    # Slurp up headers: later we'll make this more efficient I guess
-
-    local $/ = "\r\n\r\n";
-    my $text = <$fh>;
-
-    $text =~ s/\r?\n/\r\n/g;
-    $self->_record($count, [$self->_next_index($count),"INPUT","{From $file}"]);
-
-    unless($self->_send_line($text))
-    {   $self->LastError("Error sending append msg text to IMAP: $!");
-        $fh->close;
-        return undef;
-    }
-    $self->_debug("control points to $$control\n") if ref $control;
-
-    $/ = ref $control ? "\n" : $control ? $control : "\n";
-    while(defined($text = <$fh>))
-    {   $text =~ s/\r?\n/\r\n/g;
-        $self->_record($count,
-            [ $self->_next_index($count), "INPUT", "{from $file}"]);
-
-        unless($self->_send_line($text,1))
-        {   $self->LastError("Error sending append msg text to IMAP: $!");
-            $fh->close;
-            return undef;
-        }
-    }
-
-    unless($self->_send_line("\r\n"))
-    {   $self->LastError("Error sending append msg text to IMAP: $!");
-        $fh->close;
-        return undef;
+    # Now send the message itself
+    local $/ = ref $control ? "\n" : $control ? $control : "\n";
+    my $buffer;
+
+    while($fh->sysread($buffer, APPEND_BUFFER_SIZE))
+    {    $buffer =~ s/\A\n/\r\n/;
+         $buffer =~ s/(?<![^\r])\n/\r\n/g;
+
+         $self->_record( $count, [ $self->_next_index($count), "INPUT"
+                                 , '{'.length($buffer)." bytes from $file}" ] );
+
+         my $bytes_written = $self->_send_line($buffer, 1);
+         unless($bytes_written)
+         {    $self->LastError("Error sending append msg text to IMAP: $!");
+              $fh->close;
+              return undef;
+         }
     }
 
     # Now for the crucial test: Did the append work or not?




More information about the Pkg-perl-cvs-commits mailing list