Sah/Schema/perl/sorter/modnames_with_optional_args.pm

filter: Statementstmt 100% 9 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 100% 10 / 10 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
CRAP 1.0
« Sah/Schema/perl/sorter/modnames.pm ↑ Summary Sah/Schemas/Sorter.pm »
1 package Sah::Schema::perl::sorter::modnames_with_optional_args;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
6 1 our $DATE = '2024-01-23'; # DATE
7 1 our $DIST = 'Sah-Schemas-Sorter'; # DIST
8 1 our $VERSION = '0.001'; # VERSION
9  
10 1 our $schema = [array => {
11 summary => 'Array of Perl Sorter::* module names without the prefix, with optional args, e.g. ["Foo::bar", "Foo::baz=qux,quux"]',
12 description => <<'_',
13  
14 Array of Perl Sorter::* module names without the prefix and with optional args.
15 Each element is of `perl::sorter::modname_with_optional_args` schema, e.g.
16 `Foo::bar`, `Foo::baz=qux,quux`.
17  
18 Contains coercion rule that expands wildcard, so you can specify:
19  
20 Foo::*
21  
22 and it will be expanded to e.g.:
23  
24 ["Foo::bar", "Foo::baz"]
25  
26 The wildcard syntax supports jokers (`?`, `*`, `**`), brackets (`[abc]`), and
27 braces (`{one,two}`). See <pm:Module::List::Wildcard> for more details.
28  
29 _
30 of => ["perl::sorter::modname_with_optional_args", {req=>1}],
31  
32 'x.perl.coerce_rules' => [
33 ['From_str_or_array::expand_perl_modname_wildcard', {ns_prefix=>'Sorter'}],
34 ],
35  
36 # provide a default completion which is from list of installed perl modules
37 'x.element_completion' => ['perl_sorter_modname_with_optional_args'],
38  
39 }];
40  
41 1 1;
42 # ABSTRACT:
43  
44 __END__
« Sah/Schema/perl/sorter/modnames.pm ↑ Summary Sah/Schemas/Sorter.pm »