AnyEvent-MSN
view release on metacpan or search on metacpan
lib/AnyEvent/MSN.pm view on Meta::CPAN
=item add_contact
$msn->add_contact('silas@live.com'); # Temporary
$msn->add_contact('mark@hotmail.com'); # Persistant
This adds a buddy to your temporary list of contacts.
'Add List' command, uses XML to identify each contact, and works as a payload
message. Each ADL command may contain up to 150 contacts (a payload of roughly
7500 bytes). The format of the payload looks like this:
<ml l="1">
<d n="domain">
<c n="email" l="3" t="1" />
</d>
</ml>
Elements:
ml: the meaning of l is unknown (thought to mean initial listing due to the
fact that it is only sent in the initial ADL)
d (domain): contacts are grouped by domain, where n is the domain name (the
part after the @ symbol in the email address)
lib/AnyEvent/MSN/Types.pm view on Meta::CPAN
my $atom = qr{[a-zA-Z0-9_!#\$\%&'*+/=?\^`{}~|\-]+};
my $dot_atom = qr{$atom(?:\.$atom)*};
my $quoted = qr{"(?:\\[^\r\n]|[^\\"])*"};
my $local = qr{(?:$dot_atom|$quoted)};
my $quotedpair = qr{\\[\x00-\x09\x0B-\x0c\x0e-\x7e]};
my $domain_lit = qr{\[(?:$quotedpair|[\x21-\x5a\x5e-\x7e])*\]};
my $domain = qr{(?:$dot_atom|$domain_lit)};
my $addr_spec = qr{$local\@$domain};
$_ =~ $addr_spec;
} => message {
'An MSN Passport looks like an email address: you@hotmail.com';
};
#
subtype 'AnyEvent::MSN::Types::OnlineStatus' =>
as enum([qw[NLN FLN BSY IDL BRB AWY PHN LUN]]);
#
no Moose::Util::TypeConstraints;
1;
( run in 0.409 second using v1.01-cache-2.11-cpan-64827b87656 )