|NULLOK SV *pv|NULLOK const char *type \
|STRLEN typelen
s |int |ao |int toketype
-s |const char*|incl_perldb
# if defined(PERL_CR_FILTER)
s |I32 |cr_textfilter |int idx|NULLOK SV *sv|int maxlen
s |void |strip_return |NN SV *sv
#endif
#ifdef PERL_CORE
#define ao S_ao
-#define incl_perldb S_incl_perldb
#endif
# if defined(PERL_CR_FILTER)
#ifdef PERL_CORE
#define find_in_my_stash(a,b) S_find_in_my_stash(aTHX_ a,b)
#define tokenize_use(a,b) S_tokenize_use(aTHX_ a,b)
#define ao(a) S_ao(aTHX_ a)
-#define incl_perldb() S_incl_perldb(aTHX)
#endif
# if defined(PERL_CR_FILTER)
#ifdef PERL_CORE
__attribute__nonnull__(pTHX_5);
STATIC int S_ao(pTHX_ int toketype);
-STATIC const char* S_incl_perldb(pTHX);
# if defined(PERL_CR_FILTER)
STATIC I32 S_cr_textfilter(pTHX_ int idx, SV *sv, int maxlen);
STATIC void S_strip_return(pTHX_ SV *sv)
return 0;
}
-/*
- * S_incl_perldb
- * Return a string of Perl code to load the debugger. If PERL5DB
- * is set, it will return the contents of that, otherwise a
- * compile-time require of perl5db.pl.
- */
-
-STATIC const char*
-S_incl_perldb(pTHX)
-{
- dVAR;
- if (PL_perldb) {
- const char * const pdb = PerlEnv_getenv("PERL5DB");
-
- if (pdb)
- return pdb;
- SETERRNO(0,SS_NORMAL);
- return "BEGIN { require 'perl5db.pl' }";
- }
- return "";
-}
-
-
/* Encoded script support. filter_add() effectively inserts a
* 'pre-processing' function into the current source input stream.
* Note that the filter function only applies to the current source file
if (PL_madskills)
PL_faketokens = 1;
#endif
- sv_setpv(PL_linestr,incl_perldb());
- if (SvCUR(PL_linestr))
- sv_catpvs(PL_linestr,";");
+ if (PL_perldb) {
+ /* Generate a string of Perl code to load the debugger.
+ * If PERL5DB is set, it will return the contents of that,
+ * otherwise a compile-time require of perl5db.pl. */
+
+ const char * const pdb = PerlEnv_getenv("PERL5DB");
+
+ if (pdb) {
+ sv_setpv(PL_linestr, pdb);
+ sv_catpvs(PL_linestr,";");
+ } else {
+ SETERRNO(0,SS_NORMAL);
+ sv_setpvs(PL_linestr, "BEGIN { require 'perl5db.pl' };");
+ }
+ } else
+ sv_setpvs(PL_linestr,"");
if (PL_preambleav){
while(AvFILLp(PL_preambleav) >= 0) {
SV *tmpsv = av_shift(PL_preambleav);