Maybe what I am doing is too clever, but I just take the last Configure
command line and add an S to -DPERL_NO_COW to disable it. It doesn’t
hurt to make Peek.t more robust, though.
/mge;
$pattern =~ s/^\h+COW_REFCNT = .*\n//mg
if $Config{ccflags} =~
- /-DPERL_(?:OLD_COPY_ON_WRITE|NO_COW)/
+ /-DPERL_(?:OLD_COPY_ON_WRITE|NO_COW)\b/
|| $] < 5.019003;
print $pattern, "\n" if $DEBUG;
my ($dump, $dump2) = split m/\*\*\*\*\*\n/, scalar <IN>;
do_test('floating point value',
$d,
$] < 5.019003
- || $Config{ccflags} =~ /-DPERL_(?:NO_COW|OLD_COPY_ON_WRITE)/
+ || $Config{ccflags} =~ /-DPERL_(?:NO_COW|OLD_COPY_ON_WRITE)\b/
?
'SV = PVNV\\($ADDR\\) at $ADDR
REFCNT = 1