Data/Sah/Value/perl/Perl/this_dist.pm

filter: Statementstmt 68.4% 13 / 19 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 2 totaltotal 55.1% 16 / 29 CC 2 SCAR 10.4
CC
2
Cov
62%
value
6.0
meta
2.0
BEGIN
1.0
CRAP 2.8
« Data/Sah/Value/perl/Perl/these_mods.pm ↑ Summary Data/Sah/Value/perl/Perl/this_mod.pm »
1 package Data::Sah::Value::perl::Perl::this_dist;
2  
3 1 ▶use 5.010001;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
8 1 our $DATE = '2024-02-16'; # DATE
9 1 our $DIST = 'Sah-SchemaBundle-Perl'; # DIST
10 1 our $VERSION = '0.050'; # VERSION
11  
12 0 ▶sub meta {
Subroutine meta: not called CC=1 SCAR=6.9
Pod undocumented
13 +{
14 0 v => 1,
15 summary => '"this" Perl distribution name',
16 description => <<'_',
17  
18 See <pm:App::ThisDist>'s `this_mod()` for more details on how "this module" is
19 determined. Note that currently `App::ThisDist` is not automatically added as
20 prerequisite.
21  
22 _
23 args => {
24 },
25 };
26 }
27  
28 0 ▶sub value {
Subroutine value: not called CC=2 SCAR=17.9
Pod undocumented
29 0 my %cargs = @_;
30  
31 0 ▶ my $gen_args = $cargs{args} // {};
Condition0%0/2
$cargs{"args"} // {}
l!l
00
MC/DC0%0/1
$cargs{"args"} // {}
$cargs{"args"}
Truth table0%0/2
A
A= $cargs{"args"}
Aresult
11
00
32 0 my $res = {};
33  
34 # $res->{modules}{"App::ThisDist"} //= 0;
35  
36 0 $res->{expr_value} = join(
37 '',
38 'do { if (eval { require App::ThisDist; 1 }) { App::ThisDist::this_dist() } else { undef } }',
39 );
40  
41 0 $res;
42 }
43  
44 1 1;
45 # ABSTRACT:
46  
47 __END__
« Data/Sah/Value/perl/Perl/these_mods.pm ↑ Summary Data/Sah/Value/perl/Perl/this_mod.pm »