File Coverage

blib/lib/Alice/Request.pm
Criterion Covered Total %
statement 3 9 33.3
branch 0 2 0.0
condition n/a
subroutine 1 4 25.0
pod 0 3 0.0
total 4 18 22.2


line stmt bran cond sub pod time code
1             package Alice::Request;
2              
3 2     2   10 use Any::Moose;
  2         5  
  2         14  
4              
5             has line => (
6             is => 'ro',
7             required => 1,
8             );
9              
10             has stream => (
11             is => 'ro',
12             required => 1,
13             );
14              
15             has irc => (is => 'rw');
16              
17             has window => (
18             is => 'ro',
19             required => 1,
20             );
21              
22             sub reply {
23 0     0 0   my ($self, $line) = @_;
24 0           $self->stream->send({
25             type => "action",
26             event => "announce",
27             body => $line,
28             });
29             }
30              
31             sub send_srv {
32 0     0 0   my $self = shift;
33 0 0         $self->irc->send_srv(@_) if $self->irc->is_connected;
34             }
35              
36             sub nick {
37 0     0 0   my $self = shift;
38 0           $self->irc->nick;
39             }
40              
41             __PACKAGE__->meta->make_immutable;
42             1;