|
|
| Come for the quick hacks, stay for the epiphanies. | |
| PerlMonks |
basic OOP questionby o2bwise (Scribe) |
| on Nov 13, 2008 at 20:35 UTC ( [id://723499]=perlquestion: print w/replies, xml ) | Need Help?? |
|
o2bwise has asked for the wisdom of the Perl Monks concerning the following question: Hi, I am stuck on a basic package/OOP situation. This is my first time trying to write an OOP package. For this first attempt, I just want a package that performs linear regression. I have things working up to the place of my inability to resolve a hash data structure. I attempt to do this inside various package functions. Here is some of the package code:
The part of the code that is killing me is the following line: $raw_dataPtr = $_[0]{‘raw_data’} The following are other syntax attempts: $raw_dataPtr = $$_[0]{‘raw_data’} $raw_dataPtr = $self->{‘raw_data’} The only thing I know is that on this one point, I don’t know what the hell I am doing. I need to resolve the pointer to the hash so that my little package can go about calculating the linear regression related stuff. Oh, here is the code that is referencing the package:
Can someone show me how to resolve the hash of x,y data points that the package needs to work with? By the way, I have verified that my test code “sees” the package. Thanks in advance, Tony
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||