| 1 | package Sah::Schema::perl::modnames; | ||
| 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 => 'Array of Perl module names, e.g. ["Foo::Bar", "Baz"]', | ||
| 13 | description => <<'_', | ||
| 14 | |||
| 15 | Array of Perl module names, where each element is of `perl::modname` schema, | ||
| 16 | e.g. `Foo`, `Foo::Bar`. | ||
| 17 | |||
| 18 | Contains coercion rule that expands wildcard, so you can specify: | ||
| 19 | |||
| 20 | Module::P* | ||
| 21 | |||
| 22 | and it will be expanded to e.g.: | ||
| 23 | |||
| 24 | ["Module::Patch", "Module::Path", "Module::Pluggable"] | ||
| 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::modname", {req=>1}, {}], | ||
| 31 | |||
| 32 | 'x.perl.coerce_rules' => [ | ||
| 33 | 'From_str_or_array::expand_perl_modname_wildcard', | ||
| 34 | ], | ||
| 35 | |||
| 36 | # provide a default completion which is from list of installed perl modules | ||
| 37 | 'x.element_completion' => 'perl_modname', | ||
| 38 | |||
| 39 | }]; | ||
| 40 | |||
| 41 | 1 | 1; | |
| 42 | # ABSTRACT: Array of Perl module names, e.g. ["Foo::Bar", "Baz"] | ||
| 43 | |||
| 44 | __END__ | ||