| 1 | package Net::SSH::Perl::Comp; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 1 | ▶ | use Carp qw( croak ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 1 | ▶ | use vars qw( %COMP ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 8 | 1 | %COMP = ( | |||||||||||||||||||
| 9 | 'zlib' => 'Zlib', | ||||||||||||||||||||
| 10 | ); | ||||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | sub new { | ||||||||||||||||||||
| 13 | 0 | ▶ | my $class = shift; | ||||||||||||||||||
|
Subroutine
new: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||||||||||
| 14 | 0 | my $type = shift; | |||||||||||||||||||
| 15 | 0 | ▶ | return if $type eq 'none'; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 16 | 0 | ▶ | my $comp_class = join '::', __PACKAGE__, $COMP{$type} || $type; | ||||||||||||||||||
|
Condition0%0/3
$Net::SSH::Perl::Comp::COMP{$type} || $type
MC/DC0%0/2
$Net::SSH::Perl::Comp::COMP{$type} || $type
$Net::SSH::Perl::Comp::COMP{$type}
$type
Truth table0%0/3
A || B
A= $Net::SSH::Perl::Comp::COMP{$type}B= $type
| |||||||||||||||||||||
| 17 | 0 | eval "use $comp_class;"; | |||||||||||||||||||
| 18 | 0 | my $comp = bless {}, $comp_class; | |||||||||||||||||||
| 19 | 0 | ▶ | $comp->init(@_) if @_; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 20 | 0 | $comp; | |||||||||||||||||||
| 21 | } | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 0 | ▶ | sub enabled { $_[0]->{enabled} } | ||||||||||||||||||
|
Subroutine
enabled: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 24 | 0 | ▶ | sub enable { $_[0]->{enabled} = 1 } | ||||||||||||||||||
|
Subroutine
enable: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 25 | |||||||||||||||||||||
| 26 | ▶ | sub init { } | |||||||||||||||||||
|
Subroutine
init: not called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | 0 | ▶ | sub compress { $_[0] } | ||||||||||||||||||
|
Subroutine
compress: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 29 | 0 | ▶ | sub uncompress { $_[0] } | ||||||||||||||||||
|
Subroutine
uncompress: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | 1 | 1; | |||||||||||||||||||
| 32 | __END__ | ||||||||||||||||||||