AnyEvent-MSN

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN

       module_name        => 'AnyEvent::MSN',
       license            => 'artistic_2',
       build_requires     => {'Test::More' => 0},
       configure_requires => {'Module::Build' => 0.38},
       requires           => {
                    perl              => '5.012',
                    AnyEvent          => '5.31',
                    'AnyEvent::HTTP'  => '2.1',
                    'MIME::Base64'    => '3.13',
                    'Moose'           => '2.0002',
                    'Try::Tiny'       => '0.09',
                    'XML::Twig'       => '3.38',
                    'Digest::HMAC'    => '1.02',
                    'Digest::SHA'     => '5.61',
                    'Digest::MD5'     => '2.51',
                    'Crypt::CBC'      => '2.30',
                    'Crypt::DES'      => '2.05',
                    'Crypt::DES_EDE3' => '0.01'
       },
       recursive_test_files => 1,
       meta_merge           => {

META.json  view on Meta::CPAN

            "AnyEvent" : "5.31",
            "AnyEvent::HTTP" : "2.1",
            "Crypt::CBC" : "2.30",
            "Crypt::DES" : "2.05",
            "Crypt::DES_EDE3" : "0.01",
            "Digest::HMAC" : "1.02",
            "Digest::MD5" : "2.51",
            "Digest::SHA" : "5.61",
            "MIME::Base64" : "3.13",
            "Moose" : "2.0002",
            "Try::Tiny" : "0.09",
            "XML::Twig" : "3.38",
            "perl" : "5.012"
         }
      }
   },
   "provides" : {
      "AnyEvent::MSN" : {
         "file" : "lib/AnyEvent/MSN.pm",
         "version" : "0.002"
      },

META.yml  view on Meta::CPAN

  AnyEvent: 5.31
  AnyEvent::HTTP: 2.1
  Crypt::CBC: 2.30
  Crypt::DES: 2.05
  Crypt::DES_EDE3: 0.01
  Digest::HMAC: 1.02
  Digest::MD5: 2.51
  Digest::SHA: 5.61
  MIME::Base64: 3.13
  Moose: 2.0002
  Try::Tiny: 0.09
  XML::Twig: 3.38
  perl: 5.012
resources:
  bugtracker: http://github.com/sanko/anyevent-msn/issues
  license: http://www.perlfoundation.org/artistic_license_2_0
  repository: http://github.com/sanko/anyevent-msn/
  x_ChangeLog: http://github.com/sanko/anyevent-msn/commits
version: 0.002

examples/client.pl  view on Meta::CPAN

        warn 'Connected as ' . $msn->passport;

        $msn->add_contact('msn@propernoun.com');
        $msn->send_message('msn@propernoun.com', 'Hi?');
    },
    on_im => sub {    # simple echo bot
        my ($msn, $head, $body) = @_;
        $msn->send_message($head->{From}, $body, $head->{'X-MMS-IM-Format'});
        given ($body) {
            when (/^status (...)$/) {
                use Try::Tiny;
                try { $msn->set_status($1) } catch { warn $_ };
            }
            when (/^add (.+)$/) {
                warn 'Adding ' . $1;
                $msn->add_contact($1);
            }
            when (/^remove (.+)$/) {
                warn 'Removing ' . $1;
                $msn->remove_contact($1);
            }

lib/AnyEvent/MSN.pm  view on Meta::CPAN

package AnyEvent::MSN;
{ $AnyEvent::MSN::VERSION = 0.002 }
use lib '../../lib';
use 5.012;
use Moose;
use Moose::Util::TypeConstraints;
use AnyEvent qw[];
use AnyEvent::Handle qw[];
use AnyEvent::HTTP qw[];
use Try::Tiny;
use XML::Twig;
use AnyEvent::MSN::Protocol;
use AnyEvent::MSN::Types;
use MIME::Base64 qw[];

#
#use Data::Dump;
#
our $DEBUG = 0;
sub DEBUG {$DEBUG}



( run in 0.835 second using v1.01-cache-2.11-cpan-05444aca049 )