Patch is slightly more complete now. I updated the pod documentation in
Mail/Mailer.pm
diff -ubr MailTools-1.47.orig/Mail/Mailer/test.pm MailTools-1.47/Mail/Mailer/test.pm
--- MailTools-1.47.orig/Mail/Mailer/test.pm Fri Jul 5 06:03:09 2002
+++ MailTools-1.47/Mail/Mailer/test.pm Wed Aug 7 03:27:17 2002
@@ -7,7 +7,26 @@
sub exec {
my($self, $exe, $args, $to) = @_;
- exec('sh', '-c', 'echo "to: ' . join(" ",@{$to}) . '"; cat');
+ print 'to: ' . join(' ',@{$to}) . "\n";
+ untie(*$self) if tied *$self;
+ tie *$self, 'Mail::Mailer::test::pipe', $self;
+ $self;
}
+
+sub close { 1 }
+
+package Mail::Mailer::test::pipe;
+
+sub TIEHANDLE {
+ my $pkg = shift;
+ my $self = shift;
+ return bless \$self;
+}
+
+sub PRINT {
+ my $self = shift;
+ print @_;
+}
+
1;
diff -ubr MailTools-1.47.orig/Mail/Mailer.pm MailTools-1.47/Mail/Mailer.pm
--- MailTools-1.47.orig/Mail/Mailer.pm Fri Jul 5 06:03:09 2002
+++ MailTools-1.47/Mail/Mailer.pm Wed Aug 7 03:35:29 2002
@@ -57,8 +57,8 @@
=item C<test>
-Used for debugging, this calls C</bin/echo> to display the data. No
-mail is ever sent. C<$command> is ignored.
+Used for debugging, this displays the data on STDOUT. No mail is ever
+sent. C<$command> is ignored.
=back
@@ -149,7 +149,7 @@
'smtp' => undef,
'qmail' => '/usr/sbin/qmail-inject;/var/qmail/bin/qmail-inject',
- 'test' => 'test'
+ 'test' => undef
);
# There are several flavours of mail, which do we have ????