On Thu, 28 Sep 2000 12:24:49 BST, Simon Cozens wrote: >On Wed, Sep 20, 2000 at 07:32:56PM -0400, Andrew Pimlott wrote: >> The documentation for eval says >> If there was no error, C<$@> is guaranteed to be a null string. >> and the documentation for do (the do EXPR form) says >> do 'stat.pl'; >> is just like >> scalar eval `cat stat.pl`; > >Easy-peasy. Just clear the error SV when entering an eval or do: > >==== //depot/bleadperl/pp_ctl.c#3 - /home/simon/patchbay/bleadperl/pp_ctl.c == >== >@@ -3013,6 +3013,7 @@ > name = SvPV(sv, len); > if (!(name && len > 0 && *name)) > DIE(aTHX_ "Null filename used"); >+ sv_setsv(ERRSV, &PL_sv_no); > TAINT_PROPER("require"); > if (PL_op->op_type == OP_REQUIRE && > (svp = hv_fetch(GvHVn(PL_incgv), name, len, 0)) && >@@ -3291,6 +3292,7 @@ > STRLEN len; > OP *ret; > >+ sv_setsv(ERRSV, &PL_sv_no); > if (!SvPV(sv,len) || !len) > RETPUSHUNDEF; > TAINT_PROPER("eval"); I think you're forgetting that there is only one $@. (IOW, what about DESTROY() or any of those other things done via call_sv(..., G_EVAL) or eval_sv()?) IIRC, the archives have some history on this issue. Sarathy gsar@ActiveState.comThread Previous | Thread Next