| 1 | package Outthentic::Story::Stat; | ||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | 1 | my @stories; | |||||||||
| 5 | my $current; | ||||||||||
| 6 | |||||||||||
| 7 | 0 | ▶ | sub current { | ||||||||
|
Subroutine
current: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 8 | |||||||||||
| 9 | 0 | my $class = shift; | |||||||||
| 10 | 0 | ▶ | $current || {}; # we return "fake" current for upstream stories | ||||||||
|
Branch: 1 branch
| |||||||||||
| 11 | |||||||||||
| 12 | } | ||||||||||
| 13 | |||||||||||
| 14 | 0 | ▶ | sub all { | ||||||||
|
Subroutine
all: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 15 | 0 | my $class = shift; | |||||||||
| 16 | @stories | ||||||||||
| 17 | 0 | } | |||||||||
| 18 | |||||||||||
| 19 | 0 | ▶ | sub failures { | ||||||||
|
Subroutine
failures: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 20 | 0 | my $class = shift; | |||||||||
| 21 | 0 | grep { $_->{status} == 0 } $class->all | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 0 | ▶ | sub new_story { | ||||||||
|
Subroutine
new_story: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 25 | |||||||||||
| 26 | # gets called in Outthentic::Story::run_story | ||||||||||
| 27 | # for downstream stories only | ||||||||||
| 28 | 0 | my $class = shift; | |||||||||
| 29 | 0 | my $data = shift; | |||||||||
| 30 | 0 | push @stories, { vars => {} , %$data , status => 1 }; | |||||||||
| 31 | 0 | $current = $stories[-1]; | |||||||||
| 32 | |||||||||||
| 33 | } | ||||||||||
| 34 | |||||||||||
| 35 | 0 | ▶ | sub add_check_stat { | ||||||||
|
Subroutine
add_check_stat: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 36 | |||||||||||
| 37 | 0 | my $class = shift; | |||||||||
| 38 | 0 | my $data = shift; | |||||||||
| 39 | |||||||||||
| 40 | 0 | push @{$class->current->{check_stat}}, $data; | |||||||||
| 41 | |||||||||||
| 42 | } | ||||||||||
| 43 | |||||||||||
| 44 | 0 | ▶ | sub set_stdout { | ||||||||
|
Subroutine
set_stdout: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 45 | |||||||||||
| 46 | 0 | my $class = shift; | |||||||||
| 47 | 0 | my $stdout = shift; | |||||||||
| 48 | |||||||||||
| 49 | 0 | $class->current->{stdout} = $stdout; | |||||||||
| 50 | |||||||||||
| 51 | } | ||||||||||
| 52 | |||||||||||
| 53 | 0 | ▶ | sub set_scenario_status { | ||||||||
|
Subroutine
set_scenario_status: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 54 | |||||||||||
| 55 | 0 | my $class = shift; | |||||||||
| 56 | 0 | my $status = shift; | |||||||||
| 57 | |||||||||||
| 58 | 0 | $class->current->{scenario_status} = $status; | |||||||||
| 59 | |||||||||||
| 60 | } | ||||||||||
| 61 | |||||||||||
| 62 | 0 | ▶ | sub set_status { | ||||||||
|
Subroutine
set_status: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 63 | |||||||||||
| 64 | 0 | my $class = shift; | |||||||||
| 65 | 0 | my $status = shift; | |||||||||
| 66 | |||||||||||
| 67 | 0 | $class->current->{status} = $status; | |||||||||
| 68 | |||||||||||
| 69 | } | ||||||||||
| 70 | |||||||||||
| 71 | 1 | 1; | |||||||||
| 72 | |||||||||||
| 73 | |||||||||||