Sah/Schema/perl/modprefixes.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
« Sah/Schema/perl/modprefix.pm ↑ Summary Sah/Schema/perl/module/release/version.pm »
1 package Sah::Schema::perl::modprefixes;
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-Perl'; # DIST
9 1 our $VERSION = '0.050'; # VERSION
10  
11 1 our $schema = [array => {
12 summary => 'Perl module prefixes, e.g. ["", "Foo::", "Foo::Bar::"]',
13 description => <<'_',
14  
15 Array of Perl module prefixes, where each element is of `perl::modprefix`
16 schema, e.g. `Foo::`, `Foo::Bar::`.
17  
18 Contains coercion rule that expands wildcard, so you can specify:
19  
20 Module::C*
21  
22 and it will be expanded to e.g.:
23  
24 ["Module::CPANTS::", "Module::CPANfile::", "Module::CheckVersion::", "Module::CoreList::"]
25  
26 The wildcard syntax supports jokers (`?`, '*`) and brackets (`[abc]`). See the
27 `unix` type of wildcard in <pm:Regexp::Wildcards>, which this coercion rule
28 uses.
29  
30 _
31 of => ["perl::modprefix", {req=>1}, {}],
32  
33 'x.perl.coerce_rules' => [
34 'From_str_or_array::expand_perl_modprefix_wildcard',
35 ],
36  
37 # provide a default completion which is from list of installed perl modules
38 'x.element_completion' => 'perl_modprefix',
39  
40 }];
41  
42 1 1;
43 # ABSTRACT: Perl module prefixes, e.g. ["", "Foo::", "Foo::Bar::"]
44  
45 __END__
« Sah/Schema/perl/modprefix.pm ↑ Summary Sah/Schema/perl/module/release/version.pm »