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

Re: [soaplite] silent failures

Expand Messages
  • Paul Kulchenko
    Hi, Ian! ... Shouldn t happen. XML::Parser is used if installed (unless DO_NOT_USE_XML_PARSER is true), then XML::Parser::Lite (which is included with
    Message 1 of 4 , Nov 30, 2001
    • 0 Attachment
      Hi, Ian!

      --- Ian Kallen <spidaman@...> wrote:
      > I've observed that if XML::Parser (or something it depends) is not
      > properly installed, SOAP::Lite can fail silently. Unfortunately I
      Shouldn't happen. XML::Parser is used if installed (unless
      DO_NOT_USE_XML_PARSER is true), then XML::Parser::Lite (which is
      included with SOAP::Lite, so always available) and only then
      SOAP::Lite will die with diagnostics. Could it be something more low
      level (because of unavailability of Expat.so)?

      > I haven't verified the validity or lack thereof of this construct
      > but I'm
      > suspicious, I don't know what reason there is to _not_ use a more
      > conventional construct such as
      >
      > eval {
      > # do something that might fail
      > };
      > if ($@) {
      > # handle error
      > }
      >
      > At a minimum, it's easier on the reader. I ran into this problem
      Because straightforward:

      return eval {} || # XML::Parser
      eval {} || # XML::Parser::Lite
      die "...";

      becomes

      my $parser;
      unless ($DO_NOT_USE...) {
      eval {
      require XML::Parser; $parser = XML::Parser->new;
      };
      return $parser unless $@;
      }
      eval {
      require XML::Parser::Lite; $parser = XML::Parser::Lite->new;
      }
      return $parser unless $@;
      die "...";

      Wouldn't say it's easy on reader, but it's a matter of taste ;). Mine
      is spoiled ;).

      > and I managed to make the SOAP server cgi go into a spin and
      > consume all CPU resources until apache finally timed it out!
      As you see, there is no loops or anything of that kind. I can't image
      what could be the reason for consuming resources. Any ideas?

      Best wishes, Paul.

      __________________________________________________
      Do You Yahoo!?
      Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
      http://geocities.yahoo.com/ps/info1
    Your message has been successfully submitted and would be delivered to recipients shortly.