2 # Test for malfunctions of utf8 cache
9 unless (eval { require Devel::Peek }) {
10 print "# Without Devel::Peek, never mind\n";
16 my $pid = open CHILD, '-|';
17 die "kablam: $!\n" unless defined $pid;
19 open STDERR, ">&STDOUT";
20 $a = "hello \x{1234}";
22 bar(substr($a, $_, 1));
26 Devel::Peek::Dump($_[0]);
31 { local $/; $_ = <CHILD> }
33 my $utf8magic = qr{ ^ \s+ MAGIC \s = .* \n
34 \s+ MG_VIRTUAL \s = .* \n
35 \s+ MG_TYPE \s = \s PERL_MAGIC_utf8 .* \n
36 \s+ MG_LEN \s = .* \n }xm;
38 if (m{ $utf8magic $utf8magic }x) {