r3396 - in /packages/libemail-send-perl/branches/upstream/current: Changes MANIFEST META.yml Makefile.PL README lib/Email/Send.pm t/abstract-msg.t t/classic.t t/lib/Without.pm t/sendmail.t t/test.t t/without.t

eloy at users.alioth.debian.org eloy at users.alioth.debian.org
Thu Aug 3 14:42:03 UTC 2006


Author: eloy
Date: Thu Aug  3 14:42:03 2006
New Revision: 3396

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=3396
Log:
Load /tmp/tmp.JyzFH10334/libemail-send-perl-2.171 into
packages/libemail-send-perl/branches/upstream/current.

Added:
    packages/libemail-send-perl/branches/upstream/current/t/lib/Without.pm
Modified:
    packages/libemail-send-perl/branches/upstream/current/Changes
    packages/libemail-send-perl/branches/upstream/current/MANIFEST
    packages/libemail-send-perl/branches/upstream/current/META.yml
    packages/libemail-send-perl/branches/upstream/current/Makefile.PL
    packages/libemail-send-perl/branches/upstream/current/README
    packages/libemail-send-perl/branches/upstream/current/lib/Email/Send.pm
    packages/libemail-send-perl/branches/upstream/current/t/abstract-msg.t
    packages/libemail-send-perl/branches/upstream/current/t/classic.t
    packages/libemail-send-perl/branches/upstream/current/t/sendmail.t
    packages/libemail-send-perl/branches/upstream/current/t/test.t
    packages/libemail-send-perl/branches/upstream/current/t/without.t

Modified: packages/libemail-send-perl/branches/upstream/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libemail-send-perl/branches/upstream/current/Changes?rev=3396&op=diff
==============================================================================
--- packages/libemail-send-perl/branches/upstream/current/Changes (original)
+++ packages/libemail-send-perl/branches/upstream/current/Changes Thu Aug  3 14:42:03 2006
@@ -1,3 +1,12 @@
+2.171   2006-07-29
+
+  - improve tests and contents, giving up on Test::Without::Module
+
+2.17    2006-07-28
+
+  - skip tests for optional functionality (bug 20740, eloy)
+  - fix typo in POD (thanks J. Cheetham!)
+
 2.16    2006-07-24
 
   - the without.t test no longer breaks if Test::Without::Module isn't there

Modified: packages/libemail-send-perl/branches/upstream/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libemail-send-perl/branches/upstream/current/MANIFEST?rev=3396&op=diff
==============================================================================
--- packages/libemail-send-perl/branches/upstream/current/MANIFEST (original)
+++ packages/libemail-send-perl/branches/upstream/current/MANIFEST Thu Aug  3 14:42:03 2006
@@ -25,6 +25,7 @@
 t/lib/Email/Send/Unavail.pm
 t/lib/OKMailer.pm
 t/lib/OKMailerOO.pm
+t/lib/Without.pm
 t/modifier.t
 t/no-import.t
 t/object-mailer.t

Modified: packages/libemail-send-perl/branches/upstream/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libemail-send-perl/branches/upstream/current/META.yml?rev=3396&op=diff
==============================================================================
--- packages/libemail-send-perl/branches/upstream/current/META.yml (original)
+++ packages/libemail-send-perl/branches/upstream/current/META.yml Thu Aug  3 14:42:03 2006
@@ -1,11 +1,11 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         Email-Send
-version:      2.16
+version:      2.171
 version_from: lib/Email/Send.pm
 installdirs:  site
 requires:
-    Class::Accessor::Fast:         0.19
+    Class::Accessor::Fast:         0.18
     Email::Address:                1.80
     Email::Simple:                 1.92
     File::Spec:                    0

Modified: packages/libemail-send-perl/branches/upstream/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libemail-send-perl/branches/upstream/current/Makefile.PL?rev=3396&op=diff
==============================================================================
--- packages/libemail-send-perl/branches/upstream/current/Makefile.PL (original)
+++ packages/libemail-send-perl/branches/upstream/current/Makefile.PL Thu Aug  3 14:42:03 2006
@@ -5,12 +5,12 @@
   ABSTRACT      => "Simply Sending Email",
   NAME          => 'Email::Send',
   PREREQ_PM     => {
-    'Class::Accessor::Fast' => '0.19',
-    'Email::Address'    => '1.80',
-    'Email::Simple'     => '1.92',
+    'Class::Accessor::Fast' => '0.18', # cope with broken 5.6.0 base.pm
+    'Email::Address'    => '1.80', # avoid many 'could hand on bad addr' bugs
+    'Email::Simple'     => '1.92', # previous versions have prereq problems
     'File::Spec'        =>      0, # min ver unknown; core in 5.005
     'Module::Pluggable' => '2.97', # topic safety
-    'Return::Value'     => '1.28',
+    'Return::Value'     => '1.28', # avoid num/bool explosions on 5.6.1
     'Scalar::Util'      => '1.02', # reason unknown;  core in 5.7.3
     'Symbol'            => '0.00', # min ver unknown; core in 5.002
     'Test::More'        => '0.47', # reason unknown;  core in 5.8.1

Modified: packages/libemail-send-perl/branches/upstream/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libemail-send-perl/branches/upstream/current/README?rev=3396&op=diff
==============================================================================
--- packages/libemail-send-perl/branches/upstream/current/README (original)
+++ packages/libemail-send-perl/branches/upstream/current/README Thu Aug  3 14:42:03 2006
@@ -32,7 +32,7 @@
 
 DESCRIPTION
     This module provides a very simple, very clean, very specific interface
-    to multiple Email mailers. The goal if this software is to be small and
+    to multiple Email mailers. The goal of this software is to be small and
     simple, easy to use, and easy to extend.
 
   Constructors

Modified: packages/libemail-send-perl/branches/upstream/current/lib/Email/Send.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libemail-send-perl/branches/upstream/current/lib/Email/Send.pm?rev=3396&op=diff
==============================================================================
--- packages/libemail-send-perl/branches/upstream/current/lib/Email/Send.pm (original)
+++ packages/libemail-send-perl/branches/upstream/current/lib/Email/Send.pm Thu Aug  3 14:42:03 2006
@@ -2,7 +2,7 @@
 use strict;
 
 use vars qw[$VERSION];
-$VERSION   = '2.16';
+$VERSION   = '2.171';
 
 use base qw[Class::Accessor::Fast];
 use Email::Simple;
@@ -47,7 +47,7 @@
 =head1 DESCRIPTION
 
 This module provides a very simple, very clean, very specific interface
-to multiple Email mailers. The goal if this software is to be small
+to multiple Email mailers. The goal of this software is to be small
 and simple, easy to use, and easy to extend.
 
 =head2 Constructors

Modified: packages/libemail-send-perl/branches/upstream/current/t/abstract-msg.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libemail-send-perl/branches/upstream/current/t/abstract-msg.t?rev=3396&op=diff
==============================================================================
--- packages/libemail-send-perl/branches/upstream/current/t/abstract-msg.t (original)
+++ packages/libemail-send-perl/branches/upstream/current/t/abstract-msg.t Thu Aug  3 14:42:03 2006
@@ -4,6 +4,9 @@
 
 BEGIN { use_ok('Email::Send', 'Test'); }
 require Email::Send::Test;
+
+plan skip_all => "Email::Abstract required for these tests"
+  unless eval "use Email::Abstract; 1";
 
 my $tests = 3;
 

Modified: packages/libemail-send-perl/branches/upstream/current/t/classic.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libemail-send-perl/branches/upstream/current/t/classic.t?rev=3396&op=diff
==============================================================================
--- packages/libemail-send-perl/branches/upstream/current/t/classic.t (original)
+++ packages/libemail-send-perl/branches/upstream/current/t/classic.t Thu Aug  3 14:42:03 2006
@@ -8,9 +8,32 @@
 
 use Email::Simple;
 
-if ( eval "require IO::All" ) {
-    {
-        my $message = Email::Simple->new(<<'__MESSAGE__');
+SKIP: {
+  skip "IO::All required for these tests", 2 unless eval "use IO::All; 1";
+  {
+    my $message = Email::Simple->new(<<'__MESSAGE__');
+To: me at myhost.com
+From: you at yourhost.com
+Subject: Test
+    
+Testing this thing out.
+__MESSAGE__
+
+    unlink 'testfile'; # just in case
+    
+    send('IO', $message, 'testfile');
+    
+    my $test = do { local $/; open T, 'testfile' or die $!; <T> };
+    
+    my $test_message = Email::Simple->new($test);
+    
+    is $test_message->as_string, $message->as_string, 'sent properly';
+
+    unlink 'testfile';
+  }
+
+  {
+    my $message = Email::Simple->new(<<'__MESSAGE__');
 To: me at myhost.com
 From: you at yourhost.com
 Subject: Test
@@ -18,35 +41,16 @@
 Testing this thing out.
 __MESSAGE__
     
-        send('IO', $message, 'testfile');
+    my $message_text = $message->as_string;
+        
+    send('IO', $message_text, 'testfile');
     
-        my $test = do { local $/; open T, 'testfile' or die $!; <T> };
+    my $test = do { local $/; open T, 'testfile'; <T> };
     
-        my $test_message = Email::Simple->new($test);
+    my $test_message = Email::Simple->new($test);
     
-        is $test_message->as_string, $message->as_string, 'sent properly';
-
-        unlink 'testfile';
-    }
-    {
-        my $message = Email::Simple->new(<<'__MESSAGE__');
-To: me at myhost.com
-From: you at yourhost.com
-Subject: Test
+    is $test_message->as_string, $message->as_string, 'sent properly';
     
-Testing this thing out.
-__MESSAGE__
-    
-        my $message_text = $message->as_string;
-        
-        send('IO', $message_text, 'testfile');
-    
-        my $test = do { local $/; open T, 'testfile'; <T> };
-    
-        my $test_message = Email::Simple->new($test);
-    
-        is $test_message->as_string, $message->as_string, 'sent properly';
-    
-        unlink 'testfile';
-    }
+    unlink 'testfile';
+  }
 }

Added: packages/libemail-send-perl/branches/upstream/current/t/lib/Without.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libemail-send-perl/branches/upstream/current/t/lib/Without.pm?rev=3396&op=file
==============================================================================
--- packages/libemail-send-perl/branches/upstream/current/t/lib/Without.pm (added)
+++ packages/libemail-send-perl/branches/upstream/current/t/lib/Without.pm Thu Aug  3 14:42:03 2006
@@ -1,0 +1,41 @@
+use strict;
+use warnings;
+
+package Without;
+
+use File::Path ();
+use File::Spec ();
+use File::Temp ();
+use Symbol ();
+
+my $tempdir;
+BEGIN { $tempdir = File::Temp::tempdir(CLEANUP => 1); }
+use lib $tempdir;
+
+sub import {
+  my ($self, @modules) = @_;
+
+  foreach my $module (@modules) {
+    my @parts = split /::/, $module;
+    my $pm_file = pop(@parts) . '.pm';
+    my $pm_path = File::Spec->catdir(@parts); 
+    my $path = @parts ? File::Spec->catdir($tempdir, $pm_path) : $tempdir;
+
+    File::Path::mkpath($path, 0, 0755) unless -d $path;
+    
+    my $file = File::Spec->catfile($path, $pm_file);
+
+    return if -e $file;
+    
+    my $new_pm_fh = Symbol::gensym;
+    open $new_pm_fh, ">$file" or die "couldn't open $file for output: $!";
+    print $new_pm_fh "die;\n"   or die "couldn't write to $file: $!";
+    close $new_pm_fh          or die "error closing $file: $!";
+
+    my $pm_relname =
+      File::Spec->abs2rel( File::Spec->catfile($pm_path, $pm_file) );
+    delete $INC{$pm_relname};
+  }
+}
+
+1;

Modified: packages/libemail-send-perl/branches/upstream/current/t/sendmail.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libemail-send-perl/branches/upstream/current/t/sendmail.t?rev=3396&op=diff
==============================================================================
--- packages/libemail-send-perl/branches/upstream/current/t/sendmail.t (original)
+++ packages/libemail-send-perl/branches/upstream/current/t/sendmail.t Thu Aug  3 14:42:03 2006
@@ -83,9 +83,9 @@
 
 SKIP:
 {
-  skip 'Cannot run this test unless current perl is -x', 1 unless -x $^X;
+  skip 'Cannot run this test unless current perl is -x', 2 unless -x $^X;
 
-  skip 'Cannot run this test without File::Temp', 1 unless $has_FileTemp;
+  skip 'Cannot run this test without File::Temp', 2 unless $has_FileTemp;
   my $tempdir = File::Temp::tempdir();
 
   require File::Spec;
@@ -93,12 +93,12 @@
   my $error = "can't prepare executable test script";
 
   my $filename = File::Spec->catfile($tempdir, "sendmail");
-  open my $sendmail_fh, ">", $filename or skip $error, 1;
-  open my $template_fh, "<", './util/sendmail' or skip $error, 1;
+  open my $sendmail_fh, ">", $filename or skip $error, 2;
+  open my $template_fh, "<", './util/sendmail' or skip $error, 2;
 
-  print {$sendmail_fh} "#!$^X\n"      or skip $error, 1;
-  print {$sendmail_fh} <$template_fh> or skip $error, 1;
-  close $sendmail_fh                  or skip $error, 1;
+  print {$sendmail_fh} "#!$^X\n"      or skip $error, 2;
+  print {$sendmail_fh} <$template_fh> or skip $error, 2;
+  close $sendmail_fh                  or skip $error, 2;
 
   chmod 0755, $filename;
 
@@ -114,6 +114,5 @@
     like( $log, qr/From: Casey West/, 'log contains From header' );
   } else {
     fail( 'cannot check sendmail log contents'  );
-    last SKIP;
   }
 }

Modified: packages/libemail-send-perl/branches/upstream/current/t/test.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libemail-send-perl/branches/upstream/current/t/test.t?rev=3396&op=diff
==============================================================================
--- packages/libemail-send-perl/branches/upstream/current/t/test.t (original)
+++ packages/libemail-send-perl/branches/upstream/current/t/test.t Thu Aug  3 14:42:03 2006
@@ -8,9 +8,35 @@
 
 use Email::Simple;
 
-if ( eval "require IO::All" ) {
-    {
-        my $message = Email::Simple->new(<<'__MESSAGE__');
+SKIP: {
+  skip "IO::All required for these tests", 2 unless eval "use IO::All; 1;";
+  {
+    my $message = Email::Simple->new(<<'__MESSAGE__');
+To: me at myhost.com
+From: you at yourhost.com
+Subject: Test
+    
+Testing this thing out.
+__MESSAGE__
+    unlink 'testfile'; # just in case
+
+    Email::Send->new({mailer => 'IO', mailer_args => ['testfile']})
+               ->send($message);
+
+    my $test = do {
+      local $/;
+      open T, 'testfile' or die "couldn't open testfile: $!";
+      <T>
+    };
+
+    my $test_message = Email::Simple->new($test);
+
+    is $test_message->as_string, $message->as_string, 'sent properly';
+
+    unlink 'testfile';
+  }
+  {
+    my $message = Email::Simple->new(<<'__MESSAGE__');
 To: me at myhost.com
 From: you at yourhost.com
 Subject: Test
@@ -18,37 +44,17 @@
 Testing this thing out.
 __MESSAGE__
     
-        Email::Send->new({mailer => 'IO', mailer_args => ['testfile']})
-                   ->send($message);
+    my $message_text = $message->as_string;
     
-        my $test = do { local $/; open T, 'testfile'; <T> };
+    Email::Send->new({mailer => 'IO', mailer_args => ['testfile']})
+               ->send($message_text);
+
+    my $test = do { local $/; open T, 'testfile'; <T> };
+
+    my $test_message = Email::Simple->new($test);
     
-        my $test_message = Email::Simple->new($test);
-    
-        is $test_message->as_string, $message->as_string, 'sent properly';
-    
-        unlink 'testfile';
-    }
-    {
-        my $message = Email::Simple->new(<<'__MESSAGE__');
-To: me at myhost.com
-From: you at yourhost.com
-Subject: Test
-    
-Testing this thing out.
-__MESSAGE__
-    
-        my $message_text = $message->as_string;
-        
-        Email::Send->new({mailer => 'IO', mailer_args => ['testfile']})
-                   ->send($message_text);
-    
-        my $test = do { local $/; open T, 'testfile'; <T> };
-    
-        my $test_message = Email::Simple->new($test);
-    
-        is $test_message->as_string, $message->as_string, 'sent properly';
-    
-        unlink 'testfile';
-    }
+    is $test_message->as_string, $message->as_string, 'sent properly';
+
+    unlink 'testfile';
+  }
 }

Modified: packages/libemail-send-perl/branches/upstream/current/t/without.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libemail-send-perl/branches/upstream/current/t/without.t?rev=3396&op=diff
==============================================================================
--- packages/libemail-send-perl/branches/upstream/current/t/without.t (original)
+++ packages/libemail-send-perl/branches/upstream/current/t/without.t Thu Aug  3 14:42:03 2006
@@ -1,19 +1,17 @@
-use Test::More;
+use Test::More;;
 use strict;
 $^W = 1;
 
-BEGIN { 
-  plan skip_all => "these tests require Test::Without::Module"
-    unless eval "require Test::Without::Module; 1";
+use lib 't/lib';
+
+BEGIN {
+  plan skip_all => "see t/lib/Without.pm for prereqs for these tests"
+    unless eval "use Without 'Email::Abstract'; 1;";
 
   plan tests => 3;
 
-  Test::Without::Module->import(qw(Email::Abstract));
+  use_ok('Email::Send', 'Test');
 }
-
-use lib 't/lib';
-
-BEGIN { use_ok('Email::Send', 'Test'); }
 
 { # unknown message type
   my $message = bless \(my $x = 0), "Mail::Ain't::Known";




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