blib/lib/Test2/Tools/Spec.pm

filter: Statementstmt 57.3% 196 / 342 Branchbran 28.8% 52 / 180 Conditioncond 21.1% 15 / 71 MC/DCmcdc 0.0% 0 / 47 Subroutinesub 70.2% 26 / 37 Podpod 80.9% 17 / 21 totaltotal 43.8% 306 / 698 CC 152 SCAR 31.7
CC
152
Cov
44%
include_workflow
30.0
after_all
29.8
after_case
29.8
CRAP 23.9
« blib/lib/Test2/Workflow/Runner.pm ↑ Summary blib/lib/Test2/API.pm »
1 package Test2::Tools::Spec;
2 35 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 35 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 35 our $VERSION = '1.302226';
6  
7 35 ▶use Carp qw/croak/;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 35 ▶use Test2::Workflow qw/parse_args build current_build root_build init_root build_stack/;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 35 ▶use Test2::API qw/test2_add_callback_testing_done/;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 35 ▶use Test2::Workflow::Runner();
Subroutine BEGIN: called CC=1 SCAR=0.0
13 35 ▶use Test2::Workflow::Task::Action();
Subroutine BEGIN: called CC=1 SCAR=0.0
14 35 ▶use Test2::Workflow::Task::Group();
Subroutine BEGIN: called CC=1 SCAR=0.0
15 35 ▶use Test2::Tools::Mock();
Subroutine BEGIN: called CC=1 SCAR=0.0
16 35 ▶use Test2::Util::Importer();
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 35 our (@EXPORT, @EXPORT_OK);
19 35 push @EXPORT => qw{describe cases};
20 35 push @EXPORT_OK => qw{include_workflow include_workflows spec_defaults};
21  
22 35 my %HANDLED;
23 34 ▶sub import {
Subroutine import: called CC=10 SCAR=26.3
24 34 my $class = shift;
25 34 my @caller = caller(0);
26  
27 34 my %root_args;
28 my %runner_args;
29 34 my @import;
30 34 ▶ while (my $arg = shift @_) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $arg = shift @_) 21 34 55
31 21 ▶ if ($arg =~ s/^-//) {
Branch: 1 branch
BranchTrueFalseTotal
if ($arg =~ s/^-//) { } 12 9 21
32 12 my $val = shift @_;
33  
34 12 ▶ if (Test2::Workflow::Runner->can($arg)) {
Branch: 4 branches
BranchTrueFalseTotal
if ('Test2::Workflow::Runner'->can($arg)) { } 12 0 12
elsif ('Test2::Workflow::Task::Group'->can($arg)) { } 0 0 0
elsif ($arg eq 'root_args') { } 0 0 0
elsif ($arg eq 'runner_args') { } 0 0 0
35 12 $runner_args{$arg} = $val;
36 }
37 elsif (Test2::Workflow::Task::Group->can($arg)) {
38 0 $root_args{$arg} = $val;
39 }
40 elsif ($arg eq 'root_args') {
41 0 %root_args = (%root_args, %$val);
42 }
43 elsif ($arg eq 'runner_args') {
44 0 %runner_args = (%runner_args, %$val);
45 }
46 else {
47 0 croak "Unrecognized arg: $arg";
48 }
49 }
50 else {
51 9 push @import => $arg;
52 }
53 }
54  
55 34 ▶ if ($HANDLED{$caller[0]}++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($HANDLED{$caller[0]}++) { } 0 34 34
56 0 ▶ croak "Package $caller[0] has already been initialized"
Branch: 1 branch
BranchTrueFalseTotal
if keys %root_args or keys %runner_args 0 0 0
Condition0%0/3
keys %root_args or keys %runner_args
l!l&&r!l&&!r
000
MC/DC0%0/2
keys %root_args or keys %runner_args
keys %root_args keys %runner_args
Truth table0%0/3
A or B
A= keys %root_argsB= keys %runner_args
ABresult
1X1
011
000
57 if keys(%root_args) || keys(%runner_args);
58 }
59 else {
60 my $root = init_root(
61 $caller[0],
62 frame => \@caller,
63 0 ▶ code => sub { 1 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
64 34 %root_args,
65 );
66  
67 34 my $runner = Test2::Workflow::Runner->new(%runner_args);
68  
69 Test2::Tools::Mock->add_handler(
70 $caller[0],
71 7 ▶ sub {
Subroutine __ANON__: called CC=4 SCAR=14.0
72 7 my %params = @_;
73 7 my ($class, $caller, $builder, $args) = @params{qw/class caller builder args/};
74  
75 7 my $do_it = eval "package $caller->[0];\n#line $caller->[2] \"$caller->[1]\"\nsub { \$runner\->add_mock(\$builder->()) }";
76  
77 # Running
78 7 ▶ if (@{$runner->stack}) {
Branch: 1 branch
BranchTrueFalseTotal
if (@{$runner->stack;}) { } 6 1 7
79 6 $do_it->();
80 }
81 else { # Not running
82 1 my $action = Test2::Workflow::Task::Action->new(
83 code => $do_it,
84 name => "mock $class",
85 frame => $caller,
86 scaffold => 1,
87 );
88  
89 1 ▶ my $build = current_build() || $root;
Condition33%1/3
current_build() || $root
l!l&&r!l&&!r
100
MC/DC0%0/2
current_build() || $root
current_build() $root
Truth table33%1/3
A || B
A= current_build()B= $root
ABresult
1X1
011
000
90  
91 1 $build->add_primary_setup($action);
92 1 ▶ $build->add_stash($builder->()) unless $build->is_root;
Branch: 1 branch
BranchTrueFalseTotal
unless $build->is_root 1 0 1
93 }
94  
95 7 return 1;
96 }
97 34 );
98  
99 test2_add_callback_testing_done(
100 34 ▶ sub {
Subroutine __ANON__: called CC=2 SCAR=6.9
101 34 ▶ return unless $root->populated;
Branch: 1 branch
BranchTrueFalseTotal
unless $root->populated 2 32 34
102 32 my $g = $root->compile;
103 32 $runner->push_task($g);
104 32 $runner->run;
105 }
106 34 );
107 }
108  
109 34 Test2::Util::Importer->import_into($class, $caller[0], @import);
110 }
111  
112 {
113 35 ▶ no warnings 'once';
Subroutine BEGIN: called CC=1 SCAR=0.0
114 35 *cases = \&describe;
115 35 *include_workflows = \&include_workflow;
116 }
117  
118 44 ▶sub describe {
Subroutine describe: called CC=5 SCAR=16.2
Pod undocumented
119 44 my @caller = caller(0);
120  
121 44 my $want = wantarray;
122  
123 44 ▶ my $build = build(args => \@_, caller => \@caller, stack_stop => defined $want ? 1 : 0);
Branch: 1 branch
BranchTrueFalseTotal
defined $want ? : 18 26 44
124  
125 44 ▶ return $build if defined $want;
Branch: 1 branch
BranchTrueFalseTotal
if defined $want 18 26 44
126  
127 26 ▶ my $current = current_build() || root_build($caller[0])
Branch: 1 branch
BranchTrueFalseTotal
my $current = current_build() || root_build($caller[0]) or croak("No current workflow build!") 26 0 26
Condition66%2/3
current_build() || root_build($caller[0])
l!l&&r!l&&!r
11150
MC/DC0%0/2
current_build() || root_build($caller[0])
current_build() root_build($caller[0])
Truth table66%2/3
A || B
A= current_build()B= root_build($caller[0])
ABresult
1X1
011
000
128 or croak "No current workflow build!";
129  
130 26 $current->add_primary($build);
131 }
132  
133 0 ▶sub include_workflow {
Subroutine include_workflow: not called CC=5 SCAR=34.0
Pod undocumented
134 0 my @caller = caller(0);
135  
136 0 ▶ my $build = current_build() || root_build(\$caller[0])
Branch: 1 branch
BranchTrueFalseTotal
my $build = current_build() || root_build(\$caller[0]) or croak("No current workflow build!") 0 0 0
Condition0%0/3
current_build() || root_build(\$caller[0])
l!l&&r!l&&!r
000
MC/DC0%0/2
current_build() || root_build(\$caller[0])
current_build() root_build(\$caller[0])
Truth table0%0/3
A || B
A= current_build()B= root_build(\$caller[0])
ABresult
1X1
011
000
137 or croak "No current workflow build!";
138  
139 0 for my $task (@_) {
140 0 ▶ croak "include_workflow only accepts Test2::Workflow::Task objects, got: $task"
Branch: 1 branch
BranchTrueFalseTotal
unless $task->isa("Test2::Workflow::Task") 0 0 0
141 unless $task->isa('Test2::Workflow::Task');
142  
143 0 $build->add_primary($task);
144 }
145 }
146  
147 431 ▶sub defaults {
Subroutine defaults: called CC=5 SCAR=16.1
Pod undocumented
148 431 my %params = @_;
149  
150 431 my ($package, $tool) = @params{qw/package tool/};
151  
152 431 my @stack = (root_build($package), build_stack());
153 431 ▶ return unless @stack;
Branch: 1 branch
BranchTrueFalseTotal
unless @stack 0 431 431
154  
155 431 my %out;
156 431 for my $build (@stack) {
157 839 ▶ %out = () if $build->stack_stop;
Branch: 1 branch
BranchTrueFalseTotal
if $build->stack_stop 225 614 839
158 839 ▶ my $new = $build->defaults->{$tool} or next;
Branch: 1 branch
BranchTrueFalseTotal
my $new = $build->defaults->{$tool} or next 63 776 839
159 63 %out = (%out, %$new);
160 }
161  
162 431 return \%out;
163 }
164  
165  
166 # Generate a bunch of subs that only have minor differences between them.
167 35 ▶BEGIN {
Subroutine BEGIN: called CC=3 SCAR=17.2
168 35 @EXPORT = qw{
169 tests it
170 case
171 before_all around_all after_all
172 before_case around_case after_case
173 before_each around_each after_each
174 };
175  
176 35 @EXPORT_OK = qw{
177 mini
178 iso miso
179 async masync
180 };
181  
182 35 my %stages = (
183 case => ['add_variant'],
184 tests => ['add_primary'],
185 it => ['add_primary'],
186  
187 iso => ['add_primary'],
188 miso => ['add_primary'],
189  
190 async => ['add_primary'],
191 masync => ['add_primary'],
192  
193 mini => ['add_primary'],
194  
195 before_all => ['add_setup'],
196 after_all => ['add_teardown'],
197 around_all => ['add_setup', 'add_teardown'],
198  
199 before_case => ['add_variant_setup'],
200 after_case => ['add_variant_teardown'],
201 around_case => ['add_variant_setup', 'add_variant_teardown'],
202  
203 before_each => ['add_primary_setup'],
204 after_each => ['add_primary_teardown'],
205 around_each => ['add_primary_setup', 'add_primary_teardown'],
206 );
207  
208 35 my %props = (
209 case => [],
210 tests => [],
211 it => [],
212  
213 iso => [iso => 1],
214 miso => [iso => 1, flat => 1],
215  
216 async => [async => 1],
217 masync => [async => 1, flat => 1],
218  
219 mini => [flat => 1],
220  
221 before_all => [scaffold => 1],
222 after_all => [scaffold => 1],
223 around_all => [scaffold => 1, around => 1],
224  
225 before_case => [scaffold => 1],
226 after_case => [scaffold => 1],
227 around_case => [scaffold => 1, around => 1],
228  
229 before_each => [scaffold => 1],
230 after_each => [scaffold => 1],
231 around_each => [scaffold => 1, around => 1],
232 );
233  
234 18 ▶ sub spec_defaults {
Subroutine spec_defaults: called CC=6 SCAR=20.9
Pod undocumented
235 18 my ($tool, %params) = @_;
236 18 my @caller = caller(0);
237  
238 croak "'$tool' is not a spec tool"
239 18 ▶ unless exists $props{$tool} || exists $stages{$tool};
Branch: 1 branch
BranchTrueFalseTotal
unless exists $props{$tool} or exists $stages{$tool} 0 18 18
Condition33%1/3
exists $props{$tool} or exists $stages{$tool}
l!l&&r!l&&!r
1800
MC/DC0%0/2
exists $props{$tool} or exists $stages{$tool}
exists $props{$tool} exists $stages{$tool}
Truth table33%1/3
A or B
A= exists $props{$tool}B= exists $stages{$tool}
ABresult
1X1
011
000
240  
241 18 ▶ my $build = current_build() || root_build($caller[0])
Branch: 1 branch
BranchTrueFalseTotal
my $build = current_build() || root_build($caller[0]) or croak("No current workflow build!") 18 0 18
Condition33%1/3
current_build() || root_build($caller[0])
l!l&&r!l&&!r
0180
MC/DC0%0/2
current_build() || root_build($caller[0])
current_build() root_build($caller[0])
Truth table33%1/3
A || B
A= current_build()B= root_build($caller[0])
ABresult
1X1
011
000
242 or croak "No current workflow build!";
243  
244 18 ▶ my $old = $build->defaults->{$tool} ||= {};
Condition50%1/2
$build->defaults->{$tool} ||= {}
l!l
018
MC/DC0%0/1
$build->defaults->{$tool} ||= {}
$build->defaults->{$tool}
Truth table50%1/2
A
A= $build->defaults->{$tool}
Aresult
11
00
245 18 $build->defaults->{$tool} = { %$old, %params };
246 }
247  
248 35 my $run = "";
249 35 for my $func (@EXPORT, @EXPORT_OK) {
250 595 $run .= <<" EOT";
251 595 #line ${ \(__LINE__ + 1) } "${ \__FILE__ }"
252 18 ▶sub $func {
Subroutine after_all: called CC=8 SCAR=33.9
Subroutine after_case: not called CC=8 SCAR=33.9
Subroutine after_each: called CC=8 SCAR=33.9
Subroutine around_all: called CC=8 SCAR=33.9
Subroutine around_case: not called CC=8 SCAR=33.9
Subroutine around_each: called CC=8 SCAR=33.9
Subroutine async: not called CC=8 SCAR=33.9
Subroutine before_all: called CC=8 SCAR=33.9
Subroutine before_case: not called CC=8 SCAR=33.9
Subroutine before_each: called CC=8 SCAR=33.9
Subroutine case: called CC=8 SCAR=33.9
Subroutine iso: not called CC=8 SCAR=33.9
Subroutine it: not called CC=8 SCAR=33.9
Subroutine masync: not called CC=8 SCAR=33.9
Subroutine mini: not called CC=8 SCAR=33.9
Subroutine miso: not called CC=8 SCAR=33.9
Subroutine tests: called CC=8 SCAR=33.9
Pod documented
Pod documented
Pod documented
Pod documented
Pod documented
Pod documented
Pod documented
Pod documented
Pod documented
Pod documented
Pod documented
Pod documented
Pod documented
Pod documented
Pod documented
Pod documented
Pod documented
253 0 my \@caller = caller(0);
254 0 my \$args = parse_args(args => \\\@_, caller => \\\@caller);
255 0 my \$action = Test2::Workflow::Task::Action->new(\@{\$props{$func}}, %\$args);
256  
257 0 ▶ return \$action if defined wantarray;
Branch: 17 branches
BranchTrueFalseTotal
if defined wantarray 0 18 18
if defined wantarray 0 0 0
if defined wantarray 0 18 18
if defined wantarray 0 18 18
if defined wantarray 0 0 0
if defined wantarray 0 19 19
if defined wantarray 0 0 0
if defined wantarray 0 20 20
if defined wantarray 0 0 0
if defined wantarray 0 19 19
if defined wantarray 0 60 60
if defined wantarray 0 0 0
if defined wantarray 0 0 0
if defined wantarray 0 0 0
if defined wantarray 0 0 0
if defined wantarray 0 0 0
if defined wantarray 1 259 260
258  
259 0 ▶ my \$build = current_build() || root_build(\$caller[0])
Branch: 17 branches
BranchTrueFalseTotal
my $build = current_build() || root_build($caller[0]) or croak("No current workflow build!") 18 0 18
my $build = current_build() || root_build($caller[0]) or croak("No current workflow build!") 0 0 0
my $build = current_build() || root_build($caller[0]) or croak("No current workflow build!") 18 0 18
my $build = current_build() || root_build($caller[0]) or croak("No current workflow build!") 18 0 18
my $build = current_build() || root_build($caller[0]) or croak("No current workflow build!") 0 0 0
my $build = current_build() || root_build($caller[0]) or croak("No current workflow build!") 19 0 19
my $build = current_build() || root_build($caller[0]) or croak("No current workflow build!") 0 0 0
my $build = current_build() || root_build($caller[0]) or croak("No current workflow build!") 20 0 20
my $build = current_build() || root_build($caller[0]) or croak("No current workflow build!") 0 0 0
my $build = current_build() || root_build($caller[0]) or croak("No current workflow build!") 19 0 19
my $build = current_build() || root_build($caller[0]) or croak("No current workflow build!") 60 0 60
my $build = current_build() || root_build($caller[0]) or croak("No current workflow build!") 0 0 0
my $build = current_build() || root_build($caller[0]) or croak("No current workflow build!") 0 0 0
my $build = current_build() || root_build($caller[0]) or croak("No current workflow build!") 0 0 0
my $build = current_build() || root_build($caller[0]) or croak("No current workflow build!") 0 0 0
my $build = current_build() || root_build($caller[0]) or croak("No current workflow build!") 0 0 0
my $build = current_build() || root_build($caller[0]) or croak("No current workflow build!") 259 0 259
Condition17%9/51
current_build() || root_build($caller[0])
l!l&&r!l&&!r
1800
current_build() || root_build($caller[0])
l!l&&r!l&&!r
000
current_build() || root_build($caller[0])
l!l&&r!l&&!r
1800
current_build() || root_build($caller[0])
l!l&&r!l&&!r
1800
current_build() || root_build($caller[0])
l!l&&r!l&&!r
000
current_build() || root_build($caller[0])
l!l&&r!l&&!r
1900
current_build() || root_build($caller[0])
l!l&&r!l&&!r
000
current_build() || root_build($caller[0])
l!l&&r!l&&!r
2000
current_build() || root_build($caller[0])
l!l&&r!l&&!r
000
current_build() || root_build($caller[0])
l!l&&r!l&&!r
1900
current_build() || root_build($caller[0])
l!l&&r!l&&!r
6000
current_build() || root_build($caller[0])
l!l&&r!l&&!r
000
current_build() || root_build($caller[0])
l!l&&r!l&&!r
000
current_build() || root_build($caller[0])
l!l&&r!l&&!r
000
current_build() || root_build($caller[0])
l!l&&r!l&&!r
000
current_build() || root_build($caller[0])
l!l&&r!l&&!r
000
current_build() || root_build($caller[0])
l!l&&r!l&&!r
1171420
MC/DC0%0/2
current_build() || root_build($caller[0])
current_build() root_build($caller[0])
MC/DC0%0/2
current_build() || root_build($caller[0])
current_build() root_build($caller[0])
MC/DC0%0/2
current_build() || root_build($caller[0])
current_build() root_build($caller[0])
MC/DC0%0/2
current_build() || root_build($caller[0])
current_build() root_build($caller[0])
MC/DC0%0/2
current_build() || root_build($caller[0])
current_build() root_build($caller[0])
MC/DC0%0/2
current_build() || root_build($caller[0])
current_build() root_build($caller[0])
MC/DC0%0/2
current_build() || root_build($caller[0])
current_build() root_build($caller[0])
MC/DC0%0/2
current_build() || root_build($caller[0])
current_build() root_build($caller[0])
MC/DC0%0/2
current_build() || root_build($caller[0])
current_build() root_build($caller[0])
MC/DC0%0/2
current_build() || root_build($caller[0])
current_build() root_build($caller[0])
MC/DC0%0/2
current_build() || root_build($caller[0])
current_build() root_build($caller[0])
MC/DC0%0/2
current_build() || root_build($caller[0])
current_build() root_build($caller[0])
MC/DC0%0/2
current_build() || root_build($caller[0])
current_build() root_build($caller[0])
MC/DC0%0/2
current_build() || root_build($caller[0])
current_build() root_build($caller[0])
MC/DC0%0/2
current_build() || root_build($caller[0])
current_build() root_build($caller[0])
MC/DC0%0/2
current_build() || root_build($caller[0])
current_build() root_build($caller[0])
MC/DC0%0/2
current_build() || root_build($caller[0])
current_build() root_build($caller[0])
Truth table33%1/3
A || B
A= current_build()B= root_build($caller[0])
ABresult
1X1
011
000
Truth table0%0/3
A || B
A= current_build()B= root_build($caller[0])
ABresult
1X1
011
000
Truth table33%1/3
A || B
A= current_build()B= root_build($caller[0])
ABresult
1X1
011
000
Truth table33%1/3
A || B
A= current_build()B= root_build($caller[0])
ABresult
1X1
011
000
Truth table0%0/3
A || B
A= current_build()B= root_build($caller[0])
ABresult
1X1
011
000
Truth table33%1/3
A || B
A= current_build()B= root_build($caller[0])
ABresult
1X1
011
000
Truth table0%0/3
A || B
A= current_build()B= root_build($caller[0])
ABresult
1X1
011
000
Truth table33%1/3
A || B
A= current_build()B= root_build($caller[0])
ABresult
1X1
011
000
Truth table0%0/3
A || B
A= current_build()B= root_build($caller[0])
ABresult
1X1
011
000
Truth table33%1/3
A || B
A= current_build()B= root_build($caller[0])
ABresult
1X1
011
000
Truth table33%1/3
A || B
A= current_build()B= root_build($caller[0])
ABresult
1X1
011
000
Truth table0%0/3
A || B
A= current_build()B= root_build($caller[0])
ABresult
1X1
011
000
Truth table0%0/3
A || B
A= current_build()B= root_build($caller[0])
ABresult
1X1
011
000
Truth table0%0/3
A || B
A= current_build()B= root_build($caller[0])
ABresult
1X1
011
000
Truth table0%0/3
A || B
A= current_build()B= root_build($caller[0])
ABresult
1X1
011
000
Truth table0%0/3
A || B
A= current_build()B= root_build($caller[0])
ABresult
1X1
011
000
Truth table66%2/3
A || B
A= current_build()B= root_build($caller[0])
ABresult
1X1
011
000
260 or croak "No current workflow build!";
261  
262 0 ▶ if (my \$defaults = defaults(package => \$caller[0], tool => '$func')) {
Branch: 17 branches
BranchTrueFalseTotal
if (my $defaults = defaults("package", $caller[0], "tool", "after_all")) 18 0 18
if (my $defaults = defaults("package", $caller[0], "tool", "after_case")) 0 0 0
if (my $defaults = defaults("package", $caller[0], "tool", "after_each")) 18 0 18
if (my $defaults = defaults("package", $caller[0], "tool", "around_all")) 18 0 18
if (my $defaults = defaults("package", $caller[0], "tool", "around_case")) 0 0 0
if (my $defaults = defaults("package", $caller[0], "tool", "around_each")) 19 0 19
if (my $defaults = defaults("package", $caller[0], "tool", "async")) 0 0 0
if (my $defaults = defaults("package", $caller[0], "tool", "before_all")) 20 0 20
if (my $defaults = defaults("package", $caller[0], "tool", "before_case")) 0 0 0
if (my $defaults = defaults("package", $caller[0], "tool", "before_each")) 19 0 19
if (my $defaults = defaults("package", $caller[0], "tool", "case")) 60 0 60
if (my $defaults = defaults("package", $caller[0], "tool", "iso")) 0 0 0
if (my $defaults = defaults("package", $caller[0], "tool", "it")) 0 0 0
if (my $defaults = defaults("package", $caller[0], "tool", "masync")) 0 0 0
if (my $defaults = defaults("package", $caller[0], "tool", "mini")) 0 0 0
if (my $defaults = defaults("package", $caller[0], "tool", "miso")) 0 0 0
if (my $defaults = defaults("package", $caller[0], "tool", "tests")) 259 0 259
263 0 for my \$attr (keys \%\$defaults) {
264 0 ▶ next if defined \$action->\$attr;
Branch: 17 branches
BranchTrueFalseTotal
if defined $action->$attr 0 0 0
if defined $action->$attr 0 0 0
if defined $action->$attr 0 0 0
if defined $action->$attr 0 0 0
if defined $action->$attr 0 0 0
if defined $action->$attr 0 0 0
if defined $action->$attr 0 0 0
if defined $action->$attr 0 0 0
if defined $action->$attr 0 0 0
if defined $action->$attr 0 0 0
if defined $action->$attr 18 18 36
if defined $action->$attr 0 0 0
if defined $action->$attr 0 0 0
if defined $action->$attr 0 0 0
if defined $action->$attr 0 0 0
if defined $action->$attr 0 0 0
if defined $action->$attr 0 72 72
265 0 my \$sub = "set_\$attr";
266 0 \$action->\$sub(\$defaults->{\$attr});
267 }
268 }
269  
270 0 \$build->\$_(\$action) for \@{\$stages{$func}};
271 }
272 EOT
273 }
274  
275 35 my ($ok, $err);
276 {
277 35 local $@;
278 35 $ok = eval "$run\n1";
279 35 $err = $@;
280 }
281  
282 35 ▶ die $@ unless $ok;
Branch: 1 branch
BranchTrueFalseTotal
unless $ok 0 35 35
283 }
284  
285 35 1;
286  
287 __END__
« blib/lib/Test2/Workflow/Runner.pm ↑ Summary blib/lib/Test2/API.pm »