SFTP/Buffer.pm

filter: Statementstmt 54.1% 13 / 24 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 44.4% 4 / 9 Podpod 100% 5 / 5 totaltotal 55.0% 22 / 40 CC 2 SCAR 8.8
CC
2
Cov
50%
get_int64
6.0
new
2.0
put_int64
2.0
CRAP 2.4
« SFTP/Util.pm ↑ Summary
1 # $Id: Buffer.pm,v 1.12 2005/01/16 21:36:56 dbrobins Exp $
2  
3 package Net::SFTP::Buffer;
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use Net::SSH::Perl::Buffer;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use base qw( Net::SSH::Perl::Buffer );
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 ▶use Net::SSH::Perl::Util qw( :ssh2mp );
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 sub new {
12 0 ▶ return shift->SUPER::new(@_, MP => 'SSH2');
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
13 }
14  
15 sub get_int64 {
16 0 ▶ my $buf = shift;
Subroutine get_int64: not called CC=2 SCAR=17.9
Pod documented
17 0 ▶ my $off = defined $_[0] ? shift : $buf->{offset};
Branch: 1 branch
BranchTrueFalseTotal
defined $_[0] ? : 0 0 0
18 0 $buf->{offset} += 8;
19 0 bin2mp( $buf->bytes($off, 8) );
20 }
21  
22 sub put_int64 {
23 0 ▶ my $buf = shift;
Subroutine put_int64: not called CC=1 SCAR=6.9
Pod documented
24 0 $buf->{buf} .= mp2bin($_[0], 8);
25 }
26  
27 sub get_attributes {
28 0 ▶ my $buf = shift;
Subroutine get_attributes: not called CC=1 SCAR=6.9
Pod documented
29 0 Net::SFTP::Attributes->new(Buffer => $buf);
30 }
31  
32 sub put_attributes {
33 0 ▶ my $buf = shift;
Subroutine put_attributes: not called CC=1 SCAR=6.9
Pod documented
34 0 $buf->{buf} .= $_[0]->as_buffer->bytes;
35 }
36  
37 2 1;
38 __END__
« SFTP/Util.pm ↑ Summary