r11299 - in /branches/upstream/libmail-imapclient-perl/current: Changes META.yml lib/Mail/IMAPClient.pm lib/Mail/IMAPClient.pod lib/Mail/IMAPClient/BodyStructure.pm lib/Mail/IMAPClient/MessageSet.pm
gregoa-guest at users.alioth.debian.org
gregoa-guest at users.alioth.debian.org
Mon Dec 17 17:09:46 UTC 2007
Author: gregoa-guest
Date: Mon Dec 17 17:09:46 2007
New Revision: 11299
URL: http://svn.debian.org/wsvn/?sc=1&rev=11299
Log:
[svn-upgrade] Integrating new upstream version, libmail-imapclient-perl (3.02)
Modified:
branches/upstream/libmail-imapclient-perl/current/Changes
branches/upstream/libmail-imapclient-perl/current/META.yml
branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient.pm
branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient.pod
branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient/BodyStructure.pm
branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient/MessageSet.pm
Modified: branches/upstream/libmail-imapclient-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libmail-imapclient-perl/current/Changes?rev=11299&op=diff
==============================================================================
--- branches/upstream/libmail-imapclient-perl/current/Changes (original)
+++ branches/upstream/libmail-imapclient-perl/current/Changes Mon Dec 17 17:09:46 2007
@@ -2,6 +2,43 @@
== 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.02: Wed Dec 5 21:33:17 CET 2007
+
+ Fixes:
+
+ - Another attempt to get get FETCH UID right. Patch by [David Golden]
+
+version 3.01: Wed Dec 5 09:55:43 CET 2007
+
+ Changes:
+
+ - removed version number from ::BodyStructure
+
+ Fixes:
+
+ - quote password at login.
+ rt.cpan.org#31035 [Andy Harriston]
+
+ - empty return of flags command should be empty list, not undef.
+ rt.cpan.org#31195 [David Golden]
+
+ - UID command does not work with folder management commands
+ rt.cpan.org#31182 [Robbert Norris]
+
+ - _read_line simplifications avoids timeouts.
+ rt.cpan.org#31221 [Robbert Norris]
+
+ - FETCH did not detect the UID of a message anymore.
+ [David Golden]
+
+ Improvements:
+
+ - proxyauth for SUN/iPlanet/NetScape IMAP servers.
+ patch by rt.cpan.org#31152 [Robbert Norris]
+
+ - use grep in stead of map in one occasion in MessageSet.pm
+ [Yves Orton]
version 3.00: Wed Nov 28 09:56:54 CET 2007
Modified: branches/upstream/libmail-imapclient-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libmail-imapclient-perl/current/META.yml?rev=11299&op=diff
==============================================================================
--- branches/upstream/libmail-imapclient-perl/current/META.yml (original)
+++ branches/upstream/libmail-imapclient-perl/current/META.yml Mon Dec 17 17:09:46 2007
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Mail-IMAPClient
-version: 3.00
+version: 3.02
abstract: IMAP4 client library
license: ~
generated_by: ExtUtils::MakeMaker version 6.36_01
Modified: branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient.pm?rev=11299&op=diff
==============================================================================
--- branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient.pm (original)
+++ branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient.pm Mon Dec 17 17:09:46 2007
@@ -2,7 +2,7 @@
use strict;
package Mail::IMAPClient;
-our $VERSION = '3.00';
+our $VERSION = '3.02';
use Mail::IMAPClient::MessageSet;
@@ -311,6 +311,11 @@
if $auth ne 'LOGIN';
my $passwd = $self->Password;
+ if($passwd =~ m/\W/) # need to quote
+ { $passwd =~ s/(["\\])/\\$1/g;
+ $passwd = qq{"$passwd"};
+ }
+
my $id = $self->User;
$id = qq{"$id"} if $id !~ /^".*"$/;
@@ -319,6 +324,11 @@
$self->State(Authenticated);
$self;
+}
+
+sub proxyauth
+{ my ($self, $user) = @_;
+ $self->_imap_command("PROXYAUTH $user") ? $self->Results : undef;
}
sub separator
@@ -1099,11 +1109,16 @@
}
sub _imap_uid_command
-{ my $self = shift;
- my $cmd = shift;
+{ my ($self, $cmd) = (shift, shift);
my $args = @_ ? join(" ", '', @_) : '';
my $uid = $self->Uid ? 'UID ' : '';
$self->_imap_command("$uid$cmd$args");
+}
+
+sub _imap_plain_command
+{ my ($self, $cmd) = (shift, shift);
+ my $args = @_ ? join(" ", '', @_) : '';
+ $self->_imap_command("$cmd$args");
}
sub run
@@ -1413,29 +1428,8 @@
$self->Fast_io($fast_io) if $fast_io;
- # Now let's make sure there are no IMAP server output lines
- # (i.e. [tag|*] BAD|NO|OK Text) embedded in the literal string
- my $trailer;
- if($iBuffer =~ s/\r?\n((?:\*|\d+)\s(?:BAD|NO|OK)[^\n]*\r?\n\z)//i)
- { $trailer = $1;
- $self->_debug("Got output in literal: $trailer");
- }
-
- $self->_debug("literal includes ')' of FETCH")
- if length $iBuffer
- && $current_line =~ m/\bFETCH\b/i
- && $iBuffer =~ s/\)$//;
-
- if(length $iBuffer)
- { $self->_debug("literal: too much >>$iBuffer<<");
- $litstring .= $iBuffer;
- $iBuffer = '';
- }
-
push @$oBuffer, [$index++, "OUTPUT", $current_line];
push @$oBuffer, [$index++, "LITERAL", $litstring];
- push @$oBuffer, [$index++, "OUTPUT", $trailer]
- if $trailer;
}
}
@@ -1658,7 +1652,7 @@
: $what;
$self->_imap_uid_command(FETCH => $take, @_)
- or return ();
+ or return;
wantarray ? $self->History : $self->Results;
}
@@ -1739,7 +1733,7 @@
{ my ($self, @a) = @_;
delete $self->{Folders};
$a[-1] = $self->Massage($a[-1]) if @a;
- $self->_imap_uid_command(SUBSCRIBE => @a)
+ $self->_imap_plain_command(SUBSCRIBE => @a)
or return undef;
wantarray ? $self->History : $self->Results;
}
@@ -1748,7 +1742,7 @@
{ my ($self, @a) = @_;
delete $self->{Folders};
$a[-1] = $self->Massage($a[-1]) if @a;
- $self->_imap_uid_command(DELETE => @a)
+ $self->_imap_plain_command(DELETE => @a)
or return undef;
wantarray ? $self->History : $self->Results;
}
@@ -1757,7 +1751,7 @@
{ my ($self, @a) = @_;
delete $self->{Folders};
$a[-1] = $self->Massage($a[-1]) if @a;
- $self->_imap_uid_command(MYRIGHTS => @a)
+ $self->_imap_plain_command(MYRIGHTS => @a)
or return undef;
wantarray ? $self->History : $self->Results;
}
@@ -1766,7 +1760,7 @@
{ my ($self, @a) = @_;
delete $self->{Folders};
$a[0] = $self->Massage($a[0]) if @a;
- $self->_imap_uid_command(CREATE => @a)
+ $self->_imap_plain_command(CREATE => @a)
or return undef;
wantarray ? $self->History : $self->Results;
}
@@ -1774,7 +1768,7 @@
sub close
{ my $self = shift;
delete $self->{Folders};
- $self->_imap_uid_command('CLOSE')
+ $self->_imap_plain_command('CLOSE')
or return undef;
wantarray ? $self->History : $self->Results;
}
@@ -1839,7 +1833,7 @@
# Send command
$self->fetch($msg, "FLAGS")
- or return undef;
+ or return;
my $u_f = $self->Uid;
my $flagset = {};
@@ -1883,16 +1877,6 @@
grep { $sup->{ /^\\(\S+)/ ? lc $1 : ()} } @_;
}
-# parse_headers modified to allow second param to also be a
-# reference to a list of numbers. If this is a case, the headers
-# are read from all the specified messages, and a reference to
-# an hash of mail numbers to references to hashes, are returned.
-# I found, with a mailbox of 300 messages, this was
-# *significantly* faster against our mailserver (< 1 second
-# vs. 20 seconds)
-#
-# 2000-03-22 Adrian Smith (adrian.smith at ucpag.com)
-
sub parse_headers
{ my ($self, $msgspec, @fields) = @_;
my $fields = join ' ', @fields;
@@ -1912,10 +1896,12 @@
foreach my $header (map {split /\r?\n/} @raw)
{
- if($header =~ s/^(?:\*|UID) \s+ (\d+) \s+ FETCH \s+
- \( .*? BODY\[HEADER (?:\.FIELDS)? .*? \]\s*//ix)
+ if($header =~ s/^\* \s+ (\d+) \s+ FETCH \s+
+ \( (.*?) BODY\[HEADER (?:\.FIELDS)? .*? \]\s*//ix)
{ # start new message header
- $h = $headers{$1} = {};
+ my ($msgid, $msgattrs) = ($1, $2);
+ $msgid = $1 if $self->Uid && $msgattrs =~ m/\b UID \s+ (\d+)/x;
+ $h = $headers{$msgid} = {};
}
$header =~ /\S/ or next;
@@ -2209,7 +2195,7 @@
return undef;
}
- my $got = $self->_imap_command("NAMESPACE") or return ();
+ my $got = $self->_imap_command("NAMESPACE") or return;
my @namespaces = map { /^\* NAMESPACE (.*)/ ? $1 : () }
$got->Results;
Modified: branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient.pod
URL: http://svn.debian.org/wsvn/branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient.pod?rev=11299&op=diff
==============================================================================
--- branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient.pod (original)
+++ branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient.pod Mon Dec 17 17:09:46 2007
@@ -1594,7 +1594,13 @@
is sometimes called automatically by L<new>. You can predict this
behavior once you've read the section on the L<new> method.
-=cut
+Then Sun/iPlanet/Netscape IMAP servers to allow an administrative user to
+masquerade as another user. The B<proxyauth> method uses the IMAP
+PROXYAUTH client command provided like this:
+
+ $imap->login("admin", "password");
+ $imap->proxyauth("someuser");
+
=head2 logout
@@ -3344,7 +3350,7 @@
=head2 Socket
-B<PLEASE NOT>
+B<PLEASE NOTE>
The semantics of this method has changed as of version 2.99_04 of this module.
If you need the old semantics, you now have to use L<RawSocket>.
Modified: branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient/BodyStructure.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient/BodyStructure.pm?rev=11299&op=diff
==============================================================================
--- branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient/BodyStructure.pm (original)
+++ branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient/BodyStructure.pm Mon Dec 17 17:09:46 2007
@@ -2,8 +2,6 @@
use strict;
package Mail::IMAPClient::BodyStructure;
-our $VERSION = '0.0.4';
-
use Mail::IMAPClient::BodyStructure::Parse;
# my has file scope, not limited to package!
Modified: branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient/MessageSet.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient/MessageSet.pm?rev=11299&op=diff
==============================================================================
--- branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient/MessageSet.pm (original)
+++ branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient/MessageSet.pm Mon Dec 17 17:09:46 2007
@@ -26,6 +26,7 @@
sub str { overload::StrVal( ${$_[0]} ) }
sub _unfold_range($)
+# { my $x = shift; return if $x =~ m/[^0-9,:]$/; $x =~ s/\:/../g; eval $x; }
{ map { /(\d+)\s*\:\s*(\d+)/ ? ($1..$2) : $_ }
split /\,/, shift;
}
@@ -33,7 +34,7 @@
sub rem
{ my $self = shift;
my %delete = map { ($_ => 1) } map { _unfold_range $_ } @_;
- $$self = $self->range(map {$delete{$_} ? () : $_ } $self->unfold);
+ $$self = $self->range(grep {not $delete{$_}} $self->unfold);
$self;
}
More information about the Pkg-perl-cvs-commits
mailing list