Hi,

I'm trying to make my perl source as OO as possible (fairly new to it) 
and while I can set values in set methods, I can't seem to figure out 
how to set arrays or hashes this way.

My code:

package SQLfunctions;
...
sub createPositionData {
     my ($self, @posData) = @_;
     $self->{...@_positiondata} = @posData if defined(@posData);
     return $self->{...@_positiondata};
}

1;

our $mySQL = SQLfunctions->new;
$mySQL->createPositionData(1,2,3,4,5);


I've tried other variations with no luck.  The if defined line also 
complains about being deprecated so clearly there is another means of 
doing this.  I have plenty of methods like this for single
value variables, but can't find examples of how to pass arrays or hash 
values.

Any suggestions?

Thanks,

Jason
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to