Jabber::SimpleSend - Send a Jabber message simply.
use Jabber::SimpleSend qw(send_jabber_message); send_jabber_message('youruserid@jabberdomain', 'yourpassword', 'target@jabber.domain', "Problems with Pie', "Pie taste funny.");
or
use Jabber::SimpleSend qw(send_jabber_message); send_jabber_message({ user => 'youruserid@jabber.domain', password => 'yourpassword', target => 'target@jabber.domain', subject => 'Pie Advice', message => "Must be wrong end.\nPie Good"});
This module is a wrapper around Net::Jabber that allows you to do one thing simply - send Jabber messages. It is useful for daemon processes, cron jobs or in any program that you want to be able to get your attention via Jabber.
You can call this method with either 5 scalar arguments or with a single reference to a hash. In the later case it takes a hash with the following keys,
Your JID, or at least the JID you want the program to use.
The password corresponding to the username above.
The JID you want to send the message to.
The subject of the message.
The message (which can include newlines).
Ryan Eatmon for doing the hard work and doing Net::Jabber, DJ Adams for answering my questions about Jabber in the past. Various CPAN authors for proving the usefulness of ::Simple modules.
Greg McCarroll <greg@mccarroll.org.uk>
Copyright 2006 by Greg McCarroll <greg@mccarroll.org.uk>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
To install Jabber::SimpleSend, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Jabber::SimpleSend
CPAN shell
perl -MCPAN -e shell install Jabber::SimpleSend
For more information on module installation, please visit the detailed CPAN module installation guide.