Data/Sah/Coerce/perl/To_array/From_str/expand_glob.pm

filter: Statementstmt 61.9% 13 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 2 totaltotal 57.1% 16 / 28 CC 1 SCAR 3.4
CC
1
Cov
62%
meta
2.0
coerce
2.0
BEGIN
1.0
CRAP 1.4
« Data/Sah/Value/perl/Path/only_subdir_not_file_in_curdir.pm ↑ Summary Data/Sah/Filter/perl/Path/check_dir_exists.pm »
1 package Data::Sah::Coerce::perl::To_array::From_str::expand_glob;
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 => 4,
15 summary => 'Coerce glob pattern string by expanding it to array',
16 prio => 50,
17 };
18 }
19  
20 0 ▶sub coerce {
Subroutine coerce: not called CC=1 SCAR=6.9
Pod undocumented
21 0 my %args = @_;
22  
23 0 my $dt = $args{data_term};
24  
25 0 my $res = {};
26  
27 0 $res->{modules}{'File::Glob'} = 0;
28  
29 0 $res->{expr_match} = "!ref($dt)";
30 0 $res->{expr_coerce} = join(
31 "",
32 "[File::Glob::bsd_glob($dt)]",
33 );
34  
35 0 $res;
36 }
37  
38 1 1;
39 # ABSTRACT: Coerce glob pattern string by expanding it to array
40  
41 __END__
« Data/Sah/Value/perl/Path/only_subdir_not_file_in_curdir.pm ↑ Summary Data/Sah/Filter/perl/Path/check_dir_exists.pm »