Message-ID: <15162.11020.279064.471031@ix.netsoft.ro>
p4raw-id: //depot/perl@11029
if (!PM_GETRE(pm)->prelen && PL_curpm)
pm = PL_curpm;
- else if (strEQ("\\s+", PM_GETRE(pm)->precomp))
- pm->op_pmflags |= PMf_WHITE;
+ else
+ if (strEQ("\\s+", PM_GETRE(pm)->precomp))
+ pm->op_pmflags |= PMf_WHITE;
+ else
+ pm->op_pmflags &= ~PMf_WHITE;
/* XXX runtime compiled output needs to move to the pad */
if (pm->op_pmflags & PMf_KEEP) {
@INC = '../lib';
}
-print "1..44\n";
+print "1..45\n";
$FS = ':';
print "ok 44\n";
}
+{
+ # check that PMf_WHITE is cleared after \s+ is used
+ # reported in <20010627113312.RWGY6087.viemta06@localhost>
+ my $r;
+ foreach my $pat ( qr/\s+/, qr/ll/ ) {
+ $r = join ':' => split($pat, "hello cruel world");
+ }
+ print "not " unless $r eq "he:o cruel world";
+ print "ok 45\n";
+}