PSchema/perl/modname.pm

filter: Statementstmt 64.7% 11 / 17 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 50.0% 2 / 4 Podpod 0.0% 0 / 2 totaltotal 46.4% 13 / 28 CC 3 SCAR 19.0
CC
3
Cov
52%
get_schema
12.0
meta
2.0
BEGIN
1.0
CRAP 6.7
« PSchema/perl/modname_with_optional_args.pm ↑ Summary PSchemaBundle/Array.pm »
1 package Sah::PSchema::perl::modname;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
7 1 our $DATE = '2024-05-30'; # DATE
8 1 our $DIST = 'Sah-PSchemaBundle-Array'; # DIST
9 1 our $VERSION = '0.010'; # VERSION
10  
11 0 ▶sub meta {
Subroutine meta: not called CC=1 SCAR=6.9
Pod undocumented
12 0 my $class = shift;
13  
14 return +{
15 0 v => 1,
16 args => {
17 ns_prefix => {
18 schema => 'perl::modname*',
19 default => '',
20 },
21 ns_prefixes => {
22 schema => 'perl::modname*',
23 },
24 complete_recurse => {
25 summary => 'Whether completion should recurse',
26 schema => 'bool*',
27 },
28 },
29 args_rels => {
30 choose_one => [qw/ns_prefix ns_prefixes/],
31 },
32 };
33 }
34  
35 0 ▶sub get_schema {
Subroutine get_schema: not called CC=3 SCAR=24.8
Pod undocumented
36 0 require Sah::Schema::perl::modname; # for scan_prereqs
37  
38 0 my ($class, $args, $merge) = @_;
39  
40 return ['perl::modname', {
41 'x.completion' => ['perl_modname' => {
42 ($args->{ns_prefixes} ? (ns_prefixes => $args->{ns_prefixes}) : (ns_prefix => $args->{ns_prefix})),
43 recurse=>$args->{complete_recurse},
44 recurse_matching=>'all-at-once',
45 }],
46 0 ▶ %{ $merge || {} },
Branch: 1 branch
BranchTrueFalseTotal
$args->{'ns_prefixes'} ? : 0 0 0
Condition0%0/2
$merge || {}
l!l
00
MC/DC0%0/1
$merge || {}
$merge
Truth table0%0/2
A
A= $merge
Aresult
11
00
47 }];
48 }
49  
50 1 1;
51 # ABSTRACT: Perl module name (parameterized)
52  
53 __END__
« PSchema/perl/modname_with_optional_args.pm ↑ Summary PSchemaBundle/Array.pm »