| 1 | package Sah::Schema::perl::unqualified_funcname; | ||
| 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 = [str => { | |
| 12 | summary => 'Perl function name which must not be qualified with a package name, e.g. subname', | ||
| 13 | description => <<'_', | ||
| 14 | |||
| 15 | Currently function name is restricted to this regex: | ||
| 16 | |||
| 17 | \A[A-Za-z_][A-Za-z_0-9]*\z | ||
| 18 | |||
| 19 | This schema includes syntax validity check only; it does not check whether the | ||
| 20 | function actually exists. | ||
| 21 | |||
| 22 | This schema includes syntax validity check only; it does not check whether the | ||
| 23 | function actually exists. | ||
| 24 | |||
| 25 | _ | ||
| 26 | match => '\A[A-Za-z_]([A-Za-z_0-9]+)*\z', | ||
| 27 | |||
| 28 | # TODO: provide convenience by providing list of core function names etc | ||
| 29 | #'x.completion' => 'perl_funcname', | ||
| 30 | |||
| 31 | }]; | ||
| 32 | |||
| 33 | 1 | 1; | |
| 34 | # ABSTRACT: Perl function name which must not be qualified with a package name, e.g. subname | ||
| 35 | |||
| 36 | __END__ | ||