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

Re: [soaplite] The troublesome unless (defined %{"${class}::"})

Expand Messages
  • Jim Hebert
    ... Ah, yes. I actually stopped and figured that out, at one point, too, but then I thought that was so crazy that I must have done something wrong and didn t
    Message 1 of 3 , Oct 14, 2003
    View Source
    • 0 Attachment
      On Tue, 14 Oct 2003, Duncan Cameron wrote:

      > This appears to be a problem with using the CGI interface. The same
      > client and server work when using a soap daemon.

      Ah, yes. I actually stopped and figured that out, at one point, too, but
      then I thought that was so crazy that I must have done something wrong
      and didn't mention it. I was too antsy to go back and re-confirm. :-)

      > blessed into the Temperature class. This simple example shows that the
      > symbol table entry is created as you described:

      Wow, good find.

      So, I went back over your previous thread about this, I understand now why
      certain people might not want to rely on %INC or things like that to
      check if a class is loaded. Without going as gonzo as Devel::Symdump, I
      think a possible compromise might be:

      right now it tries to look, and only do the require if it thinks it has to.

      What if, instead, it did the require, then looked? Either it worked
      (great), it was a no-op because it was already loaded (fine), or it fails.

      Like:
      { # braces to retain the ability to safely mess with local @INC:

      # allow all for static and only specified path for dynamic bindings
      local @INC = (($static ? @INC : ()), grep {!ref && m![/\\.]!} $self->dispatch_to);
      eval 'local $^W; ' . "require $class";
      die "Failed to access class ($class): $@" unless (defined %{"${class}::"});
      $self->dispatched($class) unless $static;
      }

      (Untested.)

      Something like the above could be a small enough change that hopefully
      it'd be agreeable to merge into the .60 beta?

      Obviously I can patch my local copy but I'd prefer it if I could avoid
      maintaining an in-house fork... :-)

      (I'm new to the list - who with commit priviledges do I have to convince?
      :-)

      Thanks for the help Duncan, and thanks to everyone who produced such a
      great SOAP library.

      jim
    Your message has been successfully submitted and would be delivered to recipients shortly.