| 1 | package Sah::Schema::perl::arraydata::modname; | ||
| 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 = ['perl::modname' => { | |
| 12 | summary => 'Perl ArrayData::* module name without the prefix, e.g. Lingua::Word::ID::KBBI', | ||
| 13 | description => <<'_', | ||
| 14 | |||
| 15 | Contains coercion rule so you can also input `Foo-Bar`, `Foo/Bar`, `Foo/Bar.pm` | ||
| 16 | or even 'Foo.Bar' and it will be normalized into `Foo::Bar`. | ||
| 17 | |||
| 18 | _ | ||
| 19 | match => '\A[A-Za-z_][A-Za-z_0-9]*(::[A-Za-z_0-9]+)*\z', | ||
| 20 | |||
| 21 | 'x.perl.coerce_rules' => [ | ||
| 22 | 'From_str::normalize_perl_modname', | ||
| 23 | ], | ||
| 24 | |||
| 25 | # provide a default completion which is from list of installed perl modules | ||
| 26 | 'x.completion' => ['perl_modname', {ns_prefix=>'ArrayData'}], | ||
| 27 | |||
| 28 | examples => [ | ||
| 29 | {value=>'', valid=>0}, | ||
| 30 | {value=>'Word/ID/KBBI', valid=>1, validated_value=>'Word::ID::KBBI'}, | ||
| 31 | {value=>'Foo bar', valid=>0}, | ||
| 32 | ], | ||
| 33 | |||
| 34 | }]; | ||
| 35 | |||
| 36 | 1 | 1; | |
| 37 | # ABSTRACT: Perl ArrayData::* module name without the prefix, e.g. Lingua::Word::ID::KBBI | ||
| 38 | |||
| 39 | __END__ | ||