r65890 - in /branches/upstream/libnet-imap-simple-perl/current: Changes MANIFEST META.yml Simple.pm Simple.pod t/16_exotic_flags.t t/CanFlag.pm t/test_server.pm
ansgar at users.alioth.debian.org
ansgar at users.alioth.debian.org
Thu Dec 16 12:47:24 UTC 2010
Author: ansgar
Date: Thu Dec 16 12:47:12 2010
New Revision: 65890
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=65890
Log:
[svn-upgrade] new version libnet-imap-simple-perl (1.2019)
Added:
branches/upstream/libnet-imap-simple-perl/current/t/16_exotic_flags.t
branches/upstream/libnet-imap-simple-perl/current/t/CanFlag.pm
Modified:
branches/upstream/libnet-imap-simple-perl/current/Changes
branches/upstream/libnet-imap-simple-perl/current/MANIFEST
branches/upstream/libnet-imap-simple-perl/current/META.yml
branches/upstream/libnet-imap-simple-perl/current/Simple.pm
branches/upstream/libnet-imap-simple-perl/current/Simple.pod
branches/upstream/libnet-imap-simple-perl/current/t/test_server.pm
Modified: branches/upstream/libnet-imap-simple-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-imap-simple-perl/current/Changes?rev=65890&op=diff
==============================================================================
--- branches/upstream/libnet-imap-simple-perl/current/Changes (original)
+++ branches/upstream/libnet-imap-simple-perl/current/Changes Thu Dec 16 12:47:12 2010
@@ -1,3 +1,9 @@
+1.2019: Wed Dec 01 2010
+ - _process_flags() was a little too aggressive about what's a
+ valid flag and what isn't. Really, it needs to be up to the
+ server. https://rt.cpan.org/Ticket/Display.html?id=63282
+ - many doc bugs fixed thanks to HM 2k
+
1.2018: Thu Oct 28 2010
- minor bug with the sloppy CRLF code
Thanks go to: http://github.com/marado
Modified: branches/upstream/libnet-imap-simple-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-imap-simple-perl/current/MANIFEST?rev=65890&op=diff
==============================================================================
--- branches/upstream/libnet-imap-simple-perl/current/MANIFEST (original)
+++ branches/upstream/libnet-imap-simple-perl/current/MANIFEST Thu Dec 16 12:47:12 2010
@@ -66,6 +66,7 @@
t/10_list.t
t/11_mailboxes.t
t/15_flags.t
+t/16_exotic_flags.t
t/17_status_and_select.t
t/19_readline_callback.t
t/22_copy_multiple.t
@@ -79,6 +80,7 @@
t/60_fetch_with_grammar.t
t/70_list2range.t
t/Auth.pm
+t/CanFlag.pm
t/Connection.pm
t/Model.pm
t/Shutdown.pm
Modified: branches/upstream/libnet-imap-simple-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-imap-simple-perl/current/META.yml?rev=65890&op=diff
==============================================================================
--- branches/upstream/libnet-imap-simple-perl/current/META.yml (original)
+++ branches/upstream/libnet-imap-simple-perl/current/META.yml Thu Dec 16 12:47:12 2010
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Net-IMAP-Simple
-version: 1.2018
+version: 1.2019
abstract: ~
author:
- Paul Miller <jettero at cpan.org>
Modified: branches/upstream/libnet-imap-simple-perl/current/Simple.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-imap-simple-perl/current/Simple.pm?rev=65890&op=diff
==============================================================================
--- branches/upstream/libnet-imap-simple-perl/current/Simple.pm (original)
+++ branches/upstream/libnet-imap-simple-perl/current/Simple.pm Thu Dec 16 12:47:12 2010
@@ -9,7 +9,7 @@
use IO::Select;
use Net::IMAP::Simple::PipeSocket;
-our $VERSION = "1.2018";
+our $VERSION = "1.2019";
BEGIN {
# I'd really rather the pause/cpan indexers miss this "package"
@@ -619,10 +619,9 @@
sub _process_flags {
my $self = shift;
-
- return grep { m/^\\\w+\z/ }
- map { split m/\s+/, $_ }
- @_;
+ my @ret = map { split m/\s+/, $_ } grep { $_ } @_;
+
+ return @ret;
}
sub put {
Modified: branches/upstream/libnet-imap-simple-perl/current/Simple.pod
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-imap-simple-perl/current/Simple.pod?rev=65890&op=diff
==============================================================================
--- branches/upstream/libnet-imap-simple-perl/current/Simple.pod (original)
+++ branches/upstream/libnet-imap-simple-perl/current/Simple.pod Thu Dec 16 12:47:12 2010
@@ -256,7 +256,7 @@
=item flags
- print "Avaliable server flags: " . join(", ", $imap->flags) . "\n";
+ print "Available server flags: " . join(", ", $imap->flags) . "\n";
This method accepts an optional folder name and returns the current available
server flags as a list, for the selected folder. If no folder name is provided
@@ -390,7 +390,7 @@
optionally specify flags for the mail (e.g. C<\Seen>, C<\Answered>), but they
must start with a slash.
-If C<$msg> is an arrayref, the lines will be printed correctly.
+If C<$message> is an arrayref, the lines will be printed correctly.
=item msg_flags
@@ -596,7 +596,7 @@
print "copied" if $imap->copy( $message_number, $mailbox );
This method copies the message number (or L<sequence set>) in the currently
-selected mailbox to the fold specified in the second argument. Both arguments
+selected mailbox to the folder specified in the second argument. Both arguments
are required. On success this method returns true. Returns false on failure and
the C<errstr()> error handler is set with the error message.
@@ -797,8 +797,8 @@
This function takes a single argument we'll call C<< <x> >> and returns numbers
of messages that were received before C<< <x> >>. If you have L<Date::Manip>
installed (optional), this function will attempt to force the date into the
-format C<%d-%m-%Y> (date-month-year) as RFC3501 requires. If you do not have
-that module, no attempt will be made to coerce your date into the correct
+format C<%d-%b-%Y> (date-monthName-year) as RFC3501 requires. If you do not
+have that module, no attempt will be made to coerce your date into the correct
format.
=item search_since
Added: branches/upstream/libnet-imap-simple-perl/current/t/16_exotic_flags.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-imap-simple-perl/current/t/16_exotic_flags.t?rev=65890&op=file
==============================================================================
--- branches/upstream/libnet-imap-simple-perl/current/t/16_exotic_flags.t (added)
+++ branches/upstream/libnet-imap-simple-perl/current/t/16_exotic_flags.t Thu Dec 16 12:47:12 2010
@@ -1,0 +1,29 @@
+use strict;
+use warnings;
+
+use Test;
+use Net::IMAP::Simple;
+
+plan tests => our $tests = 4;
+
+sub run_tests {
+ open INFC, ">>", "informal-imap-client-dump.log" or die $!;
+
+ my $imap = Net::IMAP::Simple->new('localhost:19795', debug=>\*INFC, use_ssl=>1)
+ or die "\nconnect failed: $Net::IMAP::Simple::errstr\n";
+
+ $imap->login(qw(working login));
+ my $nm = $imap->select('INBOX')
+ or die " failure selecting INBOX: " . $imap->errstr . "\n";
+
+ $imap->put( INBOX => "Subject: test message" );
+ $imap->add_flags(1 => qw($blarg \fluurg ^^carmel^^nugget) );
+
+ my @flags = $imap->msg_flags(1);
+ ok( @flags+0, 3+1 ); # we get \Recent for free
+ ok( (grep {m/blarg/} @flags), 1 );
+ ok( (grep {m/fluurg/} @flags), 1 );
+ ok( (grep {m/carmel/} @flags), 1 );
+}
+
+do "t/test_server.pm" or die "error starting imap server: $!$@";
Added: branches/upstream/libnet-imap-simple-perl/current/t/CanFlag.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-imap-simple-perl/current/t/CanFlag.pm?rev=65890&op=file
==============================================================================
--- branches/upstream/libnet-imap-simple-perl/current/t/CanFlag.pm (added)
+++ branches/upstream/libnet-imap-simple-perl/current/t/CanFlag.pm Thu Dec 16 12:47:12 2010
@@ -1,0 +1,18 @@
+
+# load the module
+use Net::IMAP::Server::Mailbox;
+
+# hack in extra flag support by redefining the method
+
+no warnings 'redefine';
+
+my $old_csf;
+BEGIN { $old_csf = \&Net::IMAP::Server::Mailbox::can_set_flag; }
+sub Net::IMAP::Server::Mailbox::can_set_flag {
+ my ($this, $flag) = @_;
+
+ return 1 if $flag =~ m/^[\w%\$\\\^]\S*$/;
+
+ goto &$old_csf;
+}
+
Modified: branches/upstream/libnet-imap-simple-perl/current/t/test_server.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-imap-simple-perl/current/t/test_server.pm?rev=65890&op=diff
==============================================================================
--- branches/upstream/libnet-imap-simple-perl/current/t/test_server.pm (original)
+++ branches/upstream/libnet-imap-simple-perl/current/t/test_server.pm Thu Dec 16 12:47:12 2010
@@ -115,6 +115,7 @@
# (we don't really care if the above fails...)
use t::Shutdown;
+ use t::CanFlag;
Net::IMAP::Server->new(
port => 19794,
ssl_port => 19795,
More information about the Pkg-perl-cvs-commits
mailing list