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

5692Lost $SIG{__DIE__} with SOAP requests.

Expand Messages
  • Himanshu Garg
    Nov 2, 2006

      My application installs its own die handlers to do some cleanup.
      These die handlers are lost when requests come via SOAP. I wonder if
      this is a mistake I am making or something SOAP::Lite does.

      I am therefore trying to understand how SOAP::Lite handles
      application die's. I wonder what is the effect of local $SIG{__DIE__}
      in the code shown in PS

      Kindly let me know the reason or whether or not I am looking at
      the right place.

      Thank You,


      From SOAP/Lite.pm:-

      sub handle {
      my $self = shift;
      $self = $self->new if !ref $self; # inits the server when called in
      a static context
      # we want to restore it when we are done
      local $SOAP::Constants::DEFAULT_XML_SCHEMA
      = $SOAP::Constants::DEFAULT_XML_SCHEMA;

      # SOAP version WILL NOT be restored when we are done.
      # is it problem?

      my $result = eval {
      local $SIG{__DIE__};
      # why is this here:
      my $request = eval { $self->deserializer->deserialize($_[0]) };
      die SOAP::Fault