|
Net::AIMTOC - Perl implementation of the AIM TOC protocol |
Net::AIMTOC - Perl implementation of the AIM TOC protocol
The Net::AIMTOC module implements in AIM TOC protocol in such a way which make it simple for using when writing bots or AIM clients in Perl.
All of the code regarding the connection is abstracted in order to simplify the AIM connection down to merely sending and receiving instant messages and toc commands.
use Error qw( :try ); use Net::AIMTOC;
try {
my $aim = Net::AIMTOC->new;
$aim->connect;
$aim->sign_on( $screenname, $password );
my $msgObj = $aim->recv_from_aol;
print $msgObj->getMsg, "\n";
$aim->send_im_to_aol( $buddy, $msg );
$aim->disconnect;
exit( 0 );
}
catch Net::AIMTOC::Error with {
my $err = shift;
print $err->stringify, "\n";
};
A Net::AIMTOC object is created by calling the new constructor without arguments. A reference to the newly created object is returned, however, no connection to AIM has yet been made. One first is required to called connect and sign_on before attempting to send/receive instant messages.
Net::AIMTOC object but does not create a connection or sign on to the AIM service.
Alternatively, a hash containing any of the following keys can be passed in to connect to another service using the TOC protocol:
-tocServer -tocPort -authServer -authPort
sign_on is called to sign on to the AIM service. The arguments to be passed in are the screen name and password to be used to sign on to the service.
This method returns a Net::AIMTOC::Messages object. See the documentation for this object is to be used.
None, but that does not mean there are not any.
Net::AIMTOC::Messages
Alistair Francis, <cpan@alizta.com>
|
Net::AIMTOC - Perl implementation of the AIM TOC protocol |