| 1 | ## no critic: TestingAndDebugging::RequireStrict | ||
| 2 | package Sah::SchemaR::perl::distname_with_optional_ver; | ||
| 3 | |||
| 4 | # preamble code | ||
| 5 | 1 | ▶ | no warnings 'experimental::regex_sets'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 1 | our $DATE = '2024-02-16'; # DATE | |
| 8 | 1 | our $VERSION = '0.050'; # VERSION | |
| 9 | |||
| 10 | 1 | our $rschema = do{my$var={base=>"str",clsets_after_base=>[{description=>"\nFor convenience (particularly in CLI with tab completion), you can input one of:\n\n Foo::Bar\n Foo/Bar\n Foo/Bar.pm\n Foo.Bar\n\nand it will be coerced into Foo-Bar form.\n\n",examples=>[{valid=>0,value=>""},{valid=>1,value=>"Foo-Bar"},{valid=>1,value=>"Foo-Bar\@1"},{valid=>1,value=>"Foo-Bar\@1.0"},{valid=>1,validated_value=>"Foo-Bar\@1.0.0",value=>"Foo::Bar\@1.0.0"},{valid=>1,value=>"Foo-Bar\@0.5_001"},{valid=>1,validated_value=>"Foo-Bar\@0.5_001",value=>"Foo::Bar\@0.5_001"},{valid=>0,value=>"Foo-Bar\@a"}],match=>"\\A[A-Za-z_][A-Za-z_0-9]*(-[A-Za-z_0-9]+)*(\@[0-9][0-9A-Za-z]*(\\.[0-9A-Za-z_]+)*)?\\z",summary=>"Perl distribution name (e.g. Foo-Bar) with optional version number suffix (e.g. Foo-Bar\@0.001)","x.completion"=>"perl_distname","x.perl.coerce_rules"=>["From_str::normalize_perl_distname"]}],clsets_after_type=>['$var->{clsets_after_base}[0]'],"clsets_after_type.alt.merge.merged"=>['$var->{clsets_after_base}[0]'],resolve_path=>["str"],type=>"str",v=>2};$var->{clsets_after_type}[0]=$var->{clsets_after_base}[0];$var->{"clsets_after_type.alt.merge.merged"}[0]=$var->{clsets_after_base}[0];$var}; | |
| 11 | |||
| 12 | 1 | 1; | |
| 13 | # ABSTRACT: Perl distribution name (e.g. Foo-Bar) with optional version number suffix (e.g. Foo-Bar@0.001) | ||
| 14 | |||
| 15 | __END__ | ||