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

Re: [soaplite] Minor irritant with SOAP::Lite inheritance

Expand Messages
  • Paul Kulchenko
    Hi, Mark! ... Hm. Could you elaborate on that? I don t see any problem except when you try to override new() method itself. To avoid recursion you may add
    Message 1 of 2 , Jun 4, 2002
    • 0 Attachment
      Hi, Mark!

      > Is anyone aware of a way to get around this? it isn't a big deal,
      > but if a method exists I'd like to know.
      Hm. Could you elaborate on that? I don't see any problem except when
      you try to override new() method itself. To avoid recursion you may
      add check for the object:

      sub new {
      return $_[0] if ref $_[0]; # it's an object already; OBJECT method

      # the rest of your code that creates the object; CLASS method
      }

      Let me know if it's something else. It's price we pay for the
      flexibility of the code ;).

      Also take a look at the XMLRPC::Lite, which is inherited from
      SOAP::Lite.

      Best wishes, Paul.

      --- Mark Wilkinson <mwilkinson@...> wrote:
      > One thing I have noticed as a minor irritant in using SOAP::Lite is
      > that
      > it is extremely difficult to generate new modules which inherit
      > from
      > it. This is because may of the calls (eg. ->proxy, ->uri,
      > ->on_fault)
      > result in operations that look like:
      >
      > $self = shift->new;
      >
      > attempting to recreate the inherited object (i.e. it is no longer a
      > SOAP::Lite object which is shifted), which itself will call ->proxy
      > during its initialization... and "BOOM", infinite recursion.
      >
      > most unpleasant :-)
      >
      > Is anyone aware of a way to get around this? it isn't a big deal,
      > but
      > if a method exists I'd like to know.
      >
      > Mark
      >
      >
      > --
      > --------------------------------
      > "Speed is subsittute fo accurancy."
      > ________________________________
      >
      > Dr. Mark Wilkinson
      > Bioinformatics Group
      > National Research Council of Canada
      > Plant Biotechnology Institute
      > 110 Gymnasium Place
      > Saskatoon, SK
      > Canada
      >
      >
      >
      >
      > ------------------------ 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! - Official partner of 2002 FIFA World Cup
      http://fifaworldcup.yahoo.com
    Your message has been successfully submitted and would be delivered to recipients shortly.