InNotKana => ['\x{3040}', '!\x{3041}'],
InConsonant => ['d', '!e'],
IsSyriac1 => ['\x{0712}', '!\x{072F}'],
- Syriac1 => ['\x{0712}', '!\x{072F}'],
'# User-defined character properties my lack \n at the end',
InGreekSmall => ['\N{GREEK SMALL LETTER PI}',
'\N{GREEK SMALL LETTER FINAL SIGMA}'],
InGreekCapital => ['\N{GREEK CAPITAL LETTER PI}', '!\x{03A2}'],
Dash => ['-'],
ASCII_Hex_Digit => ['!-', 'A'],
- AsciiHexAndDash => ['-', 'A'],
+ IsAsciiHexAndDash => ['-', 'A'],
);
#
# Illegal properties
#
-my @ILLEGAL_PROPERTIES = qw [q qrst];
+my @ILLEGAL_PROPERTIES =
+ qw[q qrst f foo isfoo infoo ISfoo INfoo Is::foo In::foo];
my %d;
0730 074A
--
-sub Syriac1 {<<'--'}
-0712 072C
-0730 074A
---
-
sub InGreekSmall {return "03B1\t03C9"}
sub InGreekCapital {return "0391\t03A9\n-03A2"}
-sub AsciiHexAndDash {<<'--'}
+sub IsAsciiHexAndDash {<<'--'}
+utf8::ASCII_Hex_Digit
+utf8::Dash
--
+# fake user-defined properties; these subs shouldn't be called, because
+# their names don't start with In or Is
+
+sub f { die }
+sub foo { die }
+sub isfoo { die }
+sub infoo { die }
+sub ISfoo { die }
+sub INfoo { die }
+sub Is::foo { die }
+sub In::foo { die }
__END__
plan tests => 10;
-sub MyUniClass {
+sub IsMyUniClass {
<<END;
0030 004F
END
}
-sub Other::Class {
+sub Other::IsClass {
<<END;
0040 005F
END
sub A::B::Intersection {
<<END;
-+main::MyUniClass
-&Other::Class
++main::IsMyUniClass
+&Other::IsClass
END
}
is(($str =~ /(\p{l}+)/)[0], 'ABCDEFGHIJKLMNOPQRSTUVWXYZ');
# make sure it finds user-defined class
-is(($str =~ /(\p{MyUniClass}+)/)[0], '0123456789:;<=>?@ABCDEFGHIJKLMNO');
+is(($str =~ /(\p{IsMyUniClass}+)/)[0], '0123456789:;<=>?@ABCDEFGHIJKLMNO');
# make sure it finds class in other package
-is(($str =~ /(\p{Other::Class}+)/)[0], '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_');
+is(($str =~ /(\p{Other::IsClass}+)/)[0], '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_');
# make sure it finds class in other OTHER package
is(($str =~ /(\p{A::B::Intersection}+)/)[0], '@ABCDEFGHIJKLMNO');