| 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
| |||||||||||||||||||||
| 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
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table33%1/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 30 | } | ||||||||||||||||||||
| 31 | |||||||||||||||||||||
| 32 | 3 | 1; | |||||||||||||||||||
| 33 | __END__ | ||||||||||||||||||||