File Coverage

blib/lib/AnyEvent/Atom/Stream.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package AnyEvent::Atom::Stream;
2              
3 1     1   6 use strict;
  1         2  
  1         41  
4 1     1   28 use 5.008_001;
  1         4  
  1         61  
5             our $VERSION = '0.02';
6              
7 1     1   5 use base qw( XML::Atom::Stream );
  1         2  
  1         1066  
8             use AnyEvent::Atom::Stream::UserAgent;
9              
10             sub connect {
11             my($self, $url) = @_;
12             $self->{ua} = AnyEvent::Atom::Stream::UserAgent->new($self->{timeout}, $self->{on_disconnect});
13             $self->SUPER::connect($url);
14              
15             defined wantarray && AnyEvent::Util::guard { delete $self->{ua} };
16             }
17              
18             1;
19             __END__