r67519 - in /trunk/libnet-imap-client-perl: Changes META.yml debian/changelog lib/Net/IMAP/Client.pm lib/Net/IMAP/Client/MsgSummary.pm

periapt-guest at users.alioth.debian.org periapt-guest at users.alioth.debian.org
Tue Jan 18 22:46:58 UTC 2011


Author: periapt-guest
Date: Tue Jan 18 22:46:49 2011
New Revision: 67519

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=67519
Log:
New upstream release

Modified:
    trunk/libnet-imap-client-perl/Changes
    trunk/libnet-imap-client-perl/META.yml
    trunk/libnet-imap-client-perl/debian/changelog
    trunk/libnet-imap-client-perl/lib/Net/IMAP/Client.pm
    trunk/libnet-imap-client-perl/lib/Net/IMAP/Client/MsgSummary.pm

Modified: trunk/libnet-imap-client-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-imap-client-perl/Changes?rev=67519&op=diff
==============================================================================
--- trunk/libnet-imap-client-perl/Changes (original)
+++ trunk/libnet-imap-client-perl/Changes Tue Jan 18 22:46:49 2011
@@ -1,4 +1,20 @@
 Revision history for Net-IMAP-Client
+
+0.94    Dec 22, 2010
+
+        - fix #56647 rfc822 attachment mishandling
+        - fix #43046 Does not strip \r from error messages
+        - fix #59462, #43047 creation of non-modifiable array attempted
+        - fix #43049 append() method's documentation
+        - fix status(): avoid returning data from undef key
+
+0.93    
+        - add namespace() method
+        - modify get_summaries() to always return array ref
+
+0.92    Feb 28, 2009
+
+        - Doc updates
 
 0.91    Feb 27, 2009
 

Modified: trunk/libnet-imap-client-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-imap-client-perl/META.yml?rev=67519&op=diff
==============================================================================
--- trunk/libnet-imap-client-perl/META.yml (original)
+++ trunk/libnet-imap-client-perl/META.yml Tue Jan 18 22:46:49 2011
@@ -1,20 +1,28 @@
 --- #YAML:1.0
-name:                Net-IMAP-Client
-version:             0.93
-abstract:            Not so simple IMAP client library
-license:             ~
-author:              
+name:               Net-IMAP-Client
+version:            0.94
+abstract:           Not so simple IMAP client library
+author:
     - Mihai Bazon <mihai.bazon at gmail.com>
-generated_by:        ExtUtils::MakeMaker version 6.42
-distribution_type:   module
-requires:     
-    Encode:                        0
-    Encode::MIME::Header:          0
-    IO::Socket::INET:              0
-    IO::Socket::SSL:               0
-    List::MoreUtils:               0
-    List::Util:                    0
-    Test::More:                    0
+license:            unknown
+distribution_type:  module
+configure_requires:
+    ExtUtils::MakeMaker:  0
+build_requires:
+    ExtUtils::MakeMaker:  0
+requires:
+    Encode:               0
+    Encode::MIME::Header:  0
+    IO::Socket::INET:     0
+    IO::Socket::SSL:      0
+    List::MoreUtils:      0
+    List::Util:           0
+    Test::More:           0
+no_index:
+    directory:
+        - t
+        - inc
+generated_by:       ExtUtils::MakeMaker version 6.55_02
 meta-spec:
-    url:     http://module-build.sourceforge.net/META-spec-v1.3.html
-    version: 1.3
+    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
+    version:  1.4

Modified: trunk/libnet-imap-client-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-imap-client-perl/debian/changelog?rev=67519&op=diff
==============================================================================
--- trunk/libnet-imap-client-perl/debian/changelog (original)
+++ trunk/libnet-imap-client-perl/debian/changelog Tue Jan 18 22:46:49 2011
@@ -1,12 +1,13 @@
-libnet-imap-client-perl (0.93-3) UNRELEASED; urgency=low
+libnet-imap-client-perl (0.94-1) UNRELEASED; urgency=low
 
   [ gregor herrmann ]
   * debian/rules: switch order of arguments to dh.
 
   [ Nicholas Bamber ]
   * Added myself to Uploaders 
+  * New upstream release
 
- -- gregor herrmann <gregoa at debian.org>  Wed, 28 Jul 2010 14:33:03 -0400
+ -- Nicholas Bamber <nicholas at periapt.co.uk>  Tue, 18 Jan 2011 22:48:07 +0000
 
 libnet-imap-client-perl (0.93-2) unstable; urgency=low
 

Modified: trunk/libnet-imap-client-perl/lib/Net/IMAP/Client.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-imap-client-perl/lib/Net/IMAP/Client.pm?rev=67519&op=diff
==============================================================================
--- trunk/libnet-imap-client-perl/lib/Net/IMAP/Client.pm (original)
+++ trunk/libnet-imap-client-perl/lib/Net/IMAP/Client.pm Tue Jan 18 22:46:49 2011
@@ -1,7 +1,7 @@
 package Net::IMAP::Client;
 
 use vars qw[$VERSION];
-$VERSION = '0.93';
+$VERSION = '0.94';
 
 use strict;
 use warnings;
@@ -139,7 +139,9 @@
             $ret{$name} = \%tmp;
         }
     }
-    return $wants_one ? $ret{$name} : \%ret;
+    return $wants_one 
+        ? (defined $name and $ret{$name})  # avoid data on undef key
+        : \%ret;
 }
 
 sub select {
@@ -452,6 +454,8 @@
 
 sub append {
     my ($self, $folder, $rfc822, $flags, $date) = @_;
+    die 'message body passed to append() must be a SCALAR reference'
+        unless ref $rfc822 eq 'SCALAR';
     my $quoted = $folder;
     _string_quote($quoted);
     my $args = [ "$quoted " ];
@@ -577,6 +581,7 @@
 
 sub last_error {
     my ($self) = @_;
+    $self->{_error} =~ s/\s+$//s; # remove trailing carriage return
     return $self->{_error};
 }
 
@@ -709,7 +714,7 @@
         return 1;
     } elsif ($res =~ /^NIC$id\s+(?:NO|BAD)(?:\s+(.+))?/i) {
         my $error = $1 || 'unknown error';
-	$self->{_error} = $error;
+        $self->{_error} = $error;
         return 0;
     }
     return undef;
@@ -758,15 +763,21 @@
         redo RETRY1 if $self->_reconnect_if_needed;
     }
 
-    $lineparts = [];
+    $lineparts = [];      # holds results in boxes
+    my $accumulator = []; # box for collecting results
     while ($res = $self->_socket_getline) {
         # print STDERR ">>>>$res<<<<<\n";
+
         if ($res =~ /^\*/) {
-            push @$lineparts, []; # this is a new line interesting in itself
+
+            # store previous box and start a new one
+
+            push @$lineparts, $accumulator if @$accumulator;
+            $accumulator = []; 
         }
         if ($res =~ /(.*)\{(\d+)\}\r\n/) {
             my ($line, $len) = ($1, $2 + 0);
-            push @{$lineparts->[-1]},
+            push @$accumulator,
               $line,
                 $self->_read_literal($len);
         } else {
@@ -774,10 +785,13 @@
             if (defined($ok)) {
                 last;
             } else {
-                push @{$lineparts->[-1]}, $res;
+                push @$accumulator, $res;
             }
         }
     }
+    # store last box
+    push @$lineparts, $accumulator if @$accumulator;
+
     unless (defined $res) {
         goto RETRY1 if $self->_reconnect_if_needed(1);
     }
@@ -835,15 +849,17 @@
     %results = ();
     for (0..$#cmd) {
         my $lineparts = [];
+        my $accumulator = [];
         my $res;
         while ($res = $self->_socket_getline) {
             # print STDERR "2: $res";
             if ($res =~ /^\*/) {
-                push @$lineparts, []; # this is a new line interesting in itself
+                push @$lineparts, $accumulator if @$accumulator;
+                $accumulator = []; 
             }
             if ($res =~ /(.*)\{(\d+)\}\r\n/) {
                 my ($line, $len) = ($1, $2);
-                push @{$lineparts->[-1]},
+                push @$accumulator,
                   $line,
                     $self->_read_literal($len);
             } else {
@@ -852,10 +868,11 @@
                     $results{$cmdid} = [ $ok, $lineparts, $error ];
                     last;
                 } else {
-                    push @{$lineparts->[-1]}, $res;
+                    push @$accumulator, $res;
                 }
             }
         }
+        push @$lineparts, $accumulator if @$accumulator;
         unless (defined $res) {
             goto RETRY2 if $self->_reconnect_if_needed(1);
         }
@@ -929,7 +946,7 @@
                 push @{$stack[-1]}, $str; # found string
             } elsif ($text =~ m/\G(\d+)/gc) {
                 push @{$stack[-1]}, $1 + 0; # found numeric
-            } elsif ($text =~ m/\G([a-zA-Z0-9_\$\\.+\/*-]+)/gc) {
+            } elsif ($text =~ m/\G([a-zA-Z0-9_\$\\.+\/*&-]+)/gc) {
                 my $atom = $1;
                 if (lc $atom eq 'nil') {
                     $atom = undef;
@@ -1736,7 +1753,7 @@
 on "EXISTS" to tell when new messages have arrived.  Therefore I can
 only say that "RECENT" is useless and I advise you to ignore it.
 
-=head2 append($folder, $rfc822, $flags, $date)
+=head2 append($folder, \$rfc822, $flags, $date)
 
 Appends a message to the given C<$folder>.  You must pass the full
 RFC822 body in C<$rfc822>.  C<$flags> and C<$date> are optional.  If

Modified: trunk/libnet-imap-client-perl/lib/Net/IMAP/Client/MsgSummary.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-imap-client-perl/lib/Net/IMAP/Client/MsgSummary.pm?rev=67519&op=diff
==============================================================================
--- trunk/libnet-imap-client-perl/lib/Net/IMAP/Client/MsgSummary.pm (original)
+++ trunk/libnet-imap-client-perl/lib/Net/IMAP/Client/MsgSummary.pm Tue Jan 18 22:46:49 2011
@@ -164,6 +164,8 @@
 }
 
 sub is_message { $_[0]->content_type eq 'message/rfc822' }
+
+sub message { $_[0]->{message} }
 
 sub _parse_body {
     my ($self, $struct) = @_;
@@ -192,8 +194,10 @@
 
         if ($self->is_message && $struct->[7] && $struct->[8]) {
             # continue parsing attached message
-            $self->_parse_envelope($struct->[7]);
-            $self->_parse_body($struct->[8]);
+            $self->{message} = __PACKAGE__->new({
+                ENVELOPE => $struct->[7],
+                BODY => $struct->[8],
+            });
         }
     }
 }
@@ -235,8 +239,10 @@
 
         if ($self->is_message && $struct->[7] && $struct->[8]) {
             # continue parsing attached message
-            $self->_parse_envelope($struct->[7]);
-            $self->_parse_bodystructure($struct->[8]);
+            $self->{message} = __PACKAGE__->new({
+                ENVELOPE => $struct->[7],
+                BODYSTRUCTURE => $struct->[8],
+            });
         } elsif ($self->type ne 'text') {
             $self->{md5} = $struct->[7];
             my $a = $struct->[8];
@@ -528,6 +534,10 @@
 the toplevel part, but you B<know> that that part represents a
 message. ;-)
 
+=item C<message>
+
+Returns the attached rfc822 message
+
 =item C<headers>
 
 Returns (unparsed, as plain text) additional message headers if they




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