SPUG: How to deal with same name packages?

Colin Meyer cmeyer at helvella.org
Tue Jan 15 00:56:46 CST 2002


On Mon, Jan 14, 2002 at 10:04:22PM -0800, Chris Sutton wrote:
> > http://perl.apache.org/guide/debug.html#Interactive_mod_perl_Debugging
> >
> > ;-)
> 
> I'm hooked.  A couple of things to share with others who may be just 
> discovering this.  In these docs they say run
> 
> httpd -X -D PERLDB
> 
> I found you also need to specify -D HAVE_PERL or mod_perl doesn't even load 
> (and you cant use the debugger).
> 
> httpd -X -D HAVE_PERL -D PERLDB

Do you have mod_perl compiled as a dso module (dynamically loadable into
the httpd binary)?  Examples in the guide tend to assume that you have 
mod_perl statically compiled into apache, as that is still recommended 
for production systems.  I understand that the module as a dso behaves
much better now than it did a year ago or so.  

> Also, I got frustrated in the debugger because "X" didn't seem to dump
> any of my variables.
> 
> Let say I had a local hash (my %hash). To see the contents you have to
> say "x %hash" X seems to just print any global shared vars.

The 'X' debugger command only dumps globals. The 'x' command dumps the
results of any expression, which can be the value of a global or lexical
variable, or any other code snippet. Hmm, I don't think that there is
any way, save XS code, to dump names and values of all lexicals. There's
no symbol table for them, unlike package variables and friends. (Try
comparing the output of 'X' to 'x %::').

> 
> I'm over the hump now.  Thanks for the pointers.

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