XMPP/Error/Parser.pm

filter: Statementstmt 33.3% 1 / 3 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 50.0% 2 / 4 CC 1 SCAR 2.6
CC
1
Cov
33%
BEGIN
1.3
CRAP 1.3
« XMPP/Error/Exception.pm ↑ Summary XMPP/Error/Presence.pm »
1 package AnyEvent::XMPP::Error::Parser;
2 0 ▶use AnyEvent::XMPP::Error;
Subroutine BEGIN: called CC=1 SCAR=2.6
3 use strict;
4 our @ISA = qw/AnyEvent::XMPP::Error/;
5  
6 =head1 NAME
7  
8 AnyEvent::XMPP::Error::Parser - XML parse errors
9  
10 Subclass of L<AnyEvent::XMPP::Error>
11  
12 =cut
13  
14 sub init {
15 my ($self) = @_;
16 }
17  
18 =head2 METHODS
19  
20 =over 4
21  
22 =item B<exception ()>
23  
24 Returns the XML parser exception.
25  
26 =cut
27  
28 sub exception { return $_[0]->{exception} }
29  
30 =item B<data ()>
31  
32 Returns the errornous data.
33  
34 =cut
35  
36 sub data { $_[0]->{data} }
37  
38 sub string {
39 my ($self) = @_;
40  
41 sprintf ("xml parse error: exception: %s, data: [%s]",
42 $self->exception,
43 $self->data)
44 }
45  
46 =back
47  
48 =cut
49  
50  
51 =head1 AUTHOR
52  
53 Robin Redeker, C<< <elmex at ta-sa.org> >>, JID: C<< <elmex at jabber.org> >>
54  
55 =head1 COPYRIGHT & LICENSE
56  
57 Copyright 2007, 2008 Robin Redeker, all rights reserved.
58  
59 This program is free software; you can redistribute it and/or modify it
60 under the same terms as Perl itself.
61  
62 =cut
63  
64 1; # End of AnyEvent::XMPP
« XMPP/Error/Exception.pm ↑ Summary XMPP/Error/Presence.pm »