« Sah/SchemaR/perl/identifier/qualified_ascii.pm
↑ Summary
Sah/SchemaR/perl/identifier/unqualified_ascii.pm »
| 1 | ## no critic: TestingAndDebugging::RequireStrict | ||
| 2 | package Sah::SchemaR::perl::identifier::qualified_unicode; | ||
| 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=>"\n",examples=>[{summary=>"Empty",valid=>0,value=>""},{summary=>"Not qualified",valid=>0,value=>"foo"},{valid=>1,value=>"foo::bar"},{summary=>"This schema does not accept the old (soon-to-be-deprecated) namespace separator",valid=>0,value=>"foo'bar"},{valid=>1,value=>"_foo::bar"},{summary=>"Cannot start with a digit",valid=>0,value=>"0foo::bar"},{summary=>"Secondary+ parts are allowed to start with a digit (1)",valid=>1,value=>"foo::0"},{summary=>"Secondary+ parts are allowed to start with a digit (2)",valid=>1,value=>"foo::0bar"},{valid=>1,value=>"foo0::bar"},{summary=>"Invalid character (dash)",valid=>0,value=>"foo::bar-baz"},{summary=>"Sigil not accepted",valid=>0,value=>"\$foo::bar"},{valid=>1,value=>"b\xE9b\xE9::0foo"}],match=>qr(\A | |
| 11 | (?[ ( \p{Word} & \p{XID_Start} ) + [_] ]) | ||
| 12 | (?[ ( \p{Word} & \p{XID_Continue} ) ])* | ||
| 13 | (?: | ||
| 14 | ::(?[ ( \p{Word} & \p{XID_Continue} ) + [_] ])+ | ||
| 15 | )+ | ||
| 16 | 1 | \z)x,summary=>"Unqualified identifier in Perl, with \"use utf8\" in effect"}],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}; | |
| 17 | |||
| 18 | 1 | 1; | |
| 19 | # ABSTRACT: Unqualified identifier in Perl, with "use utf8" in effect | ||
| 20 | |||
| 21 | __END__ | ||