| 1 | package WebService::GrowthBook::Result; | ||||||||||
| 2 | |||||||||||
| 3 | 4 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 4 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 4 | ▶ | no indirect; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 4 | ▶ | use Object::Pad; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 4 | our $VERSION = '0.003'; ## VERSION | |||||||||
| 9 | |||||||||||
| 10 | class WebService::GrowthBook::Result{ | ||||||||||
| 11 | 0 | ▶ | field $variation_id :param :reader; | ||||||||
|
Subroutine
variation_id: not called CC=1 SCAR=2.6
Pod
undocumented
| |||||||||||
| 12 | 82 | ▶ | field $in_experiment :param :reader; | ||||||||
|
Subroutine
in_experiment: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 13 | 78 | ▶ | field $value :param :reader; | ||||||||
|
Subroutine
value: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 14 | 70 | ▶ | field $hash_used :param :reader; | ||||||||
|
Subroutine
hash_used: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 15 | 0 | ▶ | field $hash_attribute :param :reader; | ||||||||
|
Subroutine
hash_attribute: not called CC=1 SCAR=2.6
Pod
undocumented
| |||||||||||
| 16 | 0 | ▶ | field $hash_value :param :reader; | ||||||||
|
Subroutine
hash_value: not called CC=1 SCAR=2.6
Pod
undocumented
| |||||||||||
| 17 | 0 | ▶ | field $feature_id :param :reader; | ||||||||
|
Subroutine
feature_id: not called CC=1 SCAR=2.6
Pod
undocumented
| |||||||||||
| 18 | field $bucket :param :reader //= undef; | ||||||||||
| 19 | 7 | ▶ | field $sticky_bucket_used :param :reader //= undef; | ||||||||
|
Subroutine
bucket: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 20 | 0 | ▶ | field $meta :param //= undef; | ||||||||
|
Subroutine
sticky_bucket_used: not called CC=1 SCAR=2.6
Pod
undocumented
| |||||||||||
| 21 | 4 | field $key :reader //= undef; | |||||||||
| 22 | |||||||||||
| 23 | 0 | ▶ | field $name :reader //= ""; | ||||||||
|
Subroutine
key: not called CC=1 SCAR=3.5
Pod
undocumented
| |||||||||||
| 24 | 0 | ▶ | field $passthrough :reader //= 0;; | ||||||||
|
Subroutine
name: not called CC=1 SCAR=0.1
Subroutine
passthrough: called CC=1 SCAR=0.1
Pod
undocumented
Pod
undocumented
| |||||||||||
| 25 | |||||||||||
| 26 | 82 | ▶ | sub BUILDARGS { | ||||||||
|
Subroutine
BUILDARGS: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 27 | 82 | my $class = shift; | |||||||||
| 28 | 82 | my %args = @_; | |||||||||
| 29 | 82 | return %args; | |||||||||
| 30 | } | ||||||||||
| 31 | |||||||||||
| 32 | ADJUST { | ||||||||||
| 33 | $key = defined($variation_id) ? "$variation_id" : undef; | ||||||||||
| 34 | $name = $meta->{name} if exists $meta->{name}; | ||||||||||
| 35 | $key = $meta->{key} if exists $meta->{key}; | ||||||||||
| 36 | $passthrough = $meta->{passthrough} if exists $meta->{passthrough}; | ||||||||||
| 37 | } | ||||||||||
| 38 | |||||||||||
| 39 | 4 | ▶ | method to_hash { | ||||||||
|
Subroutine
to_hash: called CC=5 SCAR=16.2
Pod
undocumented
| |||||||||||
| 40 | 8 | my %obj = ( | |||||||||
| 41 | featureId => $feature_id, | ||||||||||
| 42 | variationId => $variation_id, | ||||||||||
| 43 | inExperiment => $in_experiment, | ||||||||||
| 44 | value => $value, | ||||||||||
| 45 | hashUsed => $hash_used, | ||||||||||
| 46 | hashAttribute => $hash_attribute, | ||||||||||
| 47 | hashValue => $hash_value, | ||||||||||
| 48 | key => $key, | ||||||||||
| 49 | ); | ||||||||||
| 50 | |||||||||||
| 51 | 8 | ▶ | $obj{stickyBucketUsed} = $sticky_bucket_used if $sticky_bucket_used; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 52 | 8 | ▶ | $obj{bucket} = $self->bucket if defined $bucket; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 53 | 8 | ▶ | $obj{name} = $name if $name; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 54 | 8 | ▶ | $obj{passthrough} = 1 if $self->passthrough; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 55 | |||||||||||
| 56 | 8 | return \%obj; | |||||||||
| 57 | 4 | } | |||||||||
| 58 | |||||||||||
| 59 | |||||||||||
| 60 | } | ||||||||||
| 61 | |||||||||||
| 62 | 4 | 1; | |||||||||