# define MGf_LOCAL 0
#endif
+#ifndef IN_PERL_COMPILETIME
+# define IN_PERL_COMPILETIME (PL_curcop == &PL_compiling)
+#endif
+
/* uvar magic and Hash::Util::FieldHash were commited with 28419 */
#if VMG_HAS_PERL_MAINT(5, 9, 4, 28419) || VMG_HAS_PERL(5, 10, 0)
# define VMG_UVAR 1
#define vmg_data_new(C, S, A) vmg_data_new(aTHX_ (C), (S), (A))
SV *nsv;
I32 i, alen = (args == NULL) ? 0 : av_len(args);
+ I32 flags = G_SCALAR;
dSP;
int count;
PUSHs(*av_fetch(args, i, 0));
PUTBACK;
- count = call_sv(ctor, G_SCALAR);
+ if (IN_PERL_COMPILETIME)
+ flags |= G_EVAL | G_KEEPERR;
+
+ count = call_sv(ctor, flags);
SPAGAIN;
SV *svr;
int ret;
unsigned int i;
+ I32 flags = G_SCALAR;
dSP;
int count;
va_end(ap);
PUTBACK;
- count = call_sv(cb, G_SCALAR);
+ if (IN_PERL_COMPILETIME)
+ flags |= G_EVAL | G_KEEPERR;
+
+ count = call_sv(cb, flags);
SPAGAIN;
SV *svr;
I32 len, has_array;
U32 ret;
+ I32 flags = G_SCALAR;
dSP;
int count;
}
PUTBACK;
- count = call_sv(SV2MGWIZ(mg->mg_ptr)->cb_len, G_SCALAR);
+ if (IN_PERL_COMPILETIME)
+ flags |= G_EVAL | G_KEEPERR;
+
+ count = call_sv(SV2MGWIZ(mg->mg_ptr)->cb_len, flags);
SPAGAIN;