SPUG: Debugging methodology (was: How to deal with same name packages?)

Colin Meyer cmeyer at helvella.org
Mon Jan 28 17:08:23 CST 2002


On Mon, Jan 28, 2002 at 02:37:16PM -0800, Tim Maher wrote:
> 
> >     print STDERR "Debug/Assertion statement" if $debug > 1;
> 
> BECOMES:
>      if ($debug > 1) { print STDERR "Debug statement" ; second_thing; } 
> OR even:
>      do { print STDERR "Debug statement" ; second_thing; } if $debug > 1;

  Or even:
 
       print (STDERR "Debug statement"), second_thing if $debug > 1;

> 
> But, of course, TMTOWTDI! 8-}

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