RV = $ADDR
SV = REGEXP\\($ADDR\\) at $ADDR
REFCNT = 2
- FLAGS = \\(POK,pPOK\\)
+ FLAGS = \\(OBJECT,POK,pPOK\\)
IV = 0
PV = $ADDR "\\(\\?-xism:tic\\)"\\\0
CUR = 12
- LEN = \\d+');
+ LEN = \\d+
+ STASH = $ADDR\\t"Regexp"');
} else {
do_test(15,
qr(tic),
use strict;
use vars qw($VERSION);
-$VERSION = '0.74';
+$VERSION = '0.74_1';
$VERSION = eval $VERSION; # make the alpha version come out as a number
# Make Test::Builder thread-safe for ithreads.
my($re, $opts);
# Check for qr/foo/
- if( ref $regex eq 'Regexp' ) {
+ if ( $] >= 5.009004
+ ? re::is_regexp($regex)
+ : ref $regex eq 'Regexp'
+ )
+ {
$usable_regex = $regex;
}
# Check for '/foo/' or 'm,foo,'
like(overload::StrVal(sub{1}), qr/^CODE\(0x[0-9a-f]+\)$/);
like(overload::StrVal(\*GLOB), qr/^GLOB\(0x[0-9a-f]+\)$/);
like(overload::StrVal(\$o), qr/^REF\(0x[0-9a-f]+\)$/);
- like(overload::StrVal(qr/a/), qr/^Regexp\(0x[0-9a-f]+\)$/);
+ like(overload::StrVal(qr/a/), qr/^Regexp=REGEXP\(0x[0-9a-f]+\)$/);
like(overload::StrVal($o), qr/^perl31793=ARRAY\(0x[0-9a-f]+\)$/);
like(overload::StrVal($of), qr/^perl31793_fb=ARRAY\(0x[0-9a-f]+\)$/);
like(overload::StrVal($no), qr/^no_overload=ARRAY\(0x[0-9a-f]+\)$/);
Perl_reg_qr_package(pTHX_ REGEXP * const rx)
{
PERL_UNUSED_ARG(rx);
- return NULL;
+ if (0)
+ return NULL;
+ else
+ return newSVpvs("Regexp");
}
/* Scans the name of a named buffer from the pattern.
case SVt_PVFM: return "FORMAT";
case SVt_PVIO: return "IO";
case SVt_BIND: return "BIND";
- case SVt_REGEXP: return "Regexp"; /* FIXME? to "REGEXP" */
+ case SVt_REGEXP: return "REGEXP"; /* FIXME? to "REGEXP" */
default: return "UNKNOWN";
}
}