Data/Sah/Value/perl/Path/only_subdir_not_file_in_curdir.pm

filter: Statementstmt 65.0% 13 / 20 Branchbran n/a Conditioncond 0.0% 0 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 2 totaltotal 48.4% 16 / 33 CC 3 SCAR 17.7
CC
3
Cov
54%
value
12.0
meta
2.0
BEGIN
1.0
CRAP 5.9
« Data/Sah/Value/perl/Path/only_subdir_in_curdir.pm ↑ Summary Data/Sah/Coerce/perl/To_array/From_str/expand_glob.pm »
1 package Data::Sah::Value::perl::Path::only_subdir_not_file_in_curdir;
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-Path'; # DIST
10 1 our $VERSION = '0.031'; # VERSION
11  
12 0 ▶sub meta {
Subroutine meta: not called CC=1 SCAR=6.9
Pod undocumented
13 +{
14 0 v => 1,
15 summary => 'Only subdirectory in current directory (plain files are ignored)',
16 description => <<'MARKDOWN',
17  
18 This default value rule will return filename if there is a single subdirectory
19 (and zero or more plain files) in the current directory and nothing else. See
20 <pm:File::Util::Test>'s `get_dir_only_subdir` with option `ignore_file` set to
21 1.
22  
23 MARKDOWN
24 args => {
25 },
26 };
27 }
28  
29 0 ▶sub value {
Subroutine value: not called CC=3 SCAR=24.8
Pod undocumented
30 0 my %cargs = @_;
31  
32 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
33 0 my $res = {};
34  
35 0 ▶ $res->{modules}{"File::Util::Test"} //= 0.628;
Condition0%0/2
$res->{"modules"}{"File::Util::Test"} //= "0.628"
l!l
00
MC/DC0%0/1
$res->{"modules"}{"File::Util::Test"} //= "0.628"
$res->{"modules"}{"File::Util::Test"}
Truth table0%0/2
A
A= $res->{"modules"}{"File::Util::Test"}
Aresult
11
00
36  
37 0 $res->{expr_value} = join(
38 '',
39 'File::Util::Test::get_dir_only_subdir({ignore_file=>1})',
40 );
41  
42 0 $res;
43 }
44  
45 1 1;
46 # ABSTRACT:
47  
48 __END__
« Data/Sah/Value/perl/Path/only_subdir_in_curdir.pm ↑ Summary Data/Sah/Coerce/perl/To_array/From_str/expand_glob.pm »