Server/Command/Check.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 31 CC 4 SCAR 24.0
CC
4
Cov
0%
validate
20.0
run
2.0
BEGIN
2.0
CRAP 11.0
1 package Net::IMAP::Server::Command::Check;
2  
3 use warnings;
4 use strict;
5  
6 use base qw/Net::IMAP::Server::Command/;
7  
8 sub validate {
9 my $self = shift;
10  
11 return $self->bad_command("Login first") if $self->connection->is_unauth;
12 return $self->bad_command("Select a mailbox first")
13 unless $self->connection->is_selected;
14  
15 my @options = $self->parsed_options;
16 return $self->bad_command("Too many options") if @options;
17  
18 return 1;
19 }
20  
21 sub run {
22 my $self = shift;
23 $self->connection->poll;
24 $self->ok_completed();
25 }
26  
27 1;