AnyEvent-XMPP

 view release on metacpan or  search on metacpan

lib/AnyEvent/XMPP/Ext/Receipts.pm  view on Meta::CPAN

# vim:ts=4:sw=4:et
package AnyEvent::XMPP::Ext::Receipts;
use AnyEvent;
use AnyEvent::XMPP::Ext;
use AnyEvent::XMPP::Util qw/is_bare_jid/;
use AnyEvent::XMPP::Namespaces qw/set_xmpp_ns_alias/;
use Data::Dumper;
use warnings;
use strict;

our @ISA = qw/AnyEvent::XMPP::Ext/;

=head1 NAME

AnyEvent::XMPP::Ext::Receipts - XEP-0184 message receipts

=head1 SYNOPSIS

samples/simple_register_example  view on Meta::CPAN


            } else {
               my $df = $form->get_data_form;
               my $lf = $form->get_legacy_form_fields;
               my $oo = $form->get_oob;

               if ($df) {
                  print "GOT FORM! ".($df ? $df->as_debug_string : "")."\n";
               }
               if ($lf) {
                  require Data::Dumper;
                  print "LEGACY: " . Data::Dumper->Dump ([$lf]) . "\n";
               }
               if ($oo) {
                  print "OOB: $oo->{url} / $oo->{desc}\n";
               }

               my $af = $form->try_fillout_registration ($username, $pw);
               $reg->submit_form ($af, \&result);
            }
         });
         return 0

t/z_07_vcard.t  view on Meta::CPAN


   for my $tk (keys %$t) {
     my $tv = $t->{$tk};
     my $rv = $r->{$tk};
     if (!ref $tv) {
        unless ($tv eq $rv) { return 0; }
        next;
     }
     for my $tav (@$tv) {
        unless (grep { match_value ($tav, $_) } @$rv) {
           require Data::Dumper;
           diag (Data::Dumper::Dumper ([$t,$r]));
           return 0;
        }
     }
   }
   return 1
}

ok ($error_free_store, 'stored the vcard error free');
ok ($returned_vcard,   'got a vcard back');
ok (match_struct ($test_vcard, $returned_vcard), 'the returned vcard has the same fields as the sent vcard');



( run in 0.274 second using v1.01-cache-2.11-cpan-4d50c553e7e )