blib/lib/OpenTracing/WrapScope.pm

filter: Statementstmt 98.3% 244 / 248 Branchbran 89.2% 100 / 112 Conditioncond 70.5% 12 / 17 MC/DCmcdc 45.4% 5 / 11 Subroutinesub 100% 43 / 43 Podpod 100% 3 / 3 totaltotal 93.7% 407 / 434 CC 67 SCAR 16.1
CC
67
Cov
94%
_parse_slice
10.1
import
10.0
_parse_signature
8.0
CRAP 5.0
« bin/opentracing_wrapscope_generator ↑ Summary blib/lib/OpenTracing/AutoScope.pm »
1 package OpenTracing::WrapScope;
2 19 our $VERSION = 'v0.107.2';
3 19 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 19 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 19 ▶use warnings::register;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 19 ▶use feature qw[ state ];
Subroutine BEGIN: called CC=1 SCAR=0.0
7 19 ▶use B::Hooks::OP::Check::LeaveEval;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 19 ▶use Caller::Hide qw/hide_package/;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 19 ▶use Carp qw/croak/;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 19 ▶use List::Util qw/uniq/;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 19 ▶use OpenTracing::GlobalTracer;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 19 ▶use PerlX::Maybe;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 19 ▶use Scalar::Util qw/blessed/;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 19 ▶use Sub::Info qw/sub_info/;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 19 hide_package(__PACKAGE__);
17  
18 19 my %subs_to_install;
19 END {
20 19 ▶ foreach my $sub (keys %subs_to_install) {
Subroutine END: called CC=3 SCAR=11.0
21 4 ▶ next unless $subs_to_install{$sub}{warn_undetected};
Branch: 1 branch
BranchTrueFalseTotal
unless $subs_to_install{$sub}{"warn_undetected"} 2 2 4
22 2 warnings::warn "OpenTracing::WrapScope couldn't find sub: $sub";
23 }
24 }
25  
26 sub _register_to_install {
27 48 ▶ my ($signature, %args) = @_;
Subroutine _register_to_install: called CC=1 SCAR=0.0
28 48 my $warn_undetected = $args{warn_undetected};
29  
30 48 my ($sub) = _split_signature($signature);
31 48 $subs_to_install{$sub} = {%args, signature => $signature };
32  
33 48 return;
34 }
35  
36 sub _split_signature {
37 99 ▶ my ($sig) = @_;
Subroutine _split_signature: called CC=2 SCAR=6.9
38 99 ▶ return $sig unless $sig =~ s/\s*\((.*)\)\s*\z//;
Branch: 1 branch
BranchTrueFalseTotal
unless $sig =~ s/\s*\((.*)\)\s*\z// 96 3 99
39 3 return ($sig, $1); # just the name left over
40 }
41  
42 # try to install any available subs whenever we get new code
43 B::Hooks::OP::Check::LeaveEval::register(sub {
44 1430 ▶ return unless %subs_to_install;
Subroutine __ANON__: called CC=4 SCAR=13.9
Branch: 1 branch
BranchTrueFalseTotal
unless %subs_to_install 1158 272 1430
45  
46 272 foreach my $sub (keys %subs_to_install) {
47 497 ▶ next unless defined &$sub;
Branch: 1 branch
BranchTrueFalseTotal
unless defined &$sub 453 44 497
48 44 install_wrapped($subs_to_install{$sub}{signature});
49 44 delete $subs_to_install{$sub};
50 }
51 272 return;
52 19 });
53  
54 sub import {
55 24 ▶ shift; # __PACKAGE__
Subroutine import: called CC=10 SCAR=23.0
56 24 my $target_package = caller;
57  
58 24 my $warn_undetected = 1;
59 24 my ($use_env, @subs, @files);
60 24 ▶ while (my (undef, $arg) = each @_) {
Branch: 1 branch
BranchTrueFalseTotal
if (my(undef, $arg) = each @_) 40 24 64
61 40 ▶ if ($arg eq '-env') {
Branch: 3 branches
BranchTrueFalseTotal
if ($arg eq '-env') { } 2 38 40
elsif ($arg eq '-file') { } 2 36 38
elsif ($arg eq '-quiet') { } 2 34 36
62 2 $use_env = 1;
63 }
64 elsif ($arg eq '-file') {
65 2 ▶ my (undef, $next) = each @_ or last;
Branch: 1 branch
BranchTrueFalseTotal
my(undef, $next) = each @_ or last 0 2 2
66 2 ▶ push @files, ref $next eq 'ARRAY' ? @$next : $next;
Branch: 1 branch
BranchTrueFalseTotal
ref $next eq 'ARRAY' ? : 1 1 2
67 }
68 elsif ($arg eq '-quiet') {
69 2 $warn_undetected = 0;
70 }
71 else {
72 34 push @subs, _qualify_sub($arg, $target_package);
73 }
74 }
75 24 ▶ if ($use_env and $ENV{OPENTRACING_WRAPSCOPE_FILE}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($use_env and $ENV{"OPENTRACING_WRAPSCOPE_FILE"}) 2 22 24
Condition66%2/3
$use_env and $ENV{"OPENTRACING_WRAPSCOPE_FILE"}
!ll&&!rl&&r
2202
MC/DC50%1/2
$use_env and $ENV{"OPENTRACING_WRAPSCOPE_FILE"}
$use_env $ENV{"OPENTRACING_WRAPSCOPE_FILE"}
Truth table66%2/3
A and B
A= $use_envB= $ENV{"OPENTRACING_WRAPSCOPE_FILE"}
ABresult
0X0
100
111
76 2 push @files, split ':', $ENV{OPENTRACING_WRAPSCOPE_FILE};
77 }
78 24 push @subs, map { _load_sub_spec($_) } grep { -f } map { glob } uniq @files;
79  
80 24 foreach my $sub (@subs) {
81 48 _register_to_install($sub, warn_undetected => $warn_undetected);
82 }
83  
84 24 return;
85 }
86  
87 sub install_wrapped {
88 52 ▶ foreach my $sub (@_) {
Subroutine install_wrapped: called CC=5 SCAR=16.1
Pod documented
89 51 my ($sub_name, $args) = _split_signature($sub);
90 51 my $full_sub = _qualify_sub($sub_name, scalar caller);
91  
92 51 ▶ if (not defined &$full_sub) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined &$full_sub) 2 49 51
93 2 warnings::warn "Couldn't find sub: $full_sub";
94 1 next;
95 }
96  
97 49 my $wrapped = wrapped(\&$full_sub, $args);
98  
99 49 my ($class, $method) = split /(?:'|::)(?=\w+\z)/, $full_sub;
100 49 ▶ if (_is_moose_class($class)) { # Moose complains about replaced subs
Branch: 1 branch
BranchTrueFalseTotal
if (_is_moose_class($class)) { } 5 44 49
101 5 ▶ if ($class->meta->is_immutable) {
Branch: 1 branch
BranchTrueFalseTotal
if ($class->meta->is_immutable) 1 4 5
102 1 warnings::warn "Can't wrap Moose method $sub from an immutable class";
103 1 next;
104 }
105 4 $class->meta->add_method($method => $wrapped);
106 }
107 else {
108 19 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
109 19 ▶ no warnings 'redefine';
Subroutine BEGIN: called CC=1 SCAR=0.0
110 44 *$full_sub = $wrapped;
111 }
112 }
113 51 return;
114 }
115  
116 sub _is_moose_class {
117 49 ▶ my ($class) = @_;
Subroutine _is_moose_class: called CC=3 SCAR=11.3
118 49 ▶ my $meta = eval { $class->meta } or return;
Branch: 1 branch
BranchTrueFalseTotal
my $meta = eval { do { $class->meta } } or return 44 5 49
119 5 ▶ return blessed $meta && $meta->isa('Moose::Meta::Class');
Condition33%1/3
builtin::blessed($meta) && $meta->isa('Moose::Meta::Class')
!ll&&!rl&&r
005
MC/DC0%0/2
builtin::blessed($meta) && $meta->isa('Moose::Meta::Class')
builtin::blessed($meta) $meta->isa('Moose::Meta::Class')
Truth table33%1/3
A && B
A= builtin::blessed($meta)B= $meta->isa('Moose::Meta::Class')
ABresult
0X0
100
111
120 }
121  
122 sub wrapped {
123 76 ▶ my ($coderef, $signature) = @_;
Subroutine wrapped: called CC=1 SCAR=0.1
Pod documented
124 76 my $info = sub_info($coderef);
125 76 my @tag_generators = _parse_signature($signature);
126  
127 return sub {
128 78 ▶ my ($call_package, $call_filename, $call_line) = caller(0);
Subroutine __ANON__: called CC=7 SCAR=19.9
Subroutine pre: called CC=7 SCAR=19.9
129 78 my $call_sub = (caller(1))[3];
130
131 78 my $tracer = OpenTracing::GlobalTracer->get_global_tracer;
132 my $scope = $tracer->start_active_span(
133 "$info->{package}::$info->{name}",
134 tags => {
135 'source.subname' => $info->{name},
136 'source.file' => $info->{file},
137 'source.line' => $info->{start_line},
138 'source.package' => $info->{package},
139 maybe
140 'caller.subname' => $call_sub,
141 'caller.file' => $call_filename,
142 'caller.line' => $call_line,
143 'caller.package' => $call_package,
144 78 map { $_->(@_) } @tag_generators,
145 },
146 );
147  
148 78 my $result;
149 78 my $wantarray = wantarray; # eval will have its own
150 78 my $ok = eval {
151 78 ▶ if (defined $wantarray) {
Branch: 2 branches
BranchTrueFalseTotal
if (defined $wantarray) { } 4 74 78
if (defined $wantarray) { } 0 4 4
152 4 ▶ $result = $wantarray ? [&$coderef] : &$coderef;
Branch: 2 branches
BranchTrueFalseTotal
$wantarray ? : 2 2 4
$wantarray ? : 0 0 0
153 }
154 else {
155 74 &$coderef;
156 }
157 77 1;
158 };
159 # TODO: message should go to logs but we don't have those yet
160 78 ▶ $scope->get_span->add_tags(error => 1, message => "$@") unless $ok;
Branch: 2 branches
BranchTrueFalseTotal
unless $ok 1 77 78
unless $ok 0 4 4
161 78 $scope->close();
162  
163 78 ▶ die $@ unless $ok;
Branch: 2 branches
BranchTrueFalseTotal
unless $ok 1 77 78
unless $ok 0 4 4
164 77 ▶ return if not defined wantarray;
Branch: 2 branches
BranchTrueFalseTotal
unless defined wantarray 73 4 77
unless defined wantarray 4 0 4
165 4 ▶ return wantarray ? @$result : $result;
Branch: 2 branches
BranchTrueFalseTotal
wantarray ? : 2 2 4
wantarray ? : 0 0 0
166 69 };
167 }
168  
169 106 ▶sub _is_qualified { $_[0] =~ /\A\w+(?:'|::)/ }
Subroutine _is_qualified: called CC=1 SCAR=0.0
170  
171 sub _qualify_sub {
172 85 ▶ my ($sub, $pkg) = @_;
Subroutine _qualify_sub: called CC=2 SCAR=6.9
173 85 ▶ return $sub if _is_qualified($sub);
Branch: 1 branch
BranchTrueFalseTotal
if _is_qualified($sub) 58 27 85
174 27 $sub =~ s/\A(\w+)/${pkg}::$1/;
175 27 return $sub;
176 }
177  
178 sub _load_sub_spec {
179 15 ▶ my ($filename) = @_;
Subroutine _load_sub_spec: called CC=5 SCAR=16.1
180  
181 15 ▶ open my $fh_subs, '<', $filename or die "$filename: $!";
Branch: 1 branch
BranchTrueFalseTotal
open my $fh_subs, "<", $filename or die "${filename}: $!" 0 15 15
182  
183 15 my @subs;
184 15 ▶ while (<$fh_subs>) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined($_ = readline $fh_subs)) 25 12 37
185 25 chomp;
186 25 s/\s*#.*\Z//; # remove comments
187 25 ▶ next unless $_;
Branch: 1 branch
BranchTrueFalseTotal
unless $_ 4 21 25
188  
189 21 ▶ croak "Unqualified subroutine: $_" unless _is_qualified($_);
Branch: 1 branch
BranchTrueFalseTotal
unless _is_qualified($_) 3 18 21
190 18 push @subs, $_;
191 }
192 12 close $fh_subs;
193  
194 12 return @subs;
195 }
196  
197 sub wrap_from_file {
198 8 ▶ my ($filename) = @_;
Subroutine wrap_from_file: called CC=1 SCAR=0.0
Pod documented
199 8 install_wrapped( _load_sub_spec($filename) );
200 5 return;
201 }
202  
203  
204 {
205 19 my $gr = qr{
206 (?(DEFINE)
207 (?<COMMA> \s* , \s* )
208 (?<INT> [0-9]+ )
209 (?<RANGE> (?&INT) \s* \.\. \s* (?&INT) )
210 (?<AS_ARG> (?&RANGE) | (?&INT) )
211 (?<HS_ARG> '[^']*' | "[^"]*" )
212 (?<ARRAY_SLICE> \s* (?&AS_ARG) (?: (?&COMMA) (?&AS_ARG) )* \s* )
213 (?<HASH_SLICE> \s* (?&HS_ARG) (?: (?&COMMA) (?&HS_ARG) )* \s* )
214 )
215 }x;
216  
217 sub _parse_signature {
218 76 ▶ my ($sig) = @_;
Subroutine _parse_signature: called CC=8 SCAR=20.8
219 76 ▶ return unless $sig;
Branch: 1 branch
BranchTrueFalseTotal
unless $sig 47 29 76
220  
221 29 state $types = {
222 '$' => { greedy => 0, generator => \&_gen_scalar },
223 '%' => { greedy => 1, generator => \&_gen_hash },
224 '@' => { greedy => 1, generator => \&_gen_array },
225 '\%' => { greedy => 0, generator => \&_gen_hash_ref },
226 '\@' => { greedy => 0, generator => \&_gen_array_ref },
227 };
228  
229 29 state $re = qr{
230 (?: \A \s* | (?&COMMA) )
231 (?:
232 (?<type> undef )
233 | (?<type> \$ ) (?<name> \w+ )
234 | (?<type> (?:\\)? % ) (?<name> \w+ ) (?: \{ (?<slice> (?&HASH_SLICE) ) \} )?
235 | (?<type> (?:\\)? @ ) (?<name> \w+ ) (?: \[ (?<slice> (?&ARRAY_SLICE) ) \] )?
236 )
237 $gr
238 }x;
239  
240 29 my @tag_generators;
241 29 my $arg_idx = 0;
242 29 ▶ while ($sig =~ /\G$re/xcg) {
Branch: 1 branch
BranchTrueFalseTotal
if ($sig =~ /\G$re/cgx) 44 16 60
243 44 my ($type, $name, $slice) = @+{qw[ type name slice ]};
244 44 ▶ next if $type eq 'undef'; # hidden argument
Branch: 1 branch
BranchTrueFalseTotal
if $type eq "undef" 1 43 44
245  
246 43 my $slice_ref = _parse_slice($type, $slice);
247 43 ▶ my $type_ref = $types->{$type} or die "No such type: $type";
Branch: 1 branch
BranchTrueFalseTotal
my $type_ref = $types->{$type} or die "No such type: $type" 0 43 43
248 43 my $generator = $type_ref->{generator}->($name, $arg_idx, $slice_ref);
249 43 push @tag_generators, $generator;
250  
251 43 ▶ last if $type_ref->{greedy};
Branch: 1 branch
BranchTrueFalseTotal
if $type_ref->{"greedy"} 13 30 43
252 }
253 continue {
254 31 ++$arg_idx;
255 }
256  
257 29 ▶ my $pos = pos($sig) // 0;
Condition100%2/2
pos $sig // 0
l!l
272
MC/DC100%1/1
pos $sig // 0
pos $sig
Truth table100%2/2
A
A= pos $sig
Aresult
11
00
258 29 ▶ if ($pos != length($sig)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($pos != length $sig) 7 22 29
259 7 Carp::croak "Failed to parse signature:\n$sig\n", ' ' x $pos, '^';
260 }
261  
262 22 return @tag_generators;
263 }
264  
265 sub _parse_slice {
266 43 ▶ my ($type, $slice) = @_;
Subroutine _parse_slice: called CC=10 SCAR=23.2
267 43 ▶ return unless $type and $slice;
Branch: 1 branch
BranchTrueFalseTotal
unless $type and $slice 33 10 43
Condition66%2/3
$type and $slice
!ll&&!rl&&r
03310
MC/DC50%1/2
$type and $slice
$type $slice
Truth table66%2/3
A and B
A= $typeB= $slice
ABresult
0X0
100
111
268  
269 10 ▶ if ($type eq '@' or $type eq '\@') {
Branch: 1 branch
BranchTrueFalseTotal
if ($type eq "\@" or $type eq "\\\@") 4 6 10
Condition100%3/3
$type eq "\@" or $type eq "\\\@"
l!l&&r!l&&!r
226
MC/DC100%2/2
$type eq "\@" or $type eq "\\\@"
$type eq "\@" $type eq "\\\@"
Truth table100%3/3
A or B
A= $type eq "\@"B= $type eq "\\\@"
ABresult
1X1
011
000
270 4 my @args;
271 4 ▶ while ($slice =~ /((?&AS_ARG)) $gr/gx) {
Branch: 1 branch
BranchTrueFalseTotal
if ($slice =~ /((?&AS_ARG)) $gr/gx) 8 4 12
272 8 my $arg = $1;
273 8 ▶ push @args, $arg =~ /(\d+)\s*\.\.\s(\d+)/
Branch: 1 branch
BranchTrueFalseTotal
$arg =~ /(\d+)\s*\.\.\s(\d+)/ ? : 2 6 8
274 ? $1 .. $2 # expand ranges
275 : $arg;
276 }
277 4 return \@args;
278 }
279  
280 6 ▶ if ($type eq '%' or $type eq '\%') {
Branch: 1 branch
BranchTrueFalseTotal
if ($type eq "%" or $type eq "\\%") 6 0 6
Condition66%2/3
$type eq "%" or $type eq "\\%"
l!l&&r!l&&!r
330
MC/DC0%0/2
$type eq "%" or $type eq "\\%"
$type eq "%" $type eq "\\%"
Truth table66%2/3
A or B
A= $type eq "%"B= $type eq "\\%"
ABresult
1X1
011
000
281 6 my @args;
282 6 ▶ while ($slice =~ /((?&HS_ARG)) $gr/gx) {
Branch: 1 branch
BranchTrueFalseTotal
if ($slice =~ /((?&HS_ARG)) $gr/gx) 12 6 18
283 12 push @args, $1 =~ s/\A['"]|['"]\z//gr; # remove quotes
284 }
285 6 return \@args;
286 }
287  
288 0 return;
289 }
290 }
291  
292 # undefs and references break OpenTracing::Interface type constraints
293 66 ▶sub _str { defined $_[0] ? "$_[0]" : 'undef' }
Subroutine _str: called CC=2 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
defined $_[0] ? : 63 3 66
294  
295 sub _gen_scalar {
296 20 ▶ my ($name, $arg_idx) = @_;
Subroutine _gen_scalar: called CC=1 SCAR=0.0
297 return sub {
298 22 ▶ return if $arg_idx > $#_;
Subroutine __ANON__: called CC=2 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
if $arg_idx > $#_ 1 21 22
299 21 return ("arguments.$name" => _str($_[$arg_idx]));
300 20 };
301 }
302  
303 sub _gen_hash {
304 7 ▶ my ($name, $arg_idx, $slice_ref) = @_;
Subroutine _gen_hash: called CC=1 SCAR=0.0
305 return sub {
306 7 ▶ return if $arg_idx > $#_;
Subroutine __ANON__: called CC=3 SCAR=11.0
Branch: 1 branch
BranchTrueFalseTotal
if $arg_idx > $#_ 1 6 7
307  
308 19 ▶ no warnings 'misc'; # odd-sized list, etc. these are not our fault
Subroutine BEGIN: called CC=1 SCAR=0.0
309 6 my %hash = @_[ $arg_idx .. $#_ ];
310 6 ▶ return map {; "arguments.$name.$_" => _str($hash{$_}) } keys %hash unless $slice_ref;
Branch: 1 branch
BranchTrueFalseTotal
unless $slice_ref 3 3 6
311  
312 3 @$slice_ref = grep { exists $hash{$_} } @$slice_ref;
313 3 my %sliced;
314 3 @sliced{@$slice_ref} = @hash{@$slice_ref};
315 3 return map { ; "arguments.$name.$_" => _str($sliced{$_}) } keys %sliced;
316 7 };
317 }
318  
319 sub _gen_array {
320 6 ▶ my ($name, $arg_idx, $slice_ref) = @_;
Subroutine _gen_array: called CC=1 SCAR=0.0
321 return sub {
322 7 ▶ return if $arg_idx > $#_;
Subroutine __ANON__: called CC=3 SCAR=11.0
Branch: 1 branch
BranchTrueFalseTotal
if $arg_idx > $#_ 1 6 7
323  
324 6 my @args = @_[ $arg_idx .. $#_ ];
325 return
326 16 ▶ map {; "arguments.$name.$_" => _str($args[$_]) }
Branch: 1 branch
BranchTrueFalseTotal
$slice_ref ? : 2 4 6
327 6 $slice_ref ? grep { $_ <= $#args } @$slice_ref : keys @args;
328 6 };
329 }
330  
331 sub _gen_hash_ref {
332 5 ▶ my ($name, $arg_idx, $slice_ref) = @_;
Subroutine _gen_hash_ref: called CC=1 SCAR=0.0
333 return sub {
334 7 ▶ return if $arg_idx > $#_;
Subroutine __ANON__: called CC=4 SCAR=13.9
Branch: 1 branch
BranchTrueFalseTotal
if $arg_idx > $#_ 1 6 7
335 6 ▶ return if ref $_[$arg_idx] ne 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $_[$arg_idx] ne "HASH" 2 4 6
336  
337 19 ▶ no warnings 'misc'; # odd-sized list, etc. these are not our fault
Subroutine BEGIN: called CC=1 SCAR=0.0
338 4 my %hash = %{ $_[$arg_idx] };
339 4 ▶ return map {; "arguments.$name.$_" => _str($hash{$_}) } keys %hash unless $slice_ref;
Branch: 1 branch
BranchTrueFalseTotal
unless $slice_ref 1 3 4
340  
341 3 @$slice_ref = grep { exists $hash{$_} } @$slice_ref;
342 3 my %sliced;
343 3 @sliced{@$slice_ref} = @hash{@$slice_ref};
344 3 return map {; "arguments.$name.$_" => _str($sliced{$_}) } keys %sliced;
345 5 };
346 }
347  
348 sub _gen_array_ref {
349 5 ▶ my ($name, $arg_idx, $slice_ref) = @_;
Subroutine _gen_array_ref: called CC=1 SCAR=0.0
350 return sub {
351 9 ▶ return if $arg_idx > $#_;
Subroutine __ANON__: called CC=4 SCAR=13.9
Branch: 1 branch
BranchTrueFalseTotal
if $arg_idx > $#_ 2 7 9
352 7 ▶ return if ref $_[$arg_idx] ne 'ARRAY';
Branch: 1 branch
BranchTrueFalseTotal
if ref $_[$arg_idx] ne "ARRAY" 3 4 7
353  
354 4 my @args = @{ $_[$arg_idx] };
355 return
356 13 ▶ map {; "arguments.$name.$_" => _str($args[$_]) }
Branch: 1 branch
BranchTrueFalseTotal
$slice_ref ? : 2 2 4
357 4 $slice_ref ? grep { $_ <= $#args } @$slice_ref : keys @args;
358 5 };
359 }
360  
361  
362 19 1;
« bin/opentracing_wrapscope_generator ↑ Summary blib/lib/OpenTracing/AutoScope.pm »