develooper Front page | perl.perl5.porters | Postings from October 2003

Re: How to tell if Perl has -DDEBUGGING?

Thread Previous | Thread Next
From:
Jim Cromie
Date:
October 24, 2003 15:15
Subject:
Re: How to tell if Perl has -DDEBUGGING?
Message ID:
3F99A469.2050905@divsol.com
Nicholas Clark wrote:

>On Fri, Oct 24, 2003 at 05:00:30PM +0100, Steve Hay wrote:
>  
>
>>which is all well and good, but some devious miscreant could easily edit 
>>their Config.pm file to lie about whether the Perl has DEBUGGING or not.
>>
>>Is there no way for Perl itself to tell us?
>>
>>The end of the "perl -V" output contains this:
>>
>>   Characteristics of this binary (from libperl):
>>     Compile-time options: DEBUGGING
>>     Built under MSWin32
>>     Compiled at Oct 24 2003 15:50:11
>>
>>That doesn't come from Config.pm.  Instead, as it says, it comes from 
>>Perl (libperl) itself.  That's what I want.  Can I get at *that* 
>>DEBUGGING setting (other than by the obvious and undesirable means of 
>>doing a "perl -V" system call and parsing the output)?
>>    
>>
>
>Not that I'm aware of. However, based on the useful feature that you can
>change $^D at runtime to flip the -DDEBUGGING switches, and a perusal of
>perlrun for something to hijack, try this:
>  
>

Isnt it more important what the runtime setting is anyway ?

put another way, youre 'punishing' users who are stuck with a  debugging 
perl,
even if theyre not running it that way.  My laptop only has one 5.8.1 on it,
even though 99% of use is non-debugging.

and without $^D set, its difficult to get at hidden/obfuscated code.
If they do monkey with $^D on a non-debugging perl, it still wouldnt
give them what they want.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About