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

4382Re: problem with the constructor and method invocation.

Expand Messages
  • eric-amick@comcast.net
    Jan 31, 2005
      > If that is the case,
      > is there a way I can pass the hash values in the call method.
      > The syntax for call given as
      > call(new=>@arguments);
      > But in my case I need to create a constructor like
      > new(path=>'c:/SWAT', value=>'hi'); How do implement the same with
      > call method.
      The '@arguments' in the syntax indicates that everything after the method name is a list of arguments. If your constructor treats that list as a set of key/value pairs, it should work fine, as in
      $client->call(new => path => 'c:/SWAT', value => 'hi');
      sub new {
      my ($class, %args) = @_;
      #et cetera, et cetera
      Eric Amick
      Columbia, MD