Schema/perl/arraydata/modnames_with_optional_args.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 14 / 14 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Schema/perl/arraydata/modnames.pm ↑ Summary SchemaBundle/ArrayData.pm »
1 package Sah::Schema::perl::arraydata::modnames_with_optional_args;
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-02-16'; # DATE
8 1 our $DIST = 'Sah-SchemaBundle-ArrayData'; # DIST
9 1 our $VERSION = '0.005'; # VERSION
10  
11 1 our $schema = [array => {
12 summary => 'Array of Perl ArrayData::* module names without the prefix, with optional args, e.g. ["Lingua::Word::ID::KBBI", "WordList=wordlist,EN::Enable"]',
13 description => <<'_',
14  
15 Array of Perl ArrayData::* module names without the prefix and optional args.
16 Each element is of `perl::arraydata::modname` schema, e.g.
17 `Lingua::Word::ID::KBBI`, `WordList=wordlist,EN::Enable`.
18  
19 Contains coercion rule that expands wildcard, so you can specify:
20  
21 Lingua::Word::ID::*
22  
23 and it will be expanded to e.g.:
24  
25 ["Lingua::Word::ID::KBBI", "Word::ID::PERLANCAR"]
26  
27 The wildcard syntax supports jokers (`?`, `*`, `**`), brackets (`[abc]`), and
28 braces (`{one,two}`). See <pm:Module::List::Wildcard> for more details.
29  
30 _
31 of => ["perl::arraydata::modname_with_optional_args", {req=>1}, {}],
32  
33 'x.perl.coerce_rules' => [
34 ['From_str_or_array::expand_perl_modname_wildcard', {ns_prefix=>'ArrayData'}],
35 ],
36  
37 # provide a default completion which is from list of installed perl modules
38 'x.element_completion' => ['perl_modname', {ns_prefix=>'ArrayData'}],
39  
40 }];
41  
42 1 1;
43 # ABSTRACT: Array of Perl ArrayData::* module names without the prefix, with optional args, e.g. ["Lingua::Word::ID::KBBI", "WordList=wordlist,EN::Enable"]
44  
45 __END__
« Schema/perl/arraydata/modnames.pm ↑ Summary SchemaBundle/ArrayData.pm »