1package Protocol::XMPP::Element::Mechanisms; 2$Protocol::XMPP::Element::Mechanisms::VERSION = '0.006'; 3use strict; 4use warnings; 5use parent qw(Protocol::XMPP::ElementBase); 6 7=head1 NAME 8 9=head1 SYNOPSIS 10 11=head1 VERSION 12 13Version 0.006 14 15=head1 DESCRIPTION 16 17=head1 METHODS 18 19=cut 20 21sub add_mechanism { 22 my $self = shift; 23 my $mech = shift; 24 push @{ $self->{mechanism} }, $mech; 25 $self; 26} 27 28sub end_element { 29 my $self = shift; 30 $self->debug("Supported auth mechanisms: " . join(' ', map { $_->type } @{$self->{mechanism}})); 31 $self->parent->{mechanism} = $self->{mechanism} if $self->parent; 32 $self; 33} 34 351; 36 37__END__ 38 39=head1 AUTHOR 40 41Tom Molesworth <cpan@entitymodel.com> 42 43=head1 LICENSE 44 45Copyright Tom Molesworth 2010-2014. Licensed under the same terms as Perl itself. 46