Loading ...
Sorry, an error occurred while loading the content.

2563How to easily turn on/off debugging information

Expand Messages
  • Byrne Reese
    Apr 29, 2003
    • 0 Attachment
      One thing I find myself constantly doing with my SOAP::Lite clients is
      commenting in and out the "+trace => 'debug'" from the "use SOAP::Lite" call
      so that I can turn on and off debugging information. This became so annoying
      to me that I decided to programitize it. Now I just turn debugging on and
      off with a command line flag.

      The following code fragment shows how you can easily turn on and off
      SOAP::Lite debugging information from the command line. Obviating your need
      to go into the code everytime you want to toggle debugging:

      use Getopt::Long;
      my $result = GetOptions ("debug" => \$DEBUG);

      if ($DEBUG) {
      eval "use SOAP::Lite +trace => 'debug';";
      } else {
      eval "use SOAP::Lite;";

      This is also available online at:

      Byrne Reese
      Developer Program Manager
      Grand Central Communications, Inc.
    • Show all 2 messages in this topic