}
}
+/* workaround RT #69939 */
+I32
+mouse_call_sv_safe(pTHX_ SV* const sv, I32 const flags) {
+ assert( (flags & G_EVAL) == 0 );
+
+ if(!PL_in_eval) {
+ I32 count;
+ SAVESPTR(ERRSV);
+ ERRSV = sv_newmortal();
+
+ count = Perl_call_sv(aTHX_ sv, flags | G_EVAL);
+
+ if(sv_true(ERRSV)){
+ croak(NULL); /* rethrow */
+ }
+ return count;
+ }
+ else {
+ return Perl_call_sv(aTHX_ sv, flags);
+ }
+}
+
void
mouse_must_defined(pTHX_ SV* const value, const char* const name) {
assert(value);
XPUSHs(self);
PUTBACK;
- call_sv(method, G_SCALAR | G_METHOD);
+ call_sv_safe(method, G_SCALAR | G_METHOD);
SPAGAIN;
ret = POPs;
PUSHs(arg1);
PUTBACK;
- call_sv(method, G_SCALAR | G_METHOD);
+ call_sv_safe(method, G_SCALAR | G_METHOD);
SPAGAIN;
ret = POPs;