> From: Luiz Fernando B. Ribeiro [mailto:[EMAIL PROTECTED] 
>
> On Wed, 16 Mar 2005 20:58:37 -0800, Daniel 
> <[EMAIL PROTECTED]> wrote:
> 
> > Is this what you use? I'm a little curious what others do 
> to easily see
> > what variables contain. Maybe there's a good way I'm missing.
> 
> 
> In fact I wrote a module using Data::Dumper that writes 
> variables and  
> traceback information to a debug file. Send debug information 
> to screen  
> may not always be possible and using a debug file allow you 
> to debug a  
> production system without bothering your users.

Yep. Even something as simple as the following is easy to find in the
embperl logfile if you've configured it.

Generally I'm turning on the logfile for debugging live systems anyway -
you get a lot more context  that way and its easy enough to break out
each request based on the pid. The '::' is just a random delimiter -
it's not special in any way.

 sub debug {
   my $self = shift;
   return unless $some_package_or_whatever_global_saying_I_should_debug;
   print HTML::Embperl::LOG "[$$]DBG: ".join('::',@_)."\n";
 }

Cheers,

Andrew

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to