Net::Msmgr::Session -- The main point of contact in a Perl MSN Client
our $session = new Net::Msmgr::Session; our $user = new Net::Msmgr::User ( user => 'username@msn.com', password => 'my_password' ) ; $session->user($user); $session->login_handler( sub { shift->Logout } ) ; $session->Login; Event::loop;
Net::Msmgr::Session is the encapsulation for an entire MSN Messenger Client session. You register handlers to deal with various inbound messages such as incoming chat requests or state change notifications. When you are finished, you call instance method Logout and everything goes away.
my $session = new Net::Msmgr::Session (...); - or - my $session = Net::Msmgr::Session->new(...);
Constructor parameters are:
The container for the Authentication Data for the session.
A code reference to a subroutine that will be called upon successful authentication and connection to the notification server.
A code reference to a subroutine that will be called after each connection to a server.
A code reference to a subroutine that will be called just before each close call when disconnecting from a server.
Instantiate a new conversation (which you can later invite people to)
Send an invitation to another user.
Initiate list syncronization.
Ping the Notification Server.
Send a message to all users in Switchboard Connection $ssid. $message must be a properly MIME formatted message.
Set your Notification Status to one of Online (NLN), Busy (BSY), Idle (IDL), Be Right Back (BRB), Away (AWY), Phone (PHN), Out To Lunch (LUN), or Hidden (HDN). All of these are advisory, except hidden, which makes you appear offline, and disallows initiation of Switchboard sessions.
The end of the road.
The beginning of the road. If $session->login_handler is defined, it will be treated as a callback when the session connects, and passed the single parameter of the Net::Msmgr::Session object
1 POD Error
The following errors were encountered while parsing the POD:
=over without closing =back
To install Net::Msmgr, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Msmgr
CPAN shell
perl -MCPAN -e shell install Net::Msmgr
For more information on module installation, please visit the detailed CPAN module installation guide.