-- Hi there.

I am trying to use prototype functions with object but this seems not to work, I mean perl does not check for the type of arguments.

I usually do this.

sub array_print(\@);

..
...

sub array_print(\@)
  {
  # my code
  }


Then when I call it as:


array_print(@this_array);

Perl is supposed to check the prototype and change the array by its reference. Now I try to put this same behavior but with object, and then when I call the same function as:

$obj_array->array_print(@this_array);

Perl sends the complete array to the function and not the reference. So I need to do this

$obj_array->array_print([EMAIL PROTECTED]);

Does any one knows how to force perl to behave as normal?

Cheers

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to