Ident/Transaction.pm

filter: Statementstmt 86.3% 19 / 22 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 6 / 9 Podpod 100% 6 / 6 totaltotal 82.0% 32 / 39 CC 2 SCAR 4.1
CC
2
Cov
83%
reply_with_user
2.0
remote_port
2.0
local_port
2.0
CRAP 1.5
« Ident/Server.pm ↑ Summary Ident.pm »
1 package AnyEvent::Ident::Transaction;
2  
3 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 ▶use AnyEvent::Ident::Response;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 # ABSTRACT: Simple asynchronous ident transaction
8 4 our $VERSION = '0.08'; # VERSION
9  
10  
11 9 ▶sub req { shift->{req} }
Subroutine req: called CC=1 SCAR=0.0
Pod documented
12  
13  
14 sub reply_with_user
15 4 ▶{
Subroutine reply_with_user: called CC=2 SCAR=7.0
Pod documented
16 4 my $self = shift;
17 4 my $username = pop;
18 4 my $os = shift;
19 4 ▶ $os = 'OTHER' unless defined $os;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $os 0 4 4
20 $self->{cb}->(
21 AnyEvent::Ident::Response->new(
22 req => $self->{req},
23 4 username => $username,
24 os => $os,
25 )
26 );
27 }
28  
29  
30 sub reply_with_error
31 3 ▶{
Subroutine reply_with_error: called CC=1 SCAR=0.0
Pod documented
32 3 my($self, $error_type) = @_;
33 $self->{cb}->(
34 AnyEvent::Ident::Response->new(
35 req => $self->{req},
36 3 error_type => $error_type,
37 )
38 );
39 }
40  
41  
42 0 ▶sub remote_port { shift->{remote_port} }
Subroutine remote_port: not called CC=1 SCAR=6.9
Pod documented
43 0 ▶sub local_port { shift->{local_port} }
Subroutine local_port: not called CC=1 SCAR=6.9
Pod documented
44  
45  
46 0 ▶sub remote_address { shift->{remote_address} }
Subroutine remote_address: not called CC=1 SCAR=6.9
Pod documented
47  
48 4 1;
49  
50 __END__
« Ident/Server.pm ↑ Summary Ident.pm »