parents comppadlist sv_undef compile_stats timing_info
begin_av init_av check_av end_av regex_padav dowarn
defstash curstash warnhook diehook inc_gv @optype
- @specialsv_name
- ), $] > 5.009 && 'unitcheck_av');
+ @specialsv_name unitcheck_av));
@B::SV::ISA = 'B::OBJECT';
@B::NULL::ISA = 'B::SV';
@B::PVNV::ISA = qw(B::PVIV B::NV);
@B::PVMG::ISA = 'B::PVNV';
@B::REGEXP::ISA = 'B::PVMG' if $] >= 5.011;
-# Change in the inheritance hierarchy post 5.9.0
-@B::PVLV::ISA = $] > 5.009 ? 'B::GV' : 'B::PVMG';
-# BM is eliminated post 5.9.5, but effectively is a specialisation of GV now.
-@B::BM::ISA = $] > 5.009005 ? 'B::GV' : 'B::PVMG';
+@B::PVLV::ISA = 'B::GV';
+@B::BM::ISA = 'B::GV';
@B::AV::ISA = 'B::PVMG';
@B::GV::ISA = 'B::PVMG';
@B::HV::ISA = 'B::PVMG';
static const char* const svclassnames[] = {
"B::NULL",
-#if PERL_VERSION >= 9
"B::BIND",
-#endif
"B::IV",
"B::NV",
#if PERL_VERSION <= 10
"B::PVIV",
"B::PVNV",
"B::PVMG",
-#if PERL_VERSION <= 8
- "B::BM",
-#endif
#if PERL_VERSION >= 11
"B::REGEXP",
#endif
-#if PERL_VERSION >= 9
"B::GV",
-#endif
"B::PVLV",
"B::AV",
"B::HV",
"B::CV",
-#if PERL_VERSION <= 8
- "B::GV",
-#endif
"B::FM",
"B::IO",
};
return (!custom &&
(o->op_private & (OPpTRANS_TO_UTF|OPpTRANS_FROM_UTF))
)
-#if defined(USE_ITHREADS) \
- && (PERL_VERSION > 8 || (PERL_VERSION == 8 && PERL_SUBVERSION >= 9))
+#if defined(USE_ITHREADS)
? OPc_PADOP : OPc_PVOP;
#else
? OPc_SVOP : OPc_PVOP;
return arg;
}
-#if PERL_VERSION >= 9
static SV *
make_temp_object(pTHX_ SV *temp)
{
return make_sv_object(aTHX_ NULL);
}
}
-#endif
static SV *
make_mg_object(pTHX_ MAGIC *mg)
return sstr;
}
-#if PERL_VERSION >= 9
-# define PMOP_pmreplstart(o) o->op_pmstashstartu.op_pmreplstart
-# define PMOP_pmreplroot(o) o->op_pmreplrootu.op_pmreplroot
-#else
-# define PMOP_pmreplstart(o) o->op_pmreplstart
-# define PMOP_pmreplroot(o) o->op_pmreplroot
-# define PMOP_pmpermflags(o) o->op_pmpermflags
-# define PMOP_pmdynflags(o) o->op_pmdynflags
-#endif
+#define PMOP_pmreplstart(o) o->op_pmstashstartu.op_pmreplstart
+#define PMOP_pmreplroot(o) o->op_pmreplrootu.op_pmreplroot
static SV *
walkoptree(pTHX_ OP *o, const char *method, SV *ref)
oplist(pTHX_ OP *o, SV **SP)
{
for(; o; o = o->op_next) {
-#if PERL_VERSION >= 9
if (o->op_opt == 0)
break;
o->op_opt = 0;
-#else
- if (o->op_seq == 0)
- break;
- o->op_seq = 0;
-#endif
XPUSHs(make_op_object(aTHX_ o));
switch (o->op_type) {
case OP_SUBST:
typedef MAGIC *B__MAGIC;
typedef HE *B__HE;
-#if PERL_VERSION >= 9
typedef struct refcounted_he *B__RHE;
-#endif
#ifdef PadlistARRAY
typedef PADLIST *B__PADLIST;
#endif
ASSIGN_COMMON_ALIAS(I, initav);
cv = newXS("B::check_av", intrpvar_sv_common, file);
ASSIGN_COMMON_ALIAS(I, checkav_save);
-#if PERL_VERSION >= 9
cv = newXS("B::unitcheck_av", intrpvar_sv_common, file);
ASSIGN_COMMON_ALIAS(I, unitcheckav_save);
-#endif
cv = newXS("B::begin_av", intrpvar_sv_common, file);
ASSIGN_COMMON_ALIAS(I, beginav_save);
cv = newXS("B::end_av", intrpvar_sv_common, file);
void
threadsv_names()
PPCODE:
-#if PERL_VERSION <= 8
-# ifdef USE_5005THREADS
- int i;
- const STRLEN len = strlen(PL_threadsv_names);
- EXTEND(sp, len);
- for (i = 0; i < len; i++)
- PUSHs(newSVpvn_flags(&PL_threadsv_names[i], 1, SVs_TEMP));
-# endif
-#endif
#define SVp 0x00000
#define U32p 0x10000
#define UNOP_first_ix OPp | offsetof(struct unop, op_first)
#define BINOP_last_ix OPp | offsetof(struct binop, op_last)
#define LOGOP_other_ix OPp | offsetof(struct logop, op_other)
-#if PERL_VERSION >= 9
-# define PMOP_pmreplstart_ix \
+#define PMOP_pmreplstart_ix \
OPp | offsetof(struct pmop, op_pmstashstartu.op_pmreplstart)
-#else
-# define PMOP_pmreplstart_ix OPp | offsetof(struct pmop, op_pmreplstart)
-#endif
#define LOOP_redoop_ix OPp | offsetof(struct loop, op_redoop)
#define LOOP_nextop_ix OPp | offsetof(struct loop, op_nextop)
#define LOOP_lastop_ix OPp | offsetof(struct loop, op_lastop)
#define COP_seq_ix U32p | offsetof(struct cop, cop_seq)
#define COP_line_ix line_tp | offsetof(struct cop, cop_line)
-#if PERL_VERSION >= 9
#define COP_hints_ix U32p | offsetof(struct cop, cop_hints)
-#else
-#define COP_hints_ix U8p | offsetof(struct cop, op_private)
-#endif
#ifdef USE_ITHREADS
#define COP_stashpv_ix char_pp | offsetof(struct cop, cop_stashpv)
SvPVX(sv)[i] = toUPPER(SvPVX(sv)[i]);
ST(0) = sv;
-#if PERL_VERSION >= 9
# These 3 are all bitfields, so we can't take their addresses.
UV
type(o)
OUTPUT:
RETVAL
-#else
-
-UV
-type(o)
- B::OP o
- ALIAS:
- seq = 1
- CODE:
- switch(ix) {
- case 1:
- RETVAL = o->op_seq;
- break;
- default:
- RETVAL = o->op_type;
- }
- OUTPUT:
- RETVAL
-
-#endif
void
oplist(o)
MODULE = B PACKAGE = B::PMOP PREFIX = PMOP_
-#if PERL_VERSION <= 8
void
PMOP_pmreplroot(o)
B::PMOP o
- OP * root = NO_INIT
CODE:
- root = o->op_pmreplroot;
- /* OP_PUSHRE stores an SV* instead of an OP* in op_pmreplroot */
if (o->op_type == OP_PUSHRE) {
- ST(0) = sv_newmortal();
-# ifdef USE_ITHREADS
- sv_setiv(ST(0), INT2PTR(PADOFFSET,root) );
-# else
- sv_setiv(newSVrv(ST(0), root ?
- svclassnames[SvTYPE((SV*)root)] : "B::SV"),
- PTR2IV(root));
-# endif
- }
- else {
- ST(0) = make_op_object(aTHX_ root);
- }
-
-#else
-
-void
-PMOP_pmreplroot(o)
- B::PMOP o
- CODE:
- if (o->op_type == OP_PUSHRE) {
-# ifdef USE_ITHREADS
+#ifdef USE_ITHREADS
ST(0) = sv_newmortal();
sv_setiv(ST(0), o->op_pmreplrootu.op_pmtargetoff);
-# else
+#else
GV *const target = o->op_pmreplrootu.op_pmtargetgv;
ST(0) = sv_newmortal();
sv_setiv(newSVrv(ST(0), target ?
svclassnames[SvTYPE((SV*)target)] : "B::SV"),
PTR2IV(target));
-# endif
+#endif
}
else {
OP *const root = o->op_pmreplrootu.op_pmreplroot;
ST(0) = make_op_object(aTHX_ root);
}
-#endif
#ifdef USE_ITHREADS
#define PMOP_pmstashpv(o) PmopSTASHPV(o);
#endif
-#if PERL_VERSION < 9
-
-void
-PMOP_pmnext(o)
- B::PMOP o
- PPCODE:
- PUSHs(make_op_object(aTHX_ o->op_pmnext));
-
-U32
-PMOP_pmpermflags(o)
- B::PMOP o
-
-U8
-PMOP_pmdynflags(o)
- B::PMOP o
-
-#endif
void
PMOP_precomp(o)
rx = PM_GETRE(o);
ST(0) = sv_newmortal();
if (rx) {
-#if PERL_VERSION >= 9
if (ix) {
sv_setuv(ST(0), RX_EXTFLAGS(rx));
- } else
-#endif
- {
+ }
+ else {
sv_setpvn(ST(0), RX_PRECOMP(rx), RX_PRELEN(rx));
}
}
cv = newXS("B::COP::filegv", XS_B__OP_next, __FILE__);
XSANY.any_i32 = COP_filegv_ix;
#endif
-#if PERL_VERSION >= 9
cv = newXS("B::PMOP::reflags", XS_B__PMOP_precomp, __FILE__);
XSANY.any_i32 = 1;
-#endif
}
MODULE = B PACKAGE = B::PADOP
ALIAS:
io = 1
PPCODE:
-#if PERL_VERSION >= 9
ST(0) = ix ? make_cop_io_object(aTHX_ o) : make_warnings_object(aTHX_ o);
-#else
- ST(0) = make_sv_object(aTHX_ ix ? o->cop_io : o->cop_warnings);
-#endif
XSRETURN(1);
-#if PERL_VERSION >= 9
B::RHE
COP_hints_hash(o)
OUTPUT:
RETVAL
-#endif
MODULE = B PACKAGE = B::SV
#define IV_uvx_ix sv_UVp | offsetof(struct xpvuv, xuv_uv)
#define NV_nvx_ix sv_NVp | offsetof(struct xpvnv, xnv_u.xnv_nv)
-#if PERL_VERSION >= 10
#define NV_cop_seq_range_low_ix \
sv_U32p | offsetof(struct xpvnv, xnv_u.xpad_cop_seq.xlow)
#define NV_cop_seq_range_high_ix \
sv_U32p | offsetof(struct xpvnv, xnv_u.xpad_cop_seq.xlow)
#define NV_parent_fakelex_flags_ix \
sv_U32p | offsetof(struct xpvnv, xnv_u.xpad_cop_seq.xhigh)
-#else
-#define NV_cop_seq_range_low_ix \
- sv_NVp | offsetof(struct xpvnv, xnv_nv)
-#define NV_cop_seq_range_high_ix \
- sv_UVp | offsetof(struct xpvnv, xuv_uv)
-#define NV_parent_pad_index_ix \
- sv_NVp | offsetof(struct xpvnv, xnv_nv)
-#define NV_parent_fakelex_flags_ix \
- sv_UVp | offsetof(struct xpvnv, xuv_uv)
-#endif
#define PV_cur_ix sv_STRLENp | offsetof(struct xpv, xpv_cur)
#define PV_len_ix sv_STRLENp | offsetof(struct xpv, xpv_len)
#define PVMG_stash_ix sv_SVp | offsetof(struct xpvmg, xmg_stash)
-#if PERL_VERSION >= 10
-# if PERL_VERSION > 14
+#if PERL_VERSION > 14
# define PVBM_useful_ix sv_I32p | offsetof(struct xpvgv, xnv_u.xbm_s.xbm_useful)
# define PVBM_previous_ix sv_UVp | offsetof(struct xpvuv, xuv_uv)
-# else
+#else
#define PVBM_useful_ix sv_I32p | offsetof(struct xpvgv, xiv_u.xivu_i32)
#define PVBM_previous_ix sv_U32p | offsetof(struct xpvgv, xnv_u.xbm_s.xbm_previous)
-# endif
-#define PVBM_rare_ix sv_U8p | offsetof(struct xpvgv, xnv_u.xbm_s.xbm_rare)
-#else
-#define PVBM_useful_ix sv_I32p | offsetof(struct xpvbm, xbm_useful)
-#define PVBM_previous_ix sv_U16p | offsetof(struct xpvbm, xbm_previous)
-#define PVBM_rare_ix sv_U8p | offsetof(struct xpvbm, xbm_rare)
#endif
+#define PVBM_rare_ix sv_U8p | offsetof(struct xpvgv, xnv_u.xbm_s.xbm_rare)
+
#define PVLV_targoff_ix sv_U32p | offsetof(struct xpvlv, xlv_targoff)
#define PVLV_targlen_ix sv_U32p | offsetof(struct xpvlv, xlv_targlen)
#define PVLV_targ_ix sv_SVp | offsetof(struct xpvlv, xlv_targ)
#define PVLV_type_ix sv_char_p | offsetof(struct xpvlv, xlv_type)
-#if PERL_VERSION >= 10
#define PVGV_stash_ix sv_SVp | offsetof(struct xpvgv, xnv_u.xgv_stash)
#define PVGV_flags_ix sv_STRLENp | offsetof(struct xpvgv, xpv_cur)
#define PVIO_lines_ix sv_IVp | offsetof(struct xpvio, xiv_iv)
-#else
-#define PVGV_stash_ix sv_SVp | offsetof(struct xpvgv, xgv_stash)
-#define PVGV_flags_ix sv_U8p | offsetof(struct xpvgv, xgv_flags)
-#define PVIO_lines_ix sv_IVp | offsetof(struct xpvio, xio_lines)
-#endif
#define PVIO_page_ix sv_IVp | offsetof(struct xpvio, xio_page)
#define PVIO_page_len_ix sv_IVp | offsetof(struct xpvio, xio_page_len)
len = SvCUR(sv);
p = SvPVX_const(sv);
utf8 = SvUTF8(sv);
-#if PERL_VERSION < 10
- /* Before 5.10 (well 931b58fb28fa5ca7), PAD_COMPNAME_GEN was stored
- in SvCUR(), which meant we had to attempt this special casing
- to avoid tripping up over variable names in the pads. */
- if((SvLEN(sv) && len >= SvLEN(sv))) {
- /* It claims to be longer than the space allocated for it -
- presumably it's a variable name in the pad */
- len = strlen(p);
- }
-#endif
}
else {
/* XXX for backward compatibility, but should fail */
FILE = 1
B::HV::NAME = 2
CODE:
-#if PERL_VERSION >= 10
ST(0) = sv_2mortal(newSVhek(!ix ? GvNAME_HEK(gv)
: (ix == 1 ? GvFILE_HEK(gv)
: HvNAME_HEK((HV *)gv))));
-#else
- ST(0) = !ix ? newSVpvn_flags(GvNAME(gv), GvNAMELEN(gv), SVs_TEMP)
- : sv_2mortal(newSVpv(ix == 1 ? GvFILE(gv) : HvNAME((HV *)gv), 0))
-#endif
bool
is_empty(gv)
isGV_with_GP = 1
CODE:
if (ix) {
-#if PERL_VERSION >= 9
RETVAL = isGV_with_GP(gv) ? TRUE : FALSE;
-#else
- RETVAL = TRUE; /* In 5.8 and earlier they all are. */
-#endif
} else {
RETVAL = GvGP(gv) == Null(GP*);
}
MODULE = B PACKAGE = B::IO PREFIX = Io
-#if PERL_VERSION <= 8
-
-short
-IoSUBPROCESS(io)
- B::IO io
-
-#endif
bool
IsSTD(io,name)
else
XPUSHs(make_sv_object(aTHX_ NULL));
-#if PERL_VERSION < 9
-
-#define AvOFF(av) ((XPVAV*)SvANY(av))->xof_off
-
-IV
-AvOFF(av)
- B::AV av
-
-MODULE = B PACKAGE = B::AV
-
-U8
-AvFLAGS(av)
- B::AV av
-
-#endif
MODULE = B PACKAGE = B::FM PREFIX = Fm
-#if PERL_VERSION > 7 || (PERL_VERSION == 7 && PERL_SUBVERSION >= 3)
-# undef FmLINES
-# define FmLINES(sv) 0
-#endif
+#undef FmLINES
+#define FmLINES(sv) 0
IV
FmLINES(form)
HvRITER(hv)
B::HV hv
-#if PERL_VERSION < 9
-
-B::PMOP
-HvPMROOT(hv)
- B::HV hv
- PPCODE:
- PUSHs(make_op_object(aTHX_ HvPMROOT(hv)));
-
-#endif
-
void
HvARRAY(hv)
B::HV hv
MODULE = B PACKAGE = B::RHE
-#if PERL_VERSION >= 9
-
SV*
HASH(h)
B::RHE h
OUTPUT:
RETVAL
-#endif
#ifdef PadlistARRAY
use Exporter (); # use #5
-our $VERSION = "0.93";
+our $VERSION = "0.94";
our @ISA = qw(Exporter);
our @EXPORT_OK = qw( set_style set_style_standard add_callback
concise_subref concise_cv concise_main
"(?(#seq)?)#noise#arg(?([#targarg])?)"],
"debug" =>
["#class (#addr)\n\top_next\t\t#nextaddr\n\top_sibling\t#sibaddr\n\t"
- . "op_ppaddr\tPL_ppaddr[OP_#NAME]\n\top_type\t\t#typenum\n" .
- ($] > 5.009 ? '' : "\top_seq\t\t#seqnum\n")
+ . "op_ppaddr\tPL_ppaddr[OP_#NAME]\n\top_type\t\t#typenum\n"
. "\top_flags\t#flagval\n\top_private\t#privval\t#hintsval\n"
. "(?(\top_first\t#firstaddr\n)?)(?(\top_last\t\t#lastaddr\n)?)"
. "(?(\top_sv\t\t#svaddr\n)?)",
push @$targ, $ar;
push @todo, [$op->pmreplstart, $ar];
} elsif ($name =~ /^enter(loop|iter)$/) {
- if ($] > 5.009) {
- $labels{${$op->nextop}} = "NEXT";
- $labels{${$op->lastop}} = "LAST";
- $labels{${$op->redoop}} = "REDO";
- } else {
- $labels{$op->nextop->seq} = "NEXT";
- $labels{$op->lastop->seq} = "LAST";
- $labels{$op->redoop->seq} = "REDO";
- }
+ $labels{${$op->nextop}} = "NEXT";
+ $labels{${$op->lastop}} = "LAST";
+ $labels{${$op->redoop}} = "REDO";
}
}
}
"padav", "padhv", "enteriter", "entersub");
$priv{$_}{64} = "REFC" for ("leave", "leavesub", "leavesublv", "leavewrite");
$priv{"aassign"}{64} = "COMMON";
-$priv{"aassign"}{32} = $] < 5.009 ? "PHASH" : "STATE";
+$priv{"aassign"}{32} = "STATE";
$priv{"sassign"}{32} = "STATE";
$priv{"sassign"}{64} = "BKWARD";
$priv{"sassign"}{128}= "CV2GV";
$priv{$_}{2} = "FTACCESS"
for ("ftrread", "ftrwrite", "ftrexec", "fteread", "ftewrite", "fteexec");
@{$priv{"entereval"}}{2,4,8,16} = qw "HAS_HH UNI BYTES COPHH";
-if ($] >= 5.009) {
- # Stacked filetests are post 5.8.x
- @{$priv{$_}}{4,8,16} = ("FTSTACKED","FTSTACKING","FTAFTERt")
- for ("ftrread", "ftrwrite", "ftrexec", "fteread", "ftewrite", "fteexec",
- "ftis", "fteowned", "ftrowned", "ftzero", "ftsize", "ftmtime",
- "ftatime", "ftctime", "ftsock", "ftchr", "ftblk", "ftfile", "ftdir",
- "ftpipe", "ftlink", "ftsuid", "ftsgid", "ftsvtx", "fttty", "fttext",
- "ftbinary");
- # Lexical $_ is post 5.8.x
- $priv{$_}{2} = "GREPLEX"
- for ("mapwhile", "mapstart", "grepwhile", "grepstart");
-}
+@{$priv{$_}}{4,8,16} = ("FTSTACKED","FTSTACKING","FTAFTERt")
+for ("ftrread", "ftrwrite", "ftrexec", "fteread", "ftewrite", "fteexec",
+ "ftis", "fteowned", "ftrowned", "ftzero", "ftsize", "ftmtime",
+ "ftatime", "ftctime", "ftsock", "ftchr", "ftblk", "ftfile", "ftdir",
+ "ftpipe", "ftlink", "ftsuid", "ftsgid", "ftsvtx", "fttty", "fttext",
+ "ftbinary");
+$priv{$_}{2} = "GREPLEX"
+for ("mapwhile", "mapstart", "grepwhile", "grepstart");
$priv{$_}{128} = '+1' for qw "caller wantarray runcv";
@{$priv{coreargs}}{1,2,64,128} = ('DREF1','DREF2','$MOD','MARK');
$priv{$_}{128} = 'UTF' for qw "last redo next goto dump";
if (defined $padname and class($padname) ne "SPECIAL") {
$h{targarg} = $padname->PVX;
if ($padname->FLAGS & SVf_FAKE) {
- if ($] < 5.009) {
- $h{targarglife} = "$h{targarg}:FAKE";
- } else {
- # These changes relate to the jumbo closure fix.
- # See changes 19939 and 20005
- my $fake = '';
- $fake .= 'a'
- if $padname->PARENT_FAKELEX_FLAGS & PAD_FAKELEX_ANON;
- $fake .= 'm'
- if $padname->PARENT_FAKELEX_FLAGS & PAD_FAKELEX_MULTI;
- $fake .= ':' . $padname->PARENT_PAD_INDEX
- if $curcv->CvFLAGS & CVf_ANON;
- $h{targarglife} = "$h{targarg}:FAKE:$fake";
- }
+ # These changes relate to the jumbo closure fix.
+ # See changes 19939 and 20005
+ my $fake = '';
+ $fake .= 'a'
+ if $padname->PARENT_FAKELEX_FLAGS & PAD_FAKELEX_ANON;
+ $fake .= 'm'
+ if $padname->PARENT_FAKELEX_FLAGS & PAD_FAKELEX_MULTI;
+ $fake .= ':' . $padname->PARENT_PAD_INDEX
+ if $curcv->CvFLAGS & CVf_ANON;
+ $h{targarglife} = "$h{targarg}:FAKE:$fake";
}
else {
my $intro = $padname->COP_SEQ_RANGE_LOW - $cop_seq_base;
}
$h{seq} = $h{hyphseq} = seq($op);
$h{seq} = "" if $h{seq} eq "-";
- if ($] > 5.009) {
- $h{opt} = $op->opt;
- $h{label} = $labels{$$op};
- } else {
- $h{seqnum} = $op->seq;
- $h{label} = $labels{$op->seq};
- }
+ $h{opt} = $op->opt;
+ $h{label} = $labels{$$op};
$h{next} = $op->next;
$h{next} = (class($h{next}) eq "NULL") ? "(end)" : seq($h{next});
$h{nextaddr} = sprintf("%#x", $ {$op->next});
SVTYPEMASK SVt_PVGV SVt_PVHV
PAD_FAKELEX_ANON PAD_FAKELEX_MULTI);
-if ($] < 5.009) {
- # Constant not present after 5.8.x
- push @names, 'AVf_REAL';
- # This is only present in 5.10, but it's useful to B::Deparse to be able
- # to import a dummy value from B
- push @names, {name=>"OPpPAD_STATE", default=>["IV", "0"]};
-}
# First element in each tuple is the file; second is a regex snippet
# giving the prefix to limit the names of symbols to define that come
$repl;
}gem;
- if ($] < 5.009) {
- # add 5.8 private flags, which bleadperl (5.9.1) doesn't have/use/render
- # works because it adds no wildcards, which are butchered below..
- $str =~ s|(mapstart l?K\*?)|$1/2|mg;
- $str =~ s|(grepstart l?K\*?)|$1/2|msg;
- $str =~ s|(mapwhile.*? l?K)|$1/1|msg;
- $str =~ s|(grepwhile.*? l?K)|$1/1|msg;
- }
$tc->{wantstr} = $str;
# make targ args wild
[$1 . ($2 && ':{') . $4]xegm; # change to the hints without open.pm
}
- if ($] < 5.009) {
- # 5.8.x doesn't provide the hints in the OP, which means that
- # B::Concise doesn't show the symbolic hints. So strip all the
- # symbolic hints from the golden results.
- $str =~ s[( # capture
- \(\?:next\|db\)state # the regexp matching next/db state
- .* # all sorts of things follow it
- v # The opening v
- )
- :(?:\\[{*] # \{ or \*
- |[^,\\]) # or other symbols on their own
- (?:,
- (?:\\[{*]
- |[^,\\])
- )* # maybe some more joined with commas
- (\ ->[0-9a-z]+)?
- $
- ]
- [$1$2]xgm; # change to the hints without flags
- }
# don't care about:
$str =~ s/:-?\d+,-?\d+/:-?\\d+,-?\\d+/msg; # FAKE line numbers
formfeed end_av dowarn diehook defstash curstash
cstring comppadlist check_av cchar cast_I32 bootstrap
begin_av amagic_generation sub_generation address
- ), $] > 5.009 ? ('unitcheck_av') : ()],
+ unitcheck_av) ],
},
B::Deparse => { dflt => 'perl', # 236 functions
POSTFIX SVf_FAKE SVf_IOK SVf_NOK SVf_POK SVf_ROK
SVpad_OUR SVs_RMG SVs_SMG SWAP_CHILDREN OPpPAD_STATE
OPpCONST_ARYBASE OPpEVAL_BYTES OPpSUBSTR_REPL_FIRST
- /, $] > 5.009 ? ('RXf_SKIPWHITE') : ('PMf_SKIPWHITE'),
+ RXf_SKIPWHITE /,
'CVf_LOCKED', # This ends up as a constant, pre or post 5.10
],
},
new listen import getsockopt croak
connected connect configure confess close
carp bind atmark accept sockaddr_in6
- /, $] > 5.009 ? ('blocking') : () ],
+ blocking/ ],
XS => [qw/ unpack_sockaddr_un unpack_sockaddr_in
sockatmark sockaddr_family pack_sockaddr_un
# b <1> leavesub[1 ref] K/REFC,1
EONT_EONT
-if($] < 5.009) {
- # 5.8.x doesn't show the /STABLE flag, so massage the golden results.
- s!/STABLE!!s foreach ($expect, $expect_nt);
-}
checkOptree(note => q{},
bcopts => q{-exec},
# these are not inlined, at least not per BC::Concise
#myyes => [ $RV_class, ],
#myno => [ $RV_class, ],
- $] > 5.009 ? (
myaref => [ $RV_class, '\\\\' ],
myfl => [ 'NV', myfl ],
myint => [ 'IV', myint ],
myrex => [ $RV_class, '\\\\' ],
),
myundef => [ 'NULL', ],
- ) : (
- myaref => [ 'PVIV', '' ],
- myfl => [ 'PVNV', myfl ],
- myint => [ 'PVIV', myint ],
- myrex => [ 'PVNV', '' ],
- myundef => [ 'PVIV', ],
- )
};
use constant WEEKDAYS
# 2 <0> padav[@list:FAKE:m:71] ->3
EONT_EONT
-if($] < 5.009) {
- # 5.8.x doesn't add the m flag to padav
- s/FAKE:m:\d+/FAKE/ foreach ($expect, $expect_nt);
-}
checkOptree ( name => 'constant sub returning list',
code => \&WEEKDAYS,
if($] < 5.015) {
s/M(?=\*? ->)//g for $expect, $expect_nt;
}
-if($] < 5.009) {
- # 5.8.x's use constant has larger types
- foreach ($expect, $expect_nt) {
- s/IV 42/PV$&/;
- s/NV 1.41/PV$&/;
- }
-}
checkOptree ( name => 'call many in a print statement',
code => \&printem,
# 6 <$> gvsv(*_) s ->7
EONT_EONT
-if ($] < 5.009) {
- $t =~ s/GV /BM /;
- $nt =~ s/GV /BM /;
-}
-
checkOptree ( name => 'index and PVBM',
prog => '$_ = index q(foo), q(foo)',
strip_open_hints => 1,
use OptreeCheck; # ALSO DOES @ARGV HANDLING !!!!!!
use Config;
-plan tests => 13 + ($] > 5.009 ? 2 : 0);
+plan tests => 15;
require_ok("B::Concise");
my $src = q[our ($beg, $chk, $init, $end, $uc) = qq{'foo'}; BEGIN { $beg++ } CHECK { $chk++ } INIT { $init++ } END { $end++ } UNITCHECK {$uc++}];
-my @warnings_todo;
-@warnings_todo = (todo =>
- "Change 23768 (Remove Carp from warnings.pm) alters expected output, not"
- . "propagated to 5.8.x")
- if $] < 5.009;
-
checkOptree ( name => 'BEGIN',
bcopts => 'BEGIN',
prog => $src,
- @warnings_todo,
strip_open_hints => 1,
expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
# BEGIN 1:
# 2 <$> gvsv(*chk) s ->3
EONT_EONT
-if ($] >= 5.009) {
- checkOptree ( name => 'UNITCHECK',
- bcopts=> 'UNITCHECK',
- prog => $src,
- strip_open_hints => 1,
- expect=> <<'EOT_EOT', expect_nt => <<'EONT_EONT');
+checkOptree ( name => 'UNITCHECK',
+ bcopts=> 'UNITCHECK',
+ prog => $src,
+ strip_open_hints => 1,
+ expect=> <<'EOT_EOT', expect_nt => <<'EONT_EONT');
# UNITCHECK 1:
# 4 <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq KP ->4
# - <1> ex-rv2sv sKRM/1 ->3
# 2 <$> gvsv(*uc) s ->3
EONT_EONT
-}
checkOptree ( name => 'INIT',
bcopts => 'INIT',
checkOptree ( name => 'all of BEGIN END INIT CHECK UNITCHECK -exec',
bcopts => [qw/ BEGIN END INIT CHECK UNITCHECK -exec /],
prog => $src,
- @warnings_todo,
strip_open_hints => 1,
expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
# BEGIN 1:
checkOptree ( name => 'regression test for patch 25352',
bcopts => [qw/ BEGIN END INIT CHECK -exec /],
prog => 'print q/foo/',
- @warnings_todo,
expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
# BEGIN 1:
# 1 <;> nextstate(B::Concise -275 Concise.pm:356) v:*,&,{,x*,x&,x$,$
print "1..0 # Skip -- Perl configured without B module\n";
exit 0;
}
- if ( $] < 5.009 ) {
- print "1..0 # Skip -- No user pragmata in 5.8.x\n";
- exit 0;
- }
}
use strict;