AnyEvent-XMPP-Ext-HTML

 view release on metacpan or  search on metacpan

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

                    $w->endTag;
                }
                $w->endTag;
            };
        },
    );
}

sub disco_feature {
    xmpp_ns('xhtml_im');
}

sub DESTROY {
    my $self = shift;
    $self->unreg_cb($self->{cb_id});
}

1;

__END__

=pod

=head1 NAME

AnyEvent::XMPP::Ext::HTML - XEP-0071: XHTML-IM (Version 1.5) for AnyEvent::XMPP

=head1 VERSION

version 0.02

=head1 SYNOPSIS

    my $c = AnyEvent::XMPP::Connection->new(...);
    $c->add_extension(my $disco = AnyEvent::XMPP::Ext::Disco->new);
    $c->add_extension(AnyEvent::XMPP::Ext::HTML->new(disco => $disco));
    
    $c->send_message(
        body => "This is plain text; same as usual.",
        html => "This is <em>XHTML</em>!",
    );

=head1 DESCRIPTION

An implementation of XEP-0071: XHTML-IM for HTML-formatted messages.

=head1 METHODS

=head2 new

Creates a new extension handle.  It takes an optional C<disco> argument which
is a L<AnyEvent::XMPP::Ext::Disco> object for which this extension will be
enabled.

=head2 init

Initialize the extension.  This does not need to be called externally.

=head1 CAVEATS

HTML messages are not validated nor escaped, so it is your responsibility to
use valid XHTML-IM tags and to close them properly.

=head1 AUTHOR

Charles McGarvey <ccm@cpan.org>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Charles McGarvey.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut



( run in 0.895 second using v1.01-cache-2.11-cpan-39bf76dae61 )