| 1 | package Class::Param::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 base 'Class::Param::Base'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 3 | our $AUTOLOAD; | |||||||||
| 8 | |||||||||||
| 9 | 3 | ▶ | use Params::Validate qw[]; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 2 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||
| 12 | 2 | ▶ | my $class = ref $_[0] ? ref shift : shift; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 13 | 2 | my $self = Params::Validate::validate_with( | |||||||||
| 14 | params => \@_, | ||||||||||
| 15 | spec => [ | ||||||||||
| 16 | { | ||||||||||
| 17 | type => Params::Validate::OBJECT, | ||||||||||
| 18 | isa => 'Class::Param::Base', | ||||||||||
| 19 | optional => 0 | ||||||||||
| 20 | } | ||||||||||
| 21 | ], | ||||||||||
| 22 | called => "$class\::new" | ||||||||||
| 23 | ); | ||||||||||
| 24 | |||||||||||
| 25 | 2 | return bless( $self, $class )->initialize(@_); | |||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | 1 | ▶ | sub initialize { | ||||||||
|
Subroutine
initialize: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 29 | 1 | return $_[0]; | |||||||||
| 30 | } | ||||||||||
| 31 | |||||||||||
| 32 | 51 | ▶ | sub decorated { | ||||||||
|
Subroutine
decorated: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 33 | 51 | return $_[0]->[0]; | |||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | 1 | ▶ | sub get { return shift->decorated->get (@_) } | ||||||||
|
Subroutine
get: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 37 | 0 | ▶ | sub set { return shift->decorated->set (@_) } | ||||||||
|
Subroutine
set: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 38 | 4 | ▶ | sub has { return shift->decorated->has (@_) } | ||||||||
|
Subroutine
has: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 39 | 0 | ▶ | sub count { return shift->decorated->count (@_) } | ||||||||
|
Subroutine
count: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 40 | 0 | ▶ | sub clear { return shift->decorated->clear (@_) } | ||||||||
|
Subroutine
clear: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 41 | 0 | ▶ | sub names { return shift->decorated->names (@_) } | ||||||||
|
Subroutine
names: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 42 | 0 | ▶ | sub remove { return shift->decorated->remove (@_) } | ||||||||
|
Subroutine
remove: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 43 | |||||||||||
| 44 | 0 | ▶ | sub AUTOLOAD { | ||||||||
|
Subroutine
AUTOLOAD: not called CC=1 SCAR=6.9
| |||||||||||
| 45 | 0 | my $self = shift; | |||||||||
| 46 | 0 | my $method = substr( $AUTOLOAD, rindex( $AUTOLOAD, ':' ) + 1 ); | |||||||||
| 47 | 0 | return $self->decorated->$method(@_); | |||||||||
| 48 | } | ||||||||||
| 49 | |||||||||||
| 50 | 0 | ▶ | sub DESTROY { } | ||||||||
|
Subroutine
DESTROY: not called CC=1 SCAR=0.0
| |||||||||||
| 51 | |||||||||||
| 52 | 3 | 1; | |||||||||
| 53 | |||||||||||
| 54 | __END__ | ||||||||||