You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jonathan Vanasco <jo...@2xlp.com> on 2006/08/07 18:36:23 UTC

debugging advice

Today I'm:
	 migrating some code from dev to production
	porting some personal modules to CPAN

I've run into an issue where I make heavy use of things like
	DEBUG >=3 && errorLogger('string')

the issue being that I've got so much debug stuff going on, that I've  
tied it to constants so mod_perl won't compile it on startup when  
internal debugging is off.

That being said, its come to the point where I'm abstracting things  
out of my framework sufficiently enough, that I'm going to need to  
set the initial constant off a variable , so i can freeze my modules 
( envelope? httpd.conf ?)

does anyone have any pointers for this?  I *think* that if i do all  
the sets in a BEGIN block it should work the way I expect.  i have  
fears that running under Apache2::Reload , i'm going to run into issues

Re: debugging advice

Posted by Perrin Harkins <pe...@elem.com>.
On Mon, 2006-08-07 at 12:36 -0400, Jonathan Vanasco wrote:
> does anyone have any pointers for this?  I *think* that if i do all  
> the sets in a BEGIN block it should work the way I expect.

Since the constant thing is kind of a hack and depends on prototypes, it
is easy to break.  The only way to know for sure is B::Deparse, which is
probably not helpful here.

In short, setting them up in a BEGIN block could work, but it's hard to
know if it did or not.

- Perrin