SPUG: How to deal with same name packages?

Colin Meyer cmeyer at helvella.org
Mon Jan 14 20:54:39 CST 2002


On Mon, Jan 14, 2002 at 06:20:53PM -0800, Andrew Sweger wrote:
> mod_perl? Beyond me. That sounds like a tough one. But I *know* there's at
> least one very busy individual that should know the answer to this.
> Skimming perl.apache.org didn't give any obvious answers, but I'm sure
> there are hints there.

http://perl.apache.org/guide/debug.html#Interactive_mod_perl_Debugging

;-)

> > 
> > Help, I really want to stop using print STDERR!  Can I make database 
> > connections in the debugger?

Very certainly.  

> > 
> > On Monday 14 January 2002 03:46 pm, Andrew Sweger wrote:
> > > To all of you _still_ using debugging print statements, I urge you to give
> > > the Perl debugger a try. I will never go back to print statements. If you
> > > tried the Perl debugger and went back to print statements, speak up. I'd
> > > be curious to know what problems folks ran into (reasons other than not
> > > actually learning how to use the debugger). I already realize that
> > > learning the Perl debugger is hard work. It is worth it!

I tend to rely on a combination of print statements, logfiles and perl -d.

For edit, run, edit style coding (short scripts), the following is so
convenient that I'll never give it up:

  print STDERR "value: $value\n" if $DEBUG;
  # actually I typically code a sub and just:
  # debug("value: $value");

For large projects, I use a central logfile for tracing data as it is
aquired, filtered, convolved and passed along between bits of the
system. Entities logging to the file identify the date, themselves, the
data, and what they are up to. This makes it easy to pick out which
section in 10k lines of code that is doubling lines of output. (anybody
use a cpan module for syslog style application logging?)

Both of these need the help of perl -d to unwind hairy problems.  The
ease examining data and being able to tweak things, single step through
code, set conditional breakpoints, etc is simply the best for digging
deep.

Have fun,
-C.


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://zipcon.net/spug/





More information about the spug-list mailing list