Subject: | documentation shoud be cleared about sender vs. mailer |
(This is an RT-ified version of an email sent to Casey in 2006-03.)
I've attached a patch that fixes an incorrect claim in the
documentation. It says that the mailer plugin is called "exactly" like
this:
Email::Send::Telegram::send(...)
When in fact it is called like this:
Email::Send::Telegram->send(...)
I've also replaced a number of cases where the docs called an
Email::Send object "$mailer" so that they now refer to them as
$sender. This should help a bit to clear up the distinction between
the sender and mailer.
Subject: | es-docs.patch |
diff -Nur Email-Send-2.04/lib/Email/Send.pm Email-Send-docs/lib/Email/Send.pm
--- Email-Send-2.04/lib/Email/Send.pm 2006-01-28 18:02:44.000000000 -0500
+++ Email-Send-docs/lib/Email/Send.pm 2006-03-06 11:36:31.000000000 -0500
@@ -57,7 +57,7 @@
=item new()
- my $mailer = Email::Send->new({
+ my $sender = Email::Send->new({
mailer => 'NNTP',
mailer_args => [ Host => 'nntp.example.com' ],
});
@@ -114,7 +114,7 @@
=item send()
- my $result = $mailer->send($message, @modifier_args);
+ my $result = $sender->send($message, @modifier_args);
Send a message using the predetermined mailer and mailer arguments. If you
have defined a C<message_modifier> it will be called prior to sending.
@@ -147,7 +147,7 @@
=item all_mailers()
- my @available = $mailer->all_mailers;
+ my @available = $sender->all_mailers;
Returns a list of availabe mailers. These are mailers that are
installed on your computer and register themselves as available.
@@ -166,8 +166,8 @@
=item mailer_available()
# is SMTP over SSL avaialble?
- $mailer->mailer('SMTP')
- if $mailer->mailer_available('SMTP', ssl => 1);
+ $sender->mailer('SMTP')
+ if $sender->mailer_available('SMTP', ssl => 1);
Given the name of a mailer, such as C<SMTP>, determine if it is
available. Any additional arguments passed to this method are passed
@@ -262,7 +262,7 @@
to implement a single function, C<send>. It will be called from
C<Email::Send> exactly like this.
- Your::Sending::Package::send($message, @args);
+ Your::Sending::Package->send($message, @args);
C<$message> is an Email::Simple object, C<@args> are the extra
arguments passed into C<Email::Send::send>.
@@ -281,7 +281,7 @@
}
sub send {
- my ($message, @args);
+ my ($class, $message, @args);
LWP::UserAgent->require;
@@ -300,12 +300,12 @@
This example will keep a UserAgent singleton unless new arguments are
passed to C<send>. It is used by calling C<Email::Send::send>.
- my $mailer = Email::Send->new({ mailer => 'HTTP::Post' });
+ my $sender = Email::Send->new({ mailer => 'HTTP::Post' });
- $mailer->mailer_args([ 'http://example.com/incoming', 'message' ]);
+ $sender->mailer_args([ 'http://example.com/incoming', 'message' ]);
- $mailer->send($message);
- $mailer->send($message2); # uses saved $URL and $FIELD
+ $sender->send($message);
+ $sender->send($message2); # uses saved $URL and $FIELD
=head1 SEE ALSO