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

60Re: [soaplite] limiting autodispatch to a few packages...

Expand Messages
  • Paul Kulchenko
    Feb 23, 2001
    • 0 Attachment
      Yes, it works, though it's undocumented, because it might not work
      with non-SOAP::Lite servers. SOAP::Lite gets information about
      binding class from URI and other toolkits use hard binding between
      URI and class on server side, so you may be required to specify EXACT
      URI and not just build it dynamically. Yet with SOAP::Lite server
      it'll work without problems, though it's not recommended practice.
      I'm working on dispatch_from feature (as suggested by James Duncan)
      that allows you to specify CLASS whose calls should be dispatched
      (maybe even methods) and avoid UNIVERSAL::AUTOLOAD. Will be available
      in next version if nothing happen.

      Best wishes, Paul.

      --- damnfrenchy@... wrote:
      > I just noticed that if I use autodispatch, but do not supply a uri,
      > I
      > can still call functions as long as I use the form
      > "package->function
      > ()", it figures out the class (See code sample at the bottom of
      > message).
      >
      > This has a few advantages:
      > - I can call the sub the same way as if I had included the package
      > directly. Right now, I have to do that anyway since a method
      > callable
      > by SOAP::Lite needs to shift the class out anyway.
      >
      > - A sub from any other package doesn't incur a SOAP call, just a
      > perl
      > failure.
      >
      > - You don't need to clobber UNIVERSAL::AUTOLOAD, only the
      > package's.
      >
      > use SOAP::Lite +autodispatch =>
      > proxy => 'http://localhost/~harvester/soap';
      >
      > # This works fine
      > my ($status, $file) = filestore->get_file($provider,$filename);
      > ...
      > # This file, it tries to find main::get_file on the server.
      > my ($status, $file) = get_file($provider,$filename);
      > ...
      >
      >
      > ------------------------ Yahoo! Groups Sponsor
      >
      > To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to
      > http://docs.yahoo.com/info/terms/
      >
      >


      __________________________________________________
      Do You Yahoo!?
      Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/
    • Show all 2 messages in this topic