File Coverage

blib/lib/Protocol/XMPP/Element/Presence.pm
Criterion Covered Total %
statement 12 17 70.5
branch n/a
condition n/a
subroutine 4 5 80.0
pod 1 1 100.0
total 17 23 73.9


line stmt bran cond sub pod time code
1             package Protocol::XMPP::Element::Presence;
2              
3 1     1   274228 use strict;
  1         3  
  1         43  
4 1     1   6 use warnings;
  1         19  
  1         81  
5 1     1   7 use parent qw(Protocol::XMPP::ElementBase);
  1         20  
  1         11  
6              
7             our $VERSION = '0.007'; ## VERSION
8              
9 1     1   637 use Protocol::XMPP::Contact;
  1         4  
  1         130  
10              
11             =head1 NAME
12              
13             Protocol::XMPP::Success - indicate success for an operation
14              
15             =head1 SYNOPSIS
16              
17             =head1 DESCRIPTION
18              
19             =head1 METHODS
20              
21             =cut
22              
23             sub end_element {
24 0     0 1   my $self = shift;
25 0           $self->debug("Had presence information");
26 0           my $attr = $self->attributes;
27             my $contact = Protocol::XMPP::Contact->new(
28             stream => $self->stream,
29             jid => $attr->{from},
30 0           );
31 0           $self->dispatch_event('presence', $contact);
32             }
33              
34             1;
35              
36             __END__