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

Re: [soaplite] How to easily turn on/off debugging information

Expand Messages
  • Randy J. Ray
    ... use SOAP::Lite; use Getopt::Long; my $result = GetOptions ( debug = $DEBUG); # No my for $DEBUG? :-) $DEBUG && SOAP::Lite- import(trace = debug);
    Message 1 of 2 , Apr 29, 2003
    • 0 Attachment
      > 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;";
      > }

      use SOAP::Lite;
      use Getopt::Long;
      my $result = GetOptions ("debug" => \$DEBUG); # No 'my' for $DEBUG? :-)

      $DEBUG && SOAP::Lite->import(trace => debug);


      Randy
      --
      rjray@... http://www.rjray.org http://www.svsm.org

      Any spammers auto-extracting addresses from this message will definitely want
      to include uce@... and report@...
    Your message has been successfully submitted and would be delivered to recipients shortly.