NicoVideo/Decorator.pm

filter: Statementstmt 100% 25 / 25 Branchbran 100% 4 / 4 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 1 totaltotal 88.1% 37 / 42 CC 4 SCAR 4.8
CC
4
Cov
94%
new
2.1
AUTOLOAD
2.0
_component
2.0
CRAP 1.6
« NicoVideo/Request.pm ↑ Summary NicoVideo/Response.pm »
1 package Net::NicoVideo::Decorator;
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 $VERSION = '0.01_26';
7  
8 3 ▶use vars qw($AUTOLOAD);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 13 ▶sub AUTOLOAD {
Subroutine AUTOLOAD: called CC=2 SCAR=6.9
11 13 my $self = shift;
12 13 ▶ return if $AUTOLOAD =~ /::DESTROY$/;
Branch: 1 branch
BranchTrueFalseTotal
if $Net::NicoVideo::Decorator::AUTOLOAD =~ /::DESTROY$/ 3 10 13
13 10 my $method = $AUTOLOAD;
14 10 $method =~ s/.+:://;
15 10 $self->_component->$method(@_);
16 }
17  
18 2 ▶sub new {
Subroutine new: called CC=2 SCAR=7.4
Pod undocumented
19 2 my $class = shift;
20 2 ▶ $class = ref $class || $class;
Condition33%1/3
ref $class || $class
l!l&&r!l&&!r
020
MC/DC0%0/2
ref $class || $class
ref $class $class
Truth table33%1/3
A || B
A= ref $classB= $class
ABresult
1X1
011
000
21 2 my $self = {
22 _component => $_[0],
23 };
24 2 bless $self, $class;
25 }
26  
27 14 ▶sub _component {
Subroutine _component: called CC=2 SCAR=6.9
28 14 my $self = shift;
29 14 ▶ return @_ ? $self->{_component} = shift : $self->{_component};
Branch: 1 branch
BranchTrueFalseTotal
@_ ? : 1 13 14
30 }
31  
32 3 1;
33 __END__
« NicoVideo/Request.pm ↑ Summary NicoVideo/Response.pm »