r63584 - in /branches/upstream/libemail-sender-transport-smtp-tls-perl/current: Changes LICENSE MANIFEST META.yml Makefile.PL README dist.ini lib/Email/Sender/Transport/SMTP/TLS.pm t/release-pod-syntax.t

ivan at users.alioth.debian.org ivan at users.alioth.debian.org
Mon Oct 11 10:19:11 UTC 2010


Author: ivan
Date: Mon Oct 11 10:18:50 2010
New Revision: 63584

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=63584
Log:
[svn-upgrade] new version libemail-sender-transport-smtp-tls-perl (0.07)

Modified:
    branches/upstream/libemail-sender-transport-smtp-tls-perl/current/Changes
    branches/upstream/libemail-sender-transport-smtp-tls-perl/current/LICENSE
    branches/upstream/libemail-sender-transport-smtp-tls-perl/current/MANIFEST
    branches/upstream/libemail-sender-transport-smtp-tls-perl/current/META.yml
    branches/upstream/libemail-sender-transport-smtp-tls-perl/current/Makefile.PL
    branches/upstream/libemail-sender-transport-smtp-tls-perl/current/README
    branches/upstream/libemail-sender-transport-smtp-tls-perl/current/dist.ini
    branches/upstream/libemail-sender-transport-smtp-tls-perl/current/lib/Email/Sender/Transport/SMTP/TLS.pm
    branches/upstream/libemail-sender-transport-smtp-tls-perl/current/t/release-pod-syntax.t

Modified: branches/upstream/libemail-sender-transport-smtp-tls-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-sender-transport-smtp-tls-perl/current/Changes?rev=63584&op=diff
==============================================================================
--- branches/upstream/libemail-sender-transport-smtp-tls-perl/current/Changes (original)
+++ branches/upstream/libemail-sender-transport-smtp-tls-perl/current/Changes Mon Oct 11 10:18:50 2010
@@ -1,4 +1,14 @@
 Revision history for Email-Sender-Transport-SMTP-TLS
+
+0.07    2010.09.22
+        fix SYNOPSIS POD
+
+0.06    2010.09.21
+        remove debug warnings
+
+0.05    2010.09.21
+        fix 'Deprecation warning' (reported by Egor)
+        document updates
 
 0.04    2009.11.24
         fix test warnings (GAURAV) (RT 52023)

Modified: branches/upstream/libemail-sender-transport-smtp-tls-perl/current/LICENSE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-sender-transport-smtp-tls-perl/current/LICENSE?rev=63584&op=diff
==============================================================================
--- branches/upstream/libemail-sender-transport-smtp-tls-perl/current/LICENSE (original)
+++ branches/upstream/libemail-sender-transport-smtp-tls-perl/current/LICENSE Mon Oct 11 10:18:50 2010
@@ -1,9 +1,9 @@
-This software is copyright (c) 2009 by Fayland Lam.
+This software is copyright (c) 2010 by Fayland Lam.
 
 This is free software; you can redistribute it and/or modify it under
-the same terms as perl itself.
-
-Terms of Perl itself
+the same terms as the Perl 5 programming language system itself.
+
+Terms of the Perl programming language system itself
 
 a) the GNU General Public License as published by the Free
    Software Foundation; either version 1, or (at your option) any
@@ -12,7 +12,7 @@
 
 --- The GNU General Public License, Version 1, February 1989 ---
 
-This software is Copyright (c) 2009 by Fayland Lam.
+This software is Copyright (c) 2010 by Fayland Lam.
 
 This is free software, licensed under:
 
@@ -270,7 +270,7 @@
 
 --- The Artistic License 1.0 ---
 
-This software is Copyright (c) 2009 by Fayland Lam.
+This software is Copyright (c) 2010 by Fayland Lam.
 
 This is free software, licensed under:
 

Modified: branches/upstream/libemail-sender-transport-smtp-tls-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-sender-transport-smtp-tls-perl/current/MANIFEST?rev=63584&op=diff
==============================================================================
--- branches/upstream/libemail-sender-transport-smtp-tls-perl/current/MANIFEST (original)
+++ branches/upstream/libemail-sender-transport-smtp-tls-perl/current/MANIFEST Mon Oct 11 10:18:50 2010
@@ -9,4 +9,4 @@
 t/00-load.t
 t/pod.t
 t/release-pod-coverage.t
-t/release-pod-syntax.t
+t/release-pod-syntax.t

Modified: branches/upstream/libemail-sender-transport-smtp-tls-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-sender-transport-smtp-tls-perl/current/META.yml?rev=63584&op=diff
==============================================================================
--- branches/upstream/libemail-sender-transport-smtp-tls-perl/current/META.yml (original)
+++ branches/upstream/libemail-sender-transport-smtp-tls-perl/current/META.yml Mon Oct 11 10:18:50 2010
@@ -2,15 +2,19 @@
 abstract: 'Email::Sender with L<Net::SMTP::TLS> (Eg. Gmail)'
 author:
   - 'Fayland Lam <fayland at gmail.com>'
-generated_by: 'Dist::Zilla version 1.093250'
+build_requires: {}
+configure_requires:
+  ExtUtils::MakeMaker: 6.31
+dynamic_config: 0
+generated_by: 'Dist::Zilla version 4.102340, CPAN::Meta::Converter version 2.102400'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
   version: 1.4
 name: Email-Sender-Transport-SMTP-TLS
 requires:
-  Email::Sender: 0.093110
+  Email::Sender: 0.102370
   Net::SMTP::TLS: 0
 resources:
   repository: http://github.com/fayland/email-sender-transport-smtp-tls
-version: 0.04
+version: 0.07

Modified: branches/upstream/libemail-sender-transport-smtp-tls-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-sender-transport-smtp-tls-perl/current/Makefile.PL?rev=63584&op=diff
==============================================================================
--- branches/upstream/libemail-sender-transport-smtp-tls-perl/current/Makefile.PL (original)
+++ branches/upstream/libemail-sender-transport-smtp-tls-perl/current/Makefile.PL Mon Oct 11 10:18:50 2010
@@ -4,20 +4,49 @@
 
 
 
-use ExtUtils::MakeMaker;
+use ExtUtils::MakeMaker 6.31;
 
-WriteMakefile(
-  DISTNAME  => 'Email-Sender-Transport-SMTP-TLS',
-  NAME      => 'Email::Sender::Transport::SMTP::TLS',
-  AUTHOR    => "Fayland\ Lam\ \<fayland\@gmail\.com\>",
-  ABSTRACT  => "Email\:\:Sender\ with\ L\<Net\:\:SMTP\:\:TLS\>\ \(Eg\.\ Gmail\)",
-  VERSION   => '0.04',
-  EXE_FILES => [ qw() ],
-  (eval { ExtUtils::MakeMaker->VERSION(6.31) } ? (LICENSE => 'perl') : ()),
-  PREREQ_PM    => {
-    "Email::Sender" => '0.093110',
-    "Net::SMTP::TLS" => '0',
+
+
+my %WriteMakefileArgs = (
+  'ABSTRACT' => 'Email::Sender with L<Net::SMTP::TLS> (Eg. Gmail)',
+  'AUTHOR' => 'Fayland Lam <fayland at gmail.com>',
+  'BUILD_REQUIRES' => {},
+  'CONFIGURE_REQUIRES' => {
+    'ExtUtils::MakeMaker' => '6.31'
   },
-  test => {TESTS => 't/*.t'}
+  'DISTNAME' => 'Email-Sender-Transport-SMTP-TLS',
+  'EXE_FILES' => [],
+  'LICENSE' => 'perl',
+  'NAME' => 'Email::Sender::Transport::SMTP::TLS',
+  'PREREQ_PM' => {
+    'Email::Sender' => '0.102370',
+    'Net::SMTP::TLS' => '0'
+  },
+  'VERSION' => '0.07',
+  'test' => {
+    'TESTS' => 't/*.t'
+  }
 );
 
+
+unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
+  my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
+  my $pp = $WriteMakefileArgs{PREREQ_PM};
+  for my $mod ( keys %$br ) {
+    if ( exists $pp->{$mod} ) {
+      $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
+    }
+    else {
+      $pp->{$mod} = $br->{$mod};
+    }
+  }
+}
+
+delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
+  unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
+
+WriteMakefile(%WriteMakefileArgs);
+
+
+

Modified: branches/upstream/libemail-sender-transport-smtp-tls-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-sender-transport-smtp-tls-perl/current/README?rev=63584&op=diff
==============================================================================
--- branches/upstream/libemail-sender-transport-smtp-tls-perl/current/README (original)
+++ branches/upstream/libemail-sender-transport-smtp-tls-perl/current/README Mon Oct 11 10:18:50 2010
@@ -3,20 +3,22 @@
     (Eg. Gmail)
 
 VERSION
-    version 0.04
+    version 0.07
 
 SYNOPSIS
+        use Email::Sender::Simple qw(sendmail);
         use Email::Sender::Transport::SMTP::TLS;
+        use Try::Tiny;
 
-        my $sender = Email::Sender::Transport::SMTP::TLS->new(
+        my $transport = Email::Sender::Transport::SMTP::TLS->new(
             host => 'smtp.gmail.com',
             port => 587,
             username => 'username at gmail.com',
             password => 'password',
             helo => 'fayland.org',
         );
-    
-        #   my $message = Mail::Message->read($rfc822)
+        
+    # my $message = Mail::Message->read($rfc822)
         #         || Email::Simple->new($rfc822)
         #         || Mail::Internet->new([split /\n/, $rfc822])
         #         || ...
@@ -32,20 +34,18 @@
             ],
             body => 'Content.',
         );
-    
-        eval {
-            $sender->send($message, {
-                from => 'username at gmail.com',
-                to   => [ 'to at mail.com' ],
-            } );
+        
+    try {
+            sendmail($message, { transport => $transport });
+        } catch {
+            die "Error sending email: $_";
         };
-        die "Error sending email: $@" if $@;
 
 DESCRIPTION
     Email::Sender replaces the old and sometimes problematic Email::Send
     library, while this module replaces the Email::Send::SMTP::TLS.
 
-    It's still alpha. use it at your own risk!
+    It is still alpha, but it works. use it at your own risk!
 
   ATTRIBUTES
     The following attributes may be passed to the constructor:
@@ -64,11 +64,11 @@
     that module's documentation.
 
 AUTHOR
-      Fayland Lam <fayland at gmail.com>
+    Fayland Lam <fayland at gmail.com>
 
 COPYRIGHT AND LICENSE
-    This software is copyright (c) 2009 by Fayland Lam.
+    This software is copyright (c) 2010 by Fayland Lam.
 
     This is free software; you can redistribute it and/or modify it under
-    the same terms as perl itself.
+    the same terms as the Perl 5 programming language system itself.
 

Modified: branches/upstream/libemail-sender-transport-smtp-tls-perl/current/dist.ini
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-sender-transport-smtp-tls-perl/current/dist.ini?rev=63584&op=diff
==============================================================================
--- branches/upstream/libemail-sender-transport-smtp-tls-perl/current/dist.ini (original)
+++ branches/upstream/libemail-sender-transport-smtp-tls-perl/current/dist.ini Mon Oct 11 10:18:50 2010
@@ -1,5 +1,5 @@
 name    = Email-Sender-Transport-SMTP-TLS
-version = 0.04
+version = 0.07
 author = Fayland Lam <fayland at gmail.com>
 license = Perl_5
 copyright_holder = Fayland Lam
@@ -7,5 +7,5 @@
 [@FAYLAND]
 
 [Prereq]
-Email::Sender = 0.093110
+Email::Sender = 0.102370
 Net::SMTP::TLS = 0

Modified: branches/upstream/libemail-sender-transport-smtp-tls-perl/current/lib/Email/Sender/Transport/SMTP/TLS.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-sender-transport-smtp-tls-perl/current/lib/Email/Sender/Transport/SMTP/TLS.pm?rev=63584&op=diff
==============================================================================
--- branches/upstream/libemail-sender-transport-smtp-tls-perl/current/lib/Email/Sender/Transport/SMTP/TLS.pm (original)
+++ branches/upstream/libemail-sender-transport-smtp-tls-perl/current/lib/Email/Sender/Transport/SMTP/TLS.pm Mon Oct 11 10:18:50 2010
@@ -1,10 +1,12 @@
 package Email::Sender::Transport::SMTP::TLS;
-our $VERSION = '0.04';
+
+BEGIN {
+    $Email::Sender::Transport::SMTP::TLS::VERSION = '0.07';
+}
 
 # ABSTRACT: Email::Sender with L<Net::SMTP::TLS> (Eg. Gmail)
 
-use Moose;
-with 'Email::Sender::Transport' => { excludes => 'allow_partial_success' };
+use Moose 0.90;
 
 use Net::SMTP::TLS;
 use Email::Sender::Failure::Multi;
@@ -102,19 +104,22 @@
         );
     }
 
+    my $message;
     eval {
         $smtp->data();
         $smtp->datasend( $email->as_string );
         $smtp->dataend;
+        $message = $smtp->message;
         $smtp->quit;
     };
 
     # ignore $@
 
     # XXX: We must report partial success (failures) if applicable.
-    return $self->success unless @failures;
-    return Email::Sender::Success::Partial->new(
+    return $self->success( { message => $message } ) unless @failures;
+    return $self->partial_success(
         {
+            message => $message,
             failure => Email::Sender::Failure::Multi->new(
                 {
                     message  => 'some recipients were rejected during RCPT',
@@ -125,6 +130,33 @@
     );
 }
 
+my %SUCCESS_CLASS;
+
+BEGIN {
+    $SUCCESS_CLASS{FULL} = Moose::Meta::Class->create_anon_class(
+        superclasses => ['Email::Sender::Success'],
+        roles        => ['Email::Sender::Role::HasMessage'],
+        cache        => 1,
+    );
+    $SUCCESS_CLASS{PARTIAL} = Moose::Meta::Class->create_anon_class(
+        superclasses => ['Email::Sender::Success::Partial'],
+        roles        => ['Email::Sender::Role::HasMessage'],
+        cache        => 1,
+    );
+}
+
+sub success {
+    my $self    = shift;
+    my $success = $SUCCESS_CLASS{FULL}->name->new(@_);
+}
+
+sub partial_success {
+    my ( $self, @args ) = @_;
+    my $obj = $SUCCESS_CLASS{PARTIAL}->name->new(@args);
+    return $obj;
+}
+
+with 'Email::Sender::Transport';
 __PACKAGE__->meta->make_immutable;
 no Moose;
 1;
@@ -137,13 +169,15 @@
 
 =head1 VERSION
 
-version 0.04
+version 0.07
 
 =head1 SYNOPSIS
 
+    use Email::Sender::Simple qw(sendmail);
     use Email::Sender::Transport::SMTP::TLS;
-
-    my $sender = Email::Sender::Transport::SMTP::TLS->new(
+    use Try::Tiny;
+
+    my $transport = Email::Sender::Transport::SMTP::TLS->new(
         host => 'smtp.gmail.com',
         port => 587,
         username => 'username at gmail.com',
@@ -151,7 +185,7 @@
         helo => 'fayland.org',
     );
     
-    #   my $message = Mail::Message->read($rfc822)
+    # my $message = Mail::Message->read($rfc822)
     #         || Email::Simple->new($rfc822)
     #         || Mail::Internet->new([split /\n/, $rfc822])
     #         || ...
@@ -168,19 +202,17 @@
         body => 'Content.',
     );
     
-    eval {
-        $sender->send($message, {
-            from => 'username at gmail.com',
-            to   => [ 'to at mail.com' ],
-        } );
+    try {
+        sendmail($message, { transport => $transport });
+    } catch {
+        die "Error sending email: $_";
     };
-    die "Error sending email: $@" if $@;
 
 =head1 DESCRIPTION
 
 L<Email::Sender> replaces the old and sometimes problematic L<Email::Send> library, while this module replaces the L<Email::Send::SMTP::TLS>.
 
-It's still alpha. use it at your own risk!
+It is still alpha, but it works. use it at your own risk!
 
 =head2 ATTRIBUTES
 
@@ -210,14 +242,14 @@
 
 =head1 AUTHOR
 
-  Fayland Lam <fayland at gmail.com>
+Fayland Lam <fayland at gmail.com>
 
 =head1 COPYRIGHT AND LICENSE
 
-This software is copyright (c) 2009 by Fayland Lam.
+This software is copyright (c) 2010 by Fayland Lam.
 
 This is free software; you can redistribute it and/or modify it under
-the same terms as perl itself.
+the same terms as the Perl 5 programming language system itself.
 
 =cut
 

Modified: branches/upstream/libemail-sender-transport-smtp-tls-perl/current/t/release-pod-syntax.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-sender-transport-smtp-tls-perl/current/t/release-pod-syntax.t?rev=63584&op=diff
==============================================================================
--- branches/upstream/libemail-sender-transport-smtp-tls-perl/current/t/release-pod-syntax.t (original)
+++ branches/upstream/libemail-sender-transport-smtp-tls-perl/current/t/release-pod-syntax.t Mon Oct 11 10:18:50 2010
@@ -10,7 +10,7 @@
 
 use Test::More;
 
-eval "use Test::Pod 1.00";
-plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
+eval "use Test::Pod 1.41";
+plan skip_all => "Test::Pod 1.41 required for testing POD" if $@;
 
 all_pod_files_ok();




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