X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Declare.xs;fp=Declare.xs;h=54aa66852b37c0dba56b8a9e78c58c70de8cb23d;hb=87195072373ca1f3380381c4aba54afeaa82f0df;hp=c3a8dee1aaa98b3149674046c428b2691a713378;hpb=7dd7d0088daadec6edede7f44b02afd64019957d;p=p5sagit%2FDevel-Declare.git diff --git a/Declare.xs b/Declare.xs index c3a8dee..54aa668 100644 --- a/Declare.xs +++ b/Declare.xs @@ -134,7 +134,7 @@ void dd_set_linestr(pTHX_ char* new_value) { PL_bufend = SvPVX(PL_linestr) + new_len; - if ( DD_DEBUG_UPDATED_LINESTR && PERLDB_LINE && PL_curstash != PL_debstash) { + if ( DD_DEBUG_UPDATED_LINESTR && PERLDB_LINE && PL_curstash != PL_debstash) { // Cribbed from toke.c SV * const sv = NEWSV(85,0); @@ -488,6 +488,11 @@ set_in_declare(int value) in_declare = value; BOOT: - if (getenv ("DD_DEBUG")) { - dd_debug = atoi(getenv("DD_DEBUG")); + char *endptr; + char *debug_str = getenv ("DD_DEBUG"); + if (debug_str) { + dd_debug = strtol (debug_str, &endptr, 10); + if (*endptr != '\0') { + dd_debug = 0; + } }