Sah/SchemaR/perl/distname_with_ver.pm

filter: Statementstmt 100% 11 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 100% 12 / 12 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
CRAP 1.0
« Sah/SchemaR/perl/distname_with_optional_ver.pm ↑ Summary Sah/SchemaR/perl/funcname.pm »
1 ## no critic: TestingAndDebugging::RequireStrict
2 package Sah::SchemaR::perl::distname_with_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\@1.23\n Foo/Bar\@1.23\n Foo/Bar.pm\@1.23\n Foo.Bar\@1.23\n\nand it will be coerced into Foo-Bar form.\n\n",examples=>[{valid=>0,value=>""},{valid=>0,value=>"Foo-Bar"},{valid=>0,value=>"Foo::Bar"},{valid=>1,value=>"Foo-Bar\@1.0.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 with 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 with version number suffix, e.g. Foo-Bar@0.001
14  
15 __END__
« Sah/SchemaR/perl/distname_with_optional_ver.pm ↑ Summary Sah/SchemaR/perl/funcname.pm »