File Coverage

blib/lib/Protocol/XMPP/Element/Mechanism.pm
Criterion Covered Total %
statement 9 18 50.0
branch n/a
condition n/a
subroutine 3 6 50.0
pod 3 3 100.0
total 15 27 55.5


line stmt bran cond sub pod time code
1             package Protocol::XMPP::Element::Mechanism;
2              
3 1     1   216355 use strict;
  1         2  
  1         46  
4 1     1   6 use warnings;
  1         2  
  1         75  
5 1     1   12 use parent qw(Protocol::XMPP::TextElement);
  1         2  
  1         9  
6              
7             our $VERSION = '0.007'; ## VERSION
8              
9             =head1 NAME
10              
11             Protocol::XMPP::Mechanism - information on available auth mechanisms
12              
13             =head1 SYNOPSIS
14              
15             =head1 DESCRIPTION
16              
17             =head1 METHODS
18              
19             =cut
20              
21              
22             =head2 on_text_complete
23              
24             Set L based on the text data.
25              
26             =cut
27              
28             sub on_text_complete {
29 0     0 1   my $self = shift;
30 0           my $data = shift;
31 0           $self->{type} = $data;
32 0           return $self;
33             }
34              
35             =head2 type
36              
37             Mechanism type.
38              
39             =cut
40              
41 0     0 1   sub type { shift->{type} }
42              
43             =head2 end_element
44              
45             =cut
46              
47             sub end_element {
48 0     0 1   my $self = shift;
49 0           $self->SUPER::end_element(@_);
50              
51 0           $self->parent->add_mechanism($self);
52 0           $self;
53             }
54              
55             1;
56              
57             __END__