This new test makes sure that a regular expression that forward
references a user-defined property works.
require "test.pl";
}
-plan tests => 10;
+plan tests => 11;
+
+my $str = join "", map latin1_to_native(chr($_)), 0x20 .. 0x6F;
+
+is(($str =~ /(\p{IsMyUniClass}+)/)[0], '0123456789:;<=>?@ABCDEFGHIJKLMNO',
+ 'user-defined class compiled before defined');
sub IsMyUniClass {
<<END;
use strict;
-my $str = join "", map latin1_to_native(chr($_)), 0x20 .. 0x6F;
-
# make sure it finds built-in class
is(($str =~ /(\p{Letter}+)/)[0], 'ABCDEFGHIJKLMNOPQRSTUVWXYZ');
is(($str =~ /(\p{l}+)/)[0], 'ABCDEFGHIJKLMNOPQRSTUVWXYZ');