From: Jarkko Hietaniemi Date: Sun, 12 Aug 2001 20:17:32 +0000 (+0000) Subject: Relic in op.c (no regex feature should depend on the utf8 pragma), X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=22ea838f62453c7a2f8000a23c820b7a34636711;p=p5sagit%2Fp5-mst-13.2.git Relic in op.c (no regex feature should depend on the utf8 pragma), and a test tweak. p4raw-id: //depot/perl@11650 --- diff --git a/op.c b/op.c index b9b7869..72c0352 100644 --- a/op.c +++ b/op.c @@ -3002,7 +3002,7 @@ Perl_pmruntime(pTHX_ OP *o, OP *expr, OP *repl) p = SvPV(pat, plen); pm->op_pmflags |= PMf_SKIPWHITE; } - if ((PL_hints & HINT_UTF8) || DO_UTF8(pat)) + if (DO_UTF8(pat)) pm->op_pmdynflags |= PMdf_UTF8; PM_SETRE(pm, CALLREGCOMP(aTHX_ p, p + plen, pm)); if (strEQ("\\s+", PM_GETRE(pm)->precomp)) @@ -3010,7 +3010,7 @@ Perl_pmruntime(pTHX_ OP *o, OP *expr, OP *repl) op_free(expr); } else { - if (PL_hints & HINT_UTF8) + if (!IN_BYTES) pm->op_pmdynflags |= PMdf_UTF8; if (pm->op_pmflags & PMf_KEEP || !(PL_hints & HINT_RE_EVAL)) expr = newUNOP((!(PL_hints & HINT_RE_EVAL) diff --git a/t/pod/find.t b/t/pod/find.t index bb6e9ba..1bac930 100644 --- a/t/pod/find.t +++ b/t/pod/find.t @@ -2,8 +2,12 @@ # Author: Marek Rouchal BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; + chdir 't' if -d 't'; + # The ../../../../../lib is for finding lib/utf8.pm + # when running under all-utf8 settings (pod/find.t) + # does not directly require lib/utf8.pm but regular + # expressions will need that. + @INC = qw(../lib ../../../../../lib); } $| = 1;