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

Re: problem with the constructor and method invocation.

Expand Messages
  • eric-amick@comcast.net
    ... 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
    Message 1 of 1 , Jan 31, 2005
    • 0 Attachment
      > 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:
      $client->call(new => path => 'c:/SWAT', value => 'hi');
       
      SERVER:
      sub new {
      my ($class, %args) = @_;
      #et cetera, et cetera
      }
      --
      Eric Amick
      Columbia, MD
    Your message has been successfully submitted and would be delivered to recipients shortly.