SPUG: How to deal with same name packages?

Andrew Sweger andrew at sweger.net
Mon Jan 14 20:20:53 CST 2002

For plain old CGI's, I usually run them on the command line feeding them
the CGI environment. I vaguely recall the CGI module (at one time)
detecting when it was talking to a terminal and prompting for input. It
would probably be better to harness the CGI to be able to (alternately)
take input from a file containing the test input while running under the
debugger. This way you can keep using the same test cases. Kinda like QA
or something equally unfamiliar to me. ;)

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.

On Mon, 14 Jan 2002, Chris Sutton wrote:

> OK, i'll bite.  I have started to learn the perl debugger several times and 
> each time I run into this problem:
> How do you run the debugger inside a CGI (or more importantly a mod_perl) 
> environment.  About 90% of what I do in perl runs behind apache in mod_perl 
> and can't get very far past
> sub handler {
> 	my $r = shift;
> 	my $s = $r->server;
> debugger complains "Can't call method "server" on an undefined blah blah...
> I know I've seen this somewhere before where you run the debugger inside some 
> sort of apache environment or something.
> Help, I really want to stop using print STDERR!  Can I make database 
> connections in the debugger?
> 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!

Andrew B. Sweger -- The great thing about multitasking is that several
                                things can go wrong at once.

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     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