Sah/SchemaR/unix/pathname.pm

filter: Statementstmt 100% 9 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 100% 9 / 9 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« Sah/SchemaR/unix/groupname/exists.pm ↑ Summary Sah/SchemaR/unix/pid.pm »
1 ## no critic: TestingAndDebugging::RequireStrict
2 package Sah::SchemaR::unix::pathname;
3  
4 1 our $DATE = '2024-11-15'; # DATE
5 1 our $VERSION = '0.022'; # VERSION
6  
7 1 our $rschema = do{my$var={base=>"pathname::unix",clsets_after_base=>[{description=>"\nThis is just a convenient alias for pathname::unix.\n\n",examples=>[],summary=>"Path name (filename or dirname) on a Unix system"}],clsets_after_type=>[{description=>"\nThis is like the `pathname` schema but with extra checks relevant to the Unix,\n(e.g. a path element cannot be longer than 255 characters) and prefilters (e.g.\nmultipile consecutive slashes `//` will be normalized into a single one `/`).\n\n",examples=>[{valid=>0,value=>""},{valid=>1,value=>"/"},{valid=>1,value=>"foo/bar"},{valid=>1,validated_value=>"foo/bar",value=>"foo//bar"},{summary=>"Path element too long",valid=>0,value=>"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{summary=>"Contains null character",valid=>0,value=>"foo\0"}],match=>"\\A(?:/|/?(?:[^/\\0]{1,255})(?:/[^/\\0]{1,255})*)\\z",prefilters=>["Path::expand_tilde","Path::strip_slashes"],summary=>"Filesystem path name on a Unix system","x.completion"=>["filename"]},'$var->{clsets_after_base}[0]'],"clsets_after_type.alt.merge.merged"=>['$var->{clsets_after_type}[0]','$var->{clsets_after_base}[0]'],resolve_path=>["str","pathname::unix"],type=>"str",v=>2};$var->{clsets_after_type}[1]=$var->{clsets_after_base}[0];$var->{"clsets_after_type.alt.merge.merged"}[0]=$var->{clsets_after_type}[0];$var->{"clsets_after_type.alt.merge.merged"}[1]=$var->{clsets_after_base}[0];$var};
8  
9 1 1;
10 # ABSTRACT: Path name (filename or dirname) on a Unix system
11  
12 __END__
« Sah/SchemaR/unix/groupname/exists.pm ↑ Summary Sah/SchemaR/unix/pid.pm »