| 1 | package Sah::Schema::cpan::distname; | ||
| 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-06-13'; # DATE | |
| 7 | 1 | our $DIST = 'Sah-SchemaBundle-CPAN'; # DIST | |
| 8 | 1 | our $VERSION = '0.016'; # VERSION | |
| 9 | |||
| 10 | 1 | our $schema = ["perl::distname", { | |
| 11 | summary => 'A distribution name on CPAN, e.g. "Module-Installed-Tiny"', | ||
| 12 | description => <<'MARKDOWN', | ||
| 13 | |||
| 14 | This schema can be used to validate a CPAN distribution name. It's like the | ||
| 15 | `perl::distname` schema, but with completion from distribution names on CPAN | ||
| 16 | (using <prog:lcpan>). It does not check whether a CPAN distribution exists or | ||
| 17 | not (indexed on PAUSE); use the `cpan::distname::exists` or | ||
| 18 | `cpan::distname::not_exists` schemas for that purpose. | ||
| 19 | |||
| 20 | MARKDOWN | ||
| 21 | 'x.completion'=>['lcpan_distname'], | ||
| 22 | examples => [ | ||
| 23 | {value=>'', valid=>0}, | ||
| 24 | {value=>'Foo-Bar' , valid=>1, validated_value=>'Foo-Bar'}, | ||
| 25 | {value=>'Foo::Bar', valid=>1, validated_value=>'Foo-Bar'}, | ||
| 26 | ], | ||
| 27 | }]; | ||
| 28 | |||
| 29 | 1 | 1; | |
| 30 | |||
| 31 | # ABSTRACT: A distribution name on CPAN, e.g. "Module-Installed-Tiny" | ||
| 32 | |||
| 33 | __END__ | ||