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))
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)
# Author: Marek Rouchal <marek@saftsack.fs.uni-bayreuth.de>
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;